{
  "openapi": "3.1.0",
  "info": {
    "title": "Kinship public token API",
    "version": "1.0.0"
  },
  "paths": {
    "/api/v1/communication-options": {
      "get": {
        "operationId": "listCommunicationOptions",
        "description": "Requires a browser session or a personal token with interactions:create. Returns current capture vocabulary and availability only; no historic content.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:create",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Active communication channels, emotions, and availability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationOptions"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interaction-options": {
      "get": {
        "operationId": "listInteractionOptions",
        "description": "Requires a browser session or a personal token with interactions:create. Returns bounded current capture vocabulary and availability only; no historic content. Cursors remain bound to their workspace and search filters.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:create",
        "parameters": [
          {
            "in": "query",
            "name": "activityTypeCursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "activityTypeSearch",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "required": false
          },
          {
            "in": "query",
            "name": "emotionCursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "emotionSearch",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded active activity types and emotions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionOptions"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interactions": {
      "post": {
        "operationId": "recordInteraction",
        "description": "Requires a browser session or a personal token with the independent interactions:create grant. Records a note, activity, call, or conversation through its owning use case; grants no historic-content read, edit, or delete access. Reuse body requestId for retries; changed payloads conflict, and a requestId whose record was since deleted answers 409 interaction_request_deleted rather than recording it again. Bearer requests need no Cookie or Origin. Cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:create",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Interaction or communication persisted atomically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interactions/activity/{interactionId}": {
      "patch": {
        "operationId": "updateActivity",
        "description": "Requires a browser session or a personal token with interactions:write. Edits one activity: happenedAt, participantIds (replaces the whole list, every person active in the workspace), summary, activityTypeId, description, and emotionIds (replaces the whole list). Moving it later, or adding people, advances their stay-in-touch cadences as recording it would. Send only the fields to change: an omitted field stays as stored, null clears an optional one, and at least one field is required. expectedUpdatedAt is the record's updatedAt from getActivityReport or listPersonCommunications (or from the create or a previous edit); a stale revision is refused with 409. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityChangeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Activity saved at a new revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteActivity",
        "description": "Requires a browser session or a personal token with interactions:write. Permanently deletes one activity for every participant, not only the person it was found through, with its emotions and the journal entry that links it; it leaves every participant's activity report and timeline, search, the journal, and Today. Stay-in-touch cadences it advanced are not moved back. expectedUpdatedAt is the record's updatedAt as last read; a stale revision is refused with 409. There is no undo. The record's id derives from its create's requestId, and the delete keeps that id as a tombstone, so re-sending the original create afterwards answers 409 interaction_request_deleted instead of recording it again. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionRemovalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Activity deleted at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interactions/call/{interactionId}": {
      "patch": {
        "operationId": "updateCall",
        "description": "Requires a browser session or a personal token with interactions:write. Edits one call: calledAt, contactWasCaller, content, and emotionIds (replaces the whole list). Moving it later advances the person's stay-in-touch cadence as recording it would. Send only the fields to change: an omitted field stays as stored, null clears an optional one, and at least one field is required. expectedUpdatedAt is the record's updatedAt from getActivityReport or listPersonCommunications (or from the create or a previous edit); a stale revision is refused with 409. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallChangeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Call saved at a new revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCall",
        "description": "Requires a browser session or a personal token with interactions:write. Permanently deletes one call and its emotions; it leaves the person's communications, last-contact date, and timeline. A stay-in-touch cadence it advanced is not moved back. expectedUpdatedAt is the record's updatedAt as last read; a stale revision is refused with 409. There is no undo. The record's id derives from its create's requestId, and the delete keeps that id as a tombstone, so re-sending the original create afterwards answers 409 interaction_request_deleted instead of recording it again. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionRemovalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Call deleted at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interactions/conversation/{interactionId}": {
      "patch": {
        "operationId": "updateConversation",
        "description": "Requires a browser session or a personal token with interactions:write. Edits one conversation: channelTypeId, contactMethodId (one of the person's contact methods on that channel), happenedAt, title, and messages (replaces every message). Moving it later advances the person's stay-in-touch cadence as recording it would. Send only the fields to change: an omitted field stays as stored, null clears an optional one, and at least one field is required. expectedUpdatedAt is the record's updatedAt from getActivityReport or listPersonCommunications (or from the create or a previous edit); a stale revision is refused with 409. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationChangeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Conversation saved at a new revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteConversation",
        "description": "Requires a browser session or a personal token with interactions:write. Permanently deletes one conversation and its messages; it leaves the person's communications, last-contact date, and timeline. A stay-in-touch cadence it advanced is not moved back. expectedUpdatedAt is the record's updatedAt as last read; a stale revision is refused with 409. There is no undo. The record's id derives from its create's requestId, and the delete keeps that id as a tombstone, so re-sending the original create afterwards answers 409 interaction_request_deleted instead of recording it again. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionRemovalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Conversation deleted at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/interactions/note/{interactionId}": {
      "patch": {
        "operationId": "updateNote",
        "description": "Requires a browser session or a personal token with interactions:write. Edits one note: body and isFavorited (favorite notes appear on Today). Send only the fields to change: an omitted field stays as stored, null clears an optional one, and at least one field is required. expectedUpdatedAt is the record's updatedAt from getActivityReport or listPersonCommunications (or from the create or a previous edit); a stale revision is refused with 409. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteChangeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Note saved at a new revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteNote",
        "description": "Requires a browser session or a personal token with interactions:write. Permanently deletes one note; it leaves the activity report, search, the person's timeline, and Today's favorite notes. expectedUpdatedAt is the record's updatedAt as last read; a stale revision is refused with 409. There is no undo. The record's id derives from its create's requestId, and the delete keeps that id as a tombstone, so re-sending the original create afterwards answers 409 interaction_request_deleted instead of recording it again. A record of an archived person is read-only. Grants no read or capture access. Bearer requests need no Cookie or Origin; cookie writes require the exact configured public Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:write",
        "parameters": [
          {
            "in": "path",
            "name": "interactionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionRemovalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Note deleted at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal": {
      "get": {
        "operationId": "listJournal",
        "description": "Personal tokens require journal:read. Journal posts and day ratings are workspace-wide, not private to their author: any member, and so any token, can read, edit, or delete any of them. Items may carry the content of linked activities. Does not grant writing.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:read",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Ordered personal journal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalTimelineList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal/activities": {
      "post": {
        "operationId": "linkJournalActivity",
        "description": "Personal tokens require journal:write. Links an existing activity of the token's workspace to the journal; an activity that is already linked, or is not in the workspace, answers 404. Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "activityId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "activityId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Activity linked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalActivityLinked"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal/day-ratings": {
      "put": {
        "operationId": "saveJournalDayRating",
        "description": "Personal tokens require journal:write. Upserts the one workspace-wide rating for its date: an existing rating for that date is replaced, an omitted comment cleared (200), otherwise one is created (201). Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalDayRatingInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Day rating updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalDayRatingSaved"
                }
              }
            }
          },
          "201": {
            "description": "Day rating created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalDayRatingSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal/items/{itemId}": {
      "delete": {
        "operationId": "deleteJournalItem",
        "description": "Personal tokens require journal:write. Journal posts and day ratings are workspace-wide, not private to their author: any member, and so any token, can read, edit, or delete any of them. Deleting an activity item removes its journal link, not the activity. A deleted post keeps its id as a request tombstone, so a createJournalPost retried with the requestId that made it answers 409 journal_request_deleted. Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:write",
        "parameters": [
          {
            "in": "path",
            "name": "itemId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Journal item removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getJournalItem",
        "description": "Personal tokens require journal:read. Journal posts and day ratings are workspace-wide, not private to their author: any member, and so any token, can read, edit, or delete any of them. An activity item carries the linked activity's content. Does not grant writing.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:read",
        "parameters": [
          {
            "in": "path",
            "name": "itemId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "One journal item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalItemReady"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal/posts": {
      "post": {
        "operationId": "createJournalPost",
        "description": "Personal tokens require journal:write. Journal posts and day ratings are workspace-wide, not private to their author: any member, and so any token, can read, edit, or delete any of them. Send a client-generated requestId and reuse it when retrying: the same requestId and post return the post it created (201), and the same requestId with a different body, title, or occurredAt is refused (409). Once the post is deleted, the same requestId answers 409 journal_request_deleted rather than writing it again. Without a requestId every call creates a new post. Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalPostInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Journal post created, or the post an earlier call with the same requestId created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalPostCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/journal/posts/{itemId}": {
      "put": {
        "operationId": "updateJournalPost",
        "description": "Personal tokens require journal:write. Journal posts and day ratings are workspace-wide, not private to their author: any member, and so any token, can read, edit, or delete any of them. Replaces the post with the body sent: an omitted title is cleared. Send expectedUpdatedAt, the post's updatedAt as listJournal or getJournalItem returned it, to refuse a concurrent edit: a revision that is no longer current answers 409 and changes nothing. Without expectedUpdatedAt the post is overwritten unchecked. Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "journal:write",
        "parameters": [
          {
            "in": "path",
            "name": "itemId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalPostUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Journal post updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalPostUpdated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mcp": {
      "post": {
        "operationId": "mcp",
        "description": "Model Context Protocol over Streamable HTTP, stateless, for 2025-era (initialize) and 2026-07-28 clients. Accepts any valid personal token in Authorization: Bearer and never reads a session cookie; a missing or refused token answers 401 with WWW-Authenticate: Bearer. tools/list returns only the tools the token's scopes allow, and tools/call sends the tool's own route an in-process request with the same token, so that route's scope, role, workspace, legal, validation, retry, and audit rules apply unchanged. Every answer is one JSON body; there is no session and no server-initiated stream, and GET and DELETE answer 405.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The JSON-RPC response to a request, a tool's result included; a refused or failed tool call is a result with isError set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpMessage"
                }
              }
            }
          },
          "202": {
            "description": "A JSON-RPC notification or response, accepted"
          },
          "400": {
            "description": "A malformed X-Workspace-Id (RFC 9457 problem), or a message the protocol refuses (a JSON-RPC error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpMessage"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "operationId": "getTokenContext",
        "description": "Accepts any valid personal token and requires no grant. Returns the presented token's id, name, scopes, and optional expiry, and the workspace, member, and current role it acts as. Never reads a session cookie; the optional X-Workspace-Id must match the token's workspace.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "The presented token and the membership it acts as",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenContext"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people": {
      "get": {
        "operationId": "listPeople",
        "description": "Directory only. Personal tokens require the people:read grant; it does not permit person identity, profile facts, dates, relationships, or profile aggregates.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:read",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "excludePersonId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false
          },
          {
            "in": "query",
            "name": "selectedPersonId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "lifecycle",
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "given-name",
              "type": "string",
              "enum": [
                "given-name",
                "family-name",
                "recently-added",
                "last-contacted",
                "recently-updated"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "name": "starred",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Only starred people (GAP-053).",
            "required": false
          },
          {
            "in": "query",
            "name": "starredFirst",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Starred people before everybody else, each group in the sort order.",
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped people directory page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDirectoryPage"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createPerson",
        "description": "Creates a person in the workspace and answers their id and updatedAt, the revision editPerson, archivePerson, restorePerson, and deletePerson accept as expectedUpdatedAt. Personal tokens require the people:write grant. Send a client-generated requestId and reuse it when retrying: the same requestId and names return the person it created at their current revision (201), and the same requestId with different names, or after that person was deleted, is refused (409). duplicateOverride is not compared, so a create warned as a possible duplicate may be retried with duplicateOverride and the same requestId. Without a requestId every call creates a new person. A name that already exists in the workspace answers a possible duplicate (409) unless the request sets duplicateOverride.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Workspace-owned person created, or the person an earlier call with the same requestId created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/bulk": {
      "post": {
        "operationId": "bulkPeople",
        "description": "Archives, restores, tags, or untags up to 100 people. Each person runs through the single-person use case in its own transaction and is answered per person, in request order; only a malformed request, lost access, or a tag outside the workspace refuses the whole request. Personal tokens require the people:write grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleBulkInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Each person's outcome; partial success is expected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleBulkResult"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/duplicates": {
      "get": {
        "operationId": "listPeopleDuplicates",
        "description": "Bounded pairs of active people who look like the same person. Personal tokens require the people:merge grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:merge",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded pairs of active people in the workspace who share a full name, an email address, or a phone number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDuplicates"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/duplicates/dismissals": {
      "post": {
        "operationId": "dismissPeopleDuplicate",
        "description": "Marks two people from the duplicate review as not duplicates for the whole workspace. Dismissing a dismissed pair changes nothing. Personal tokens require the people:merge grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:merge",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleDuplicateDismissalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The duplicate review no longer offers the pair to any member of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDuplicateDismissed"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/tag-facet": {
      "get": {
        "operationId": "listPeopleTagFacet",
        "description": "The workspace's tags with how many people of the active or archived view carry each, most carried first, at most thirty; `truncated` says more tags are in use. Personal tokens require the people:read grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:read",
        "parameters": [
          {
            "in": "query",
            "name": "lifecycle",
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded tenant-scoped tag counts for the directory view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleTagFacet"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/tag-options": {
      "get": {
        "operationId": "listPeopleTagOptions",
        "description": "Bounded tag options for the directory's tag filter. Personal tokens require the people:read grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:read",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "selected",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded tenant-scoped people tag options",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleTagOptionsPage"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}": {
      "delete": {
        "operationId": "deletePerson",
        "description": "Deletes a person. The body repeats the exact confirmation phrase of the deletion impact and the person's expectedUpdatedAt; either missing or no longer current is refused. Personal tokens require the people:delete grant, which no other grant implies.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:delete",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonDeleteInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic current-workspace person lifecycle change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "editPerson",
        "description": "Edits a person's identity against the expectedUpdatedAt it was decided from. Personal tokens require the people:write grant. A stale revision is refused (409) and an archived person is read-only.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonEditInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic current-workspace person lifecycle change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifecycleChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/activity-report": {
      "get": {
        "operationId": "getActivityReport",
        "description": "Requires a browser session or a personal token with interactions:read. Returns one person's activities and notes, including their summaries, descriptions, and note bodies, newest first; filter by kind and year and page with the opaque cursor, which stays bound to its workspace, person, and filters. Grants no capture, edit, or delete access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string",
              "enum": [
                "activity",
                "note"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "name": "year",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9999
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped person activity report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityReport"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/archive": {
      "post": {
        "operationId": "archivePerson",
        "description": "Archives a person against the expectedUpdatedAt it was decided from. Personal tokens require the people:write grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonTransitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic current-workspace person lifecycle change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifecycleChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/communications": {
      "get": {
        "operationId": "listPersonCommunications",
        "description": "Requires a browser session or a personal token with interactions:read. Returns one person's calls and conversations, including call content and conversation message text. Grants no capture, edit, or delete access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "interactions:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped person communication history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/dates": {
      "get": {
        "operationId": "listImportantDates",
        "description": "Personal tokens require people:profile:read. Reads important dates, including archived people, preserving stored date precision.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:profile:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Exact important-date list for one workspace person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportantDateList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createImportantDate",
        "description": "Personal tokens require people:write. Adds an important date carrying exactly the components its precision declares; a person has at most one birthday, deceased, and first-met date. Archived people are read-only. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportantDateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Important date created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportantDateChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/dates/{dateId}": {
      "delete": {
        "operationId": "deleteImportantDate",
        "description": "Personal tokens require people:write. Removes an important date at expectedUpdatedAt, the date's updatedAt from listImportantDates. Archived people are read-only. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "dateId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonTransitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Important date deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportantDateDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateImportantDate",
        "description": "Personal tokens require people:write. Replaces an important date at expectedUpdatedAt, the date's updatedAt from listImportantDates. Archived people are read-only. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "dateId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportantDateUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Important date updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportantDateChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/debts": {
      "post": {
        "operationId": "createDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Records a debt the person owes or is owed: `amount` is a decimal string and `currencyCode` a three-letter code the workspace supports. A debt created settled may carry a settlement reason and the file id of a settlement photo, which must be an available JPEG, PNG, or WebP photo of this same person in this workspace; a token needs no files scope to reference it. An optional `requestId` (a UUID the client generates once per intended record) makes a retry safe: repeating the request with the same `requestId` and the same payload returns the record the first attempt wrote, answering 201 again without writing anything; the same `requestId` with a different payload, or for a different person, answers 409 `gift_request_conflict`; and once that record was deleted, the same `requestId` answers 409 `gift_request_deleted` rather than recording it again. The key is the workspace's, shared by every member and token. A workspace reset removes the deleted records' tombstones together with the records, so after a reset the same `requestId` creates the record again. Without `requestId`, repeating the request records a second debt. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebtCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Debt created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/debts/{debtId}": {
      "delete": {
        "operationId": "deleteDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Permanently removes one debt and its whole settlement history; nothing can restore it. For a recurring charge, its rule, next occurrence, and other charges stay. Ordinary pause/resume does not recreate the removed charge; later explicit schedule changes may charge deleted periods again. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "debtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Debt permanently deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Edits a debt's `amount`, `currencyCode`, `direction`, or `reason`; status moves with changeDebtStatus. A field left out keeps its value, `reason: null` clears the reason, and at least one field must be named. `expectedUpdatedAt` is required: the debt's `updatedAt` from listPersonGiftsAndDebts or the last write; when the debt has changed since, it answers 409 `gift_stale` and changes nothing. The amount, currency, and direction can change only while the debt is open and has never been settled, because its settlement history records what was paid; once it has been settled, even if reopened since, they answer 409 `debt_values_locked`, and its reason stays editable. A cancelled debt is finished and refuses every edit with 409 `debt_values_locked`. A debt a recurring rule charged is an ordinary debt once charged: editing it changes neither the rule nor its other charges, and the rule never charges that period again. A request that changes nothing answers `unchanged`. A debt under another person's path answers 404. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "debtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebtUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Debt saved, or unchanged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/debts/{debtId}/settlements": {
      "get": {
        "operationId": "listDebtSettlements",
        "description": "Requires a browser session or a personal token with gifts:read, which covers both gifts and debts — financial information. Returns one debt's permanent settlement history, newest first: when it was settled, the optional reason, and the optional settlement photo's file id and filename, with whether that photo is still available. Page with the opaque cursor. Grants no write access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "debtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Permanent settlement history, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtSettlementList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/debts/{debtId}/status": {
      "patch": {
        "operationId": "changeDebtStatus",
        "description": "Requires a browser session or a personal token with gifts:write. Moves a debt between `open`, `settled`, and `cancelled`: an open debt may be settled or cancelled, a settled debt may reopen, and `cancelled` is terminal. Settling appends to the debt's permanent settlement history and may carry a reason and the file id of a settlement photo, which must be an available JPEG, PNG, or WebP photo of this same person in this workspace; a token needs no files scope to reference it. Asking for the status the debt already has answers `unchanged`. An optional `expectedUpdatedAt`, the debt's `updatedAt` from listPersonGiftsAndDebts or the last write, makes the change conditional: when the debt has changed since, it answers 409 `gift_stale` and changes nothing, so no settlement is recorded; without it the change applies to whatever the debt is now. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "debtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebtStatusInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Debt status changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/deletion-impact": {
      "get": {
        "operationId": "getPersonDeletionImpact",
        "description": "What deleting the person removes, and the exact confirmation phrase the deletion must repeat. Personal tokens require the people:delete grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:delete",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical soft-delete impact and confirmation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonDeletionImpact"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/facts/{section}": {
      "get": {
        "operationId": "listProfileFacts",
        "description": "Personal tokens require people:profile:read. Reads one profile-fact section and its lookup options when requested. Hidden sections return no saved records or options; archived people remain readable. Existing person, section, revision, and option-search cursor checks apply.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:profile:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/ProfileFactSectionId"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "includeOptions",
            "schema": {
              "const": "true"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "optionCursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "description": "Requires includeOptions=true.",
            "required": false
          },
          {
            "in": "query",
            "name": "optionSearch",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "One enabled person profile-fact section",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileFactSection"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProfileFact",
        "description": "Personal tokens require people:write. Adds a fact to one profile section. first-meeting, food-preferences, and tags hold at most one fact, whose id is the person's id; creating one that exists answers stale, and tags always exists, so it is changed with updateProfileFact. expectedPersonUpdatedAt is the personUpdatedAt that listProfileFacts or the last fact write returned. Hidden sections, archived people, and options that are inactive or outside the workspace are refused. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/ProfileFactSectionId"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileFactCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Profile fact saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileFactChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/facts/{section}/{factId}": {
      "delete": {
        "operationId": "deleteProfileFact",
        "description": "Personal tokens require people:write. Removes one fact, or clears first-meeting or food-preferences, at expectedUpdatedAt, the record's updatedAt; tags are cleared with updateProfileFact and an empty tagIds. expectedPersonUpdatedAt is the personUpdatedAt that listProfileFacts or the last fact write returned. Hidden sections and archived people are refused. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/ProfileFactSectionId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "factId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileFactDeleteInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Profile fact deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileFactDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateProfileFact",
        "description": "Personal tokens require people:write. Replaces one fact at expectedUpdatedAt, the record's updatedAt; the body's id must be the path's factId. expectedPersonUpdatedAt is the personUpdatedAt that listProfileFacts or the last fact write returned. Hidden sections, archived people, and options that are inactive or outside the workspace are refused. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/ProfileFactSectionId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "factId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileFactUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Profile fact updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileFactChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/files": {
      "get": {
        "operationId": "listPersonFiles",
        "description": "Personal tokens require files:read. Lists one person's photos and then documents, a page at a time, with each file's metadata and availability (available, missing, processing, or quarantined); a person's avatar image and removed files are never listed. Does not return file bytes, which only the REST download route serves, and does not grant uploading or removing.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "files:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Explicit document and photo states for one person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonFileList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "uploadPersonFile",
        "description": "Personal tokens require files:write. Stores one document or photo for a person from the raw request body, whose Content-Type must be one of the listed media types, up to 10485760 bytes; the kind travels in X-File-Kind and the percent-encoded filename and title in X-File-Name and X-File-Title. A token without files:write is refused before the body is read. Does not grant listing or downloading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "files:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          },
          {
            "in": "header",
            "name": "X-File-Kind",
            "schema": {
              "type": "string",
              "enum": [
                "document",
                "photo"
              ]
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-File-Name",
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-File-Title",
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/pdf": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            },
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            },
            "image/png": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            },
            "text/plain": {
              "schema": {
                "type": "string",
                "maxLength": 10485760,
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Stored metadata and typed person link created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonFileCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/files/{fileId}": {
      "delete": {
        "operationId": "removePersonFile",
        "description": "Personal tokens require files:write. Removes one of the person's documents or photos: its stored bytes and its link to the person are deleted and its metadata is kept as deleted, so it stops being listed or downloadable. There is no revision check; a file still being processed answers 409, and an avatar image, a file of another person, or a file of an archived person answers 404. A gift that links the file keeps its attachmentFileId, and a debt settlement whose photo it was reports that photo as unavailable. Does not grant reading. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "files:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "fileId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Person file safely removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "const": "removed"
                    }
                  },
                  "required": [
                    "fileId",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/files/{fileId}/content": {
      "get": {
        "operationId": "downloadPersonFile",
        "description": "Personal tokens require files:read. Answers the file's bytes as an attachment, with its stored media type, length, and filename, and records the read of a document or photo in the audit history; it also serves the person's avatar image, unrecorded. A removed file, or a file of another person, answers 404; one whose stored bytes are missing answers 410, one still being processed 409, and a quarantined one 423. Does not grant uploading or removing.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "files:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "fileId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized private file bytes",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "410": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "423": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/gifts": {
      "get": {
        "operationId": "listPersonGiftsAndDebts",
        "description": "Requires a browser session or a personal token with gifts:read, which covers both gifts and debts — financial information. Returns one person's gifts, debts, and recurring debts: amounts are decimal strings with a three-letter currency code, and the answer names the default and supported currencies. Gifts and debts page independently with their own opaque cursors. An archived person's records stay readable. Grants no write access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "debtCursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "giftCursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Person gift and debt sections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftDebtList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createGift",
        "description": "Requires a browser session or a personal token with gifts:write. Records a gift idea, plan, or exchange: an optional `amount` is a decimal string with a three-letter `currencyCode` the workspace supports. A recipient person id must name a live person of this workspace. An attachment file id must name an available file of this workspace that is not a person's avatar; a token needs no files scope to reference it. An optional `requestId` (a UUID the client generates once per intended record) makes a retry safe: repeating the request with the same `requestId` and the same payload returns the record the first attempt wrote, answering 201 again without writing anything; the same `requestId` with a different payload, or for a different person, answers 409 `gift_request_conflict`; and once that record was deleted, the same `requestId` answers 409 `gift_request_deleted` rather than recording it again. The key is the workspace's, shared by every member and token. A workspace reset removes the deleted records' tombstones together with the records, so after a reset the same `requestId` creates the record again. Without `requestId`, repeating the request records a second gift. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Gift created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/gifts/{giftId}": {
      "patch": {
        "operationId": "updateGift",
        "description": "Requires a browser session or a personal token with gifts:write. Edits a gift's values: `name`, `amount` with `currencyCode`, `eventAt`, `comment`, `url`, `recipientPersonId`, and `attachmentFileId` — what createGift accepts except `status`, which changeGiftStatus moves. A field left out keeps its value and `null` clears an optional one; `name` cannot be cleared, and at least one field must be named. `amount` and `currencyCode` are sent together or not at all, and an amount needs a currency the workspace supports. `expectedUpdatedAt` is required: the gift's `updatedAt` from listPersonGiftsAndDebts or the last write; when the gift has changed since, it answers 409 `gift_stale` and changes nothing. A `comment` longer than 10,000 characters or a `url` longer than 2,000 answers 400 and changes nothing, as on createGift. A recipient must be a live person of this workspace. An attachment must be an available file of this workspace that is not a person's avatar; it replaces the gift's attachment, `null` removes it, and either way the previous file stays in the person's files. A request that changes nothing answers `unchanged`. A gift under another person's path answers 404. Gifts are workspace-wide: any member may edit any gift. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "giftId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gift saved, or unchanged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteGift",
        "description": "Requires a browser session or a personal token with gifts:write. Permanently removes one gift; nothing can restore it, and a createGift retried later with the `requestId` that created it answers 409 `gift_request_deleted` instead of recording it again. The body carries the required `expectedUpdatedAt`, the gift's `updatedAt` from listPersonGiftsAndDebts or the last write; when the gift has changed since, it answers 409 `gift_stale` and deletes nothing. An attached file is not deleted: only its link to the gift goes, and the file stays in the person's files. To keep a gift out of the way without losing it, archive it with changeGiftStatus instead. A gift under another person's path answers 404. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "giftId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftDeleteInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gift permanently deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/gifts/{giftId}/status": {
      "patch": {
        "operationId": "changeGiftStatus",
        "description": "Requires a browser session or a personal token with gifts:write. Moves a gift along its transition graph: an idea may become planned, given, or received; a planned gift may be given or received; any gift may be archived; and `archived` is terminal. A move the graph does not allow answers 409, and asking for the status the gift already has answers `unchanged`. An optional `expectedUpdatedAt`, the gift's `updatedAt` from listPersonGiftsAndDebts or the last write, makes the change conditional: when the gift has changed since, it answers 409 `gift_stale` and changes nothing; without it the change applies to whatever the gift is now. Edit the gift's other values with updateGift. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "giftId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftStatusInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gift status changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/identity": {
      "get": {
        "operationId": "getPersonIdentity",
        "description": "Minimal person name, identifier, and revision (updatedAt, the expectedUpdatedAt editPerson, archivePerson, restorePerson, and deletePerson accept), including archived people. Personal tokens require people:profile:read. Returns no profile aggregate, notes, timeline, tasks, or file data.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:profile:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace-scoped minimal person identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonIdentityReady"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/life-events": {
      "get": {
        "operationId": "listPersonLifeEvents",
        "description": "Personal tokens require people:profile:read. Reads at most 100 precision-aware life events of a person in the active workspace, archived people included, with the workspace's life-event types. A hidden section returns no saved events.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:profile:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded precision-aware life-event history from the person profile read model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifeEventsReady"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createPersonLifeEvent",
        "description": "Personal tokens require people:write. Records a life event on a person of the token's workspace; a retry records a second one. Does not grant reading life events. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonLifeEventInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Life event recorded on a current-workspace person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifeEventChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/life-events/{lifeEventId}": {
      "patch": {
        "operationId": "updatePersonLifeEvent",
        "description": "Personal tokens require people:write. Replaces the life event when expectedUpdatedAt still matches its revision; a stale revision is refused with 409. Does not grant reading life events. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "lifeEventId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonLifeEventUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Life event replaced at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifeEventChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePersonLifeEvent",
        "description": "Personal tokens require people:write. Removes the life event when expectedUpdatedAt still matches its revision; a stale revision is refused with 409. Does not grant reading life events. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "lifeEventId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonTransitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Life event removed at the expected revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifeEventDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/recurring-debts": {
      "post": {
        "operationId": "createRecurringDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Creates a rule that charges the person the same debt every period. Every period already due in the workspace's calendar is charged at once, one open debt per period. `amount` is a decimal string and `currencyCode` a three-letter code the workspace supports. An optional `requestId` (a UUID the client generates once per intended rule) makes a retry safe: the same `requestId` and payload returns the rule the first attempt created, answering 201 with `charged: 0` because the periods that attempt charged are never charged again; a different payload or person answers 409 `gift_request_conflict`; and once the rule was deleted it answers 409 `gift_request_deleted` and charges nothing. A workspace reset removes the deleted rules' tombstones together with the records, so after a reset the same `requestId` creates the rule again and charges its due periods. Without `requestId`, repeating the request creates a second rule and charges its due periods again. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecurringDebtCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Recurring debt created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringDebtCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/recurring-debts/{recurringDebtId}": {
      "patch": {
        "operationId": "updateRecurringDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Changes, pauses, or resumes a recurring debt. A period already charged is never charged again; resuming skips the periods that passed while it was paused. A change that leaves due periods uncharged charges them at once. An optional `expectedUpdatedAt`, the rule's `updatedAt` from listPersonGiftsAndDebts or the last write, makes the change conditional: when the rule has changed since, it answers 409 `gift_stale`, changes nothing, and charges nothing; it does not count as the one changed field the body must name. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "recurringDebtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecurringDebtUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recurring debt changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringDebtSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteRecurringDebt",
        "description": "Requires a browser session or a personal token with gifts:write. Deletes a recurring debt. The debts it already charged stay, each settled or cancelled on its own. An archived person's gifts and debts can be read but refuse this write.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "gifts:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "recurringDebtId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Recurring debt deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringDebtDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/relationships": {
      "get": {
        "operationId": "listRelationships",
        "description": "Personal tokens require relationships:read. Returns one person's directional relationships and authorized endpoint names in the bound workspace, including archived people. Hidden sections return no relationships; existing cursor checks apply.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "relationships:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Directional relationships for one person profile section",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createRelationship",
        "description": "Personal tokens require relationships:write. Links two active people of the bound workspace with a relationship type of that workspace. One stored edge supplies both directions, so never create the reverse edge as well; creating an edge that already exists answers the existing one with 200 rather than a duplicate. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "relationships:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelationshipCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idempotent existing relationship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipChanged"
                }
              }
            }
          },
          "201": {
            "description": "Relationship created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/relationships/{relationshipId}": {
      "delete": {
        "operationId": "deleteRelationship",
        "description": "Personal tokens require relationships:write. Unlinks one relationship between two active people of the bound workspace without deleting either person; the JSON body must carry the edge's expectedUpdatedAt, and a stale one conflicts. Removing the one stored edge removes both directions. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "relationships:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "relationshipId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonTransitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relationship unlinked without deleting either person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateRelationship",
        "description": "Personal tokens require relationships:write. Changes only the relationship type of one edge between two active people of the bound workspace, using the edge's expectedUpdatedAt; a stale one conflicts. One stored edge supplies both directions. Does not grant reads. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "relationships:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "relationshipId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelationshipUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relationship updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/reminders": {
      "get": {
        "operationId": "listPersonReminders",
        "description": "Personal tokens require reminders:read. Lists one person's calendar reminders, each with its next occurrence, and the person's stay-in-touch cadence, a page at a time. A person outside the token's workspace is not found. Grants are independent; reminders:write does not imply read access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:read",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Person reminder and cadence section",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonReminders"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/restore": {
      "post": {
        "operationId": "restorePerson",
        "description": "Restores an archived person against the expectedUpdatedAt it was decided from. Personal tokens require the people:write grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonTransitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic current-workspace person lifecycle change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonLifecycleChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{personId}/star": {
      "put": {
        "operationId": "starPerson",
        "description": "Stars the person for the whole workspace. Starring a starred person changes nothing, and an archived person's star is read-only. Personal tokens require the people:write grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "The person is starred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonStarChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unstarPerson",
        "description": "Removes the person's workspace star. An unstarred person is unchanged, and an archived person's star is read-only. Personal tokens require the people:write grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:write",
        "parameters": [
          {
            "in": "path",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "The person is no longer starred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonStarChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{primaryId}/merge": {
      "post": {
        "operationId": "mergePeople",
        "description": "Merges the duplicate into the primary; a merge cannot be undone. The body quotes the preview's conflictsDigest, both people's revisions, and confirmed: true; any of them no longer current is refused. Personal tokens require the people:merge grant, which no other grant implies.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:merge",
        "parameters": [
          {
            "in": "path",
            "name": "primaryId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonMergeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Every record of the duplicate now belongs to the primary and the duplicate is deleted; a merge cannot be undone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonMerged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/people/{primaryId}/merge-preview": {
      "get": {
        "operationId": "previewPeopleMerge",
        "description": "What merging the duplicate into the primary would keep, discard, and move, with both people's revisions and the conflictsDigest the merge must quote. Personal tokens require the people:merge grant.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "people:merge",
        "parameters": [
          {
            "in": "path",
            "name": "primaryId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "duplicateId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "What merging the duplicate into the primary would keep, discard, and move, from the same decision the merge takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonMergePreview"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/relationship-types": {
      "get": {
        "operationId": "listRelationshipTypes",
        "description": "Personal tokens require relationships:read. Reads the bound workspace's relationship types and resolves selected same-workspace types. Hidden relationship sections return no options; existing cursor and search bounds apply.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "relationships:read",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false
          },
          {
            "in": "query",
            "name": "selected",
            "schema": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "style": "form",
            "explode": false,
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded active workspace relationship types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipTypeList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reminders": {
      "post": {
        "operationId": "createReminder",
        "description": "Personal tokens require reminders:write. Creates a calendar reminder for one person and schedules its future occurrences. Retry the same requestId and payload to receive the original reminder, so the call is retry-safe; a changed payload under the same requestId conflicts. Archived people are read-only. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReminderCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Calendar reminder created with unique future occurrences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reminders/{reminderId}": {
      "patch": {
        "operationId": "updateReminder",
        "description": "Personal tokens require reminders:write. Edits a calendar reminder about a person in the workspace; any member this permission admits may edit it, not only the one who created it. It changes its title, anchorOn, sendTime, recurrenceUnit, or recurrenceInterval, at least one of them. Read the person's reminders first (listPersonReminders) and send that reminder's updatedAt as expectedUpdatedAt; a reminder changed since answers 409 reminder_stale. Its unattempted future occurrences are replaced from the new schedule, exactly as disabling and re-enabling it would, and in the same request every member who had occurrences of it gets the new schedule's occurrences, each in their own time zone and on their own delivery channels. Delivered and in-flight occurrences are kept as they are; an occurrence already retrying after a failed attempt keeps its remaining retries under the time and title it was minted with; a disabled reminder stays disabled. A reminder generated from an important date answers 409 reminder_managed_by_source: change the date on the person instead. Archived people are read-only. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "path",
            "name": "reminderId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReminderEditInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reminder edited, with its next occurrence under the new schedule, or already equal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteReminder",
        "description": "Personal tokens require reminders:write. Deletes a calendar reminder about a person in the workspace; any member this permission admits may delete it, not only the one who created it. Read the person's reminders first (listPersonReminders) and send that reminder's updatedAt as expectedUpdatedAt; a reminder changed since answers 409 reminder_stale. Its unattempted future occurrences stop exactly as disabling stops them, while delivered and in-flight occurrences are kept as delivery evidence; afterwards it no longer appears in the person's reminders or in Today. Retrying the createReminder request that made it answers 409 reminder_request_deleted rather than recreating it. A reminder generated from an important date answers 409 reminder_managed_by_source: delete or change the date on the person instead. Archived people are read-only. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "path",
            "name": "reminderId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningRevisionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reminder deleted; unattempted future work cancelled and delivery evidence kept",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reminders/{reminderId}/active": {
      "put": {
        "operationId": "setReminderActive",
        "description": "Personal tokens require reminders:write. Disables or re-enables one reminder with active false or true; setting the current state again changes nothing. Disabling cancels its unattempted future occurrences for every member and re-enabling regenerates them for every member who had them. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "path",
            "name": "reminderId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "active"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reminder active state changed; safe unattempted work is cancelled when disabled, in-flight delivery is preserved, and future work is regenerated when re-enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "searchWorkspace",
        "description": "Searches the active workspace's people, notes, activities, journal posts, and tasks, each group bounded and filtered by the rules its owning module lists rows with. People are answered first; when the text groups cannot be, each is marked unavailable and the people still answer. A blank query answers the member's recently viewed people, archived ones included, in the people group, and every other group empty. Personal tokens require the search:read grant, which deliberately returns results from several areas (people, notes, activities, journal posts, and tasks) and permits no other read.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "search:read",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 5,
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "required": false
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "default": "given-name",
              "type": "string",
              "enum": [
                "given-name",
                "family-name"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Grouped workspace search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/personalization/{section}": {
      "get": {
        "operationId": "listPersonalizationEntries",
        "description": "Personal tokens require vocabularies:read. Lists one section's entries with their ids, for use wherever a record names a type, label, tag, or rule: profile-modules, gender-options, contact-method-types, contact-labels, activity-types, emotion-options, life-event-types, relationship-types, pet-categories, reminder-rules, or tags. These are administrative vocabularies: the token's issuer must currently be an owner or admin of the token's workspace, and is otherwise forbidden. The section's capabilities say whether it takes new entries; each entry's capabilities and referenceCount say whether it may be renamed, reordered, disabled (archived), made the default, deleted, or deleted only with a replacement. emotion-options and pet-categories are read-only. Grants are independent; vocabularies:write does not imply read access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "vocabularies:read",
        "parameters": [
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/PersonalizationSection"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Active-workspace personalization section",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalizationList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createPersonalizationEntry",
        "description": "Personal tokens require vocabularies:write. Adds an entry to one section; the body differs by section: tags and contact-labels take name; relationship-types take forwardLabel and reverseLabel; reminder-rules take daysBefore; contact-method-types take name and an optional contactKind; the other sections take name and an optional sortOrder. emotion-options and pet-categories take no new entries. A name already used in the section conflicts. These are administrative vocabularies: the token's issuer must currently be an owner or admin of the token's workspace, and is otherwise forbidden. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "vocabularies:write",
        "parameters": [
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/PersonalizationSection"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonalizationCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Personalization entry created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalizationSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/personalization/{section}/{id}": {
      "delete": {
        "operationId": "deletePersonalizationEntry",
        "description": "Personal tokens require vocabularies:write. Deletes one entry; send expectedUpdatedAt, and an optional replacementId, in the query string. While records still refer to the entry, the answer is replacement required with the count, and the delete succeeds only with a replacementId of another entry of the same section in the same workspace, to which those records move. Required or seeded entries cannot be deleted. These are administrative vocabularies: the token's issuer must currently be an owner or admin of the token's workspace, and is otherwise forbidden. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "vocabularies:write",
        "parameters": [
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/PersonalizationSection"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "expectedUpdatedAt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "replacementId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Personalization entry deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalizationDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updatePersonalizationEntry",
        "description": "Personal tokens require vocabularies:write. Changes one entry; send expectedUpdatedAt from the entry as last read, and a stale revision conflicts. The fields differ by section and are allowed only where the entry's capabilities say so: a name or labels, sortOrder, daysBefore, contactKind, isActive to disable (archive) or re-enable it, and isDefault to make it the default. These are administrative vocabularies: the token's issuer must currently be an owner or admin of the token's workspace, and is otherwise forbidden. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "vocabularies:write",
        "parameters": [
          {
            "in": "path",
            "name": "section",
            "schema": {
              "$ref": "#/components/schemas/PersonalizationSection"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonalizationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Personalization entry updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalizationSaved"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stay-in-touch-cadences": {
      "post": {
        "operationId": "createStayInTouchCadence",
        "description": "Personal tokens require reminders:write. Sets how often to stay in touch with one person. A person has one cadence, so calling this again with a new requestId replaces it and restarts its due date. Retry the same requestId and payload to receive the original answer, so the call is retry-safe; a changed payload under the same requestId conflicts. Archived people are read-only. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CadenceCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Stay-in-touch cadence created or changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CadenceCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stay-in-touch-cadences/{cadenceId}": {
      "delete": {
        "operationId": "deleteStayInTouchCadence",
        "description": "Personal tokens require reminders:write. Removes a person's stay-in-touch cadence, named by the id createStayInTouchCadence and listPersonReminders answer; the id stays the same when the cadence is replaced. Send the cadence's updatedAt from listPersonReminders as expectedUpdatedAt; recording an interaction moves it, so a cadence changed since answers 409 reminder_stale. Its due item leaves Today and the attention queue, and recording an interaction afterwards does not bring it back. Deleting also removes the cadence's request receipts, so re-sending an earlier createStayInTouchCadence requestId creates the cadence again instead of replaying it. Archived people are read-only. Does not grant read access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "reminders:write",
        "parameters": [
          {
            "in": "path",
            "name": "cadenceId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningRevisionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stay-in-touch cadence removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CadenceDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tasks": {
      "get": {
        "operationId": "listTasks",
        "description": "Personal tokens require tasks:read. Lists tasks in the active workspace, optionally filtered by personId, status, and dueBefore (inclusive ISO instant). Continuation cursors are bound to the workspace and all filters; changing a filter requires a new first page. Grants are independent; create and write grants do not imply read access.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:read",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "required": false
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "in": "query",
            "name": "dueBefore",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "personId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "cancelled",
                "completed",
                "open"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded tenant-scoped task list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createTask",
        "description": "Personal tokens require tasks:create. Retry the same requestId and payload to receive the original task; a changed payload conflicts. Does not grant listing, detail, or editing. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:create",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Task created idempotently",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCreated"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}": {
      "get": {
        "operationId": "getTask",
        "description": "Personal tokens require tasks:read. Reads one task through planning's public use case with current membership and workspace validation, including its archived or unavailable linked-person projection.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:read",
        "parameters": [
          {
            "in": "path",
            "name": "taskId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "One task in the active workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskReady"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeTask",
        "description": "Personal tokens require tasks:write. Edits an existing task using expectedUpdatedAt; nullable fields may be explicitly cleared. Archived linked people remain read-only. Does not grant read or create access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:write",
        "parameters": [
          {
            "in": "path",
            "name": "taskId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskChangeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task changed or already equal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTask",
        "description": "Personal tokens require tasks:write. Deletes an existing task. Read it first (getTask or listTasks) and send its updatedAt as expectedUpdatedAt; a task changed since answers 409 task_stale. Afterwards it is not found by getTask and no longer appears in listTasks, Today, the attention queue, or search. Retrying the createTask request that made it answers 409 task_request_deleted rather than recreating it. Archived linked people remain read-only. Does not grant read or create access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:write",
        "parameters": [
          {
            "in": "path",
            "name": "taskId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningRevisionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDeleted"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/completion": {
      "put": {
        "operationId": "setTaskCompletion",
        "description": "Personal tokens require tasks:write. Completes or reopens an existing task idempotently with completed true or false. Archived linked people remain read-only. Does not grant read or create access. Cookie-authenticated writes require the exact configured Origin; bearer writes require no Cookie or Origin.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "tasks:write",
        "parameters": [
          {
            "in": "path",
            "name": "taskId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCompletionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idempotent task completion state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskChanged"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/attention": {
      "get": {
        "operationId": "getTodayAttention",
        "description": "Personal tokens require today:read. A read-only dashboard projection in the member's time zone: overdue, today, and next-seven-days groups plus an upcoming list of open tasks, undelivered or failing reminders, important dates, life events, and stay-in-touch cadences, each with its person. today:read is a deliberate Today grant: it reads these items here without tasks:read, reminders:read, or people grants, and grants no other route.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Unified member-local Today attention and upcoming projection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayAttention"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/favorite-notes": {
      "get": {
        "operationId": "getTodayFavoriteNotes",
        "description": "Requires a browser session or a personal token with today:read. A dashboard projection across people: returns the workspace's favorite notes, including their bodies and the people they are about.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only favorite-note Today region",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayFavoriteNotes"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/recent-activity": {
      "get": {
        "operationId": "getTodayRecentActivity",
        "description": "Requires a browser session or a personal token with today:read. A dashboard projection across people: returns recent notes and activities, including their content and participants.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only recent-activity Today region",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayRecentActivity"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/recent-people": {
      "get": {
        "operationId": "getTodayRecentPeople",
        "description": "The people the member recently viewed, newest first. Personal tokens require the today:read grant and answer the token's own member's views.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded actual member-scoped recently viewed people",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayRecentPeople"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/reminders": {
      "get": {
        "operationId": "getTodayReminders",
        "description": "Personal tokens require today:read. A read-only dashboard projection: reminder occurrences that are due within thirty days, being retried, failed, or need attention, recently sent ones, and stay-in-touch cadences due within thirty days, each with its person. today:read is a deliberate Today grant: it reads these items here without reminders:read, and grants no other route.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Independent Today reminder and cadence regions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayReminders"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today/tasks": {
      "get": {
        "operationId": "getTodayTasks",
        "description": "Personal tokens require today:read. A read-only dashboard projection: up to twenty open tasks due within thirty days, overdue ones included, earliest first. today:read is a deliberate Today grant: it reads these tasks here without tasks:read, and grants no other route.",
        "security": [
          {
            "kinship_api_token": []
          }
        ],
        "x-kinship-token-scope": "today:read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional; must match the token's bound workspace. Cannot switch workspaces.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only due-task Today region",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayTasks"
                }
              }
            }
          },
          "400": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "kinship_api_token": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "kin_pat",
        "description": "Workspace-bound personal API token accepted only for explicitly granted first-party scopes."
      }
    },
    "schemas": {
      "ActivityChangeInput": {
        "type": "object",
        "properties": {
          "activityTypeId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "emotionIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The updatedAt the client last read for this record; a changed record answers 409."
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "participantIds": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "ActivityInteraction": {
        "type": "object",
        "properties": {
          "activityType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "emotions": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "activity"
          },
          "participants": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionParticipant"
            }
          },
          "summary": {
            "type": "string"
          },
          "updatedAt": {
            "description": "The record's revision; send it back as expectedUpdatedAt to edit or delete it.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "emotions",
          "happenedAt",
          "id",
          "kind",
          "participants",
          "summary"
        ],
        "additionalProperties": false
      },
      "ActivityInteractionInput": {
        "type": "object",
        "properties": {
          "activityTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "emotionIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "const": "activity"
          },
          "participantIds": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Client retry key mapped deterministically to a distinct workspace-scoped aggregate identifier; it is not the returned record id."
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "happenedAt",
          "kind",
          "participantIds",
          "requestId",
          "summary"
        ],
        "additionalProperties": false
      },
      "ActivityOrNoteInteraction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ActivityInteraction"
          },
          {
            "$ref": "#/components/schemas/NoteInteraction"
          }
        ]
      },
      "ActivityReport": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityOrNoteInteraction"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "person": {
            "$ref": "#/components/schemas/InteractionParticipant"
          },
          "status": {
            "type": "string",
            "enum": [
              "archived",
              "ready"
            ]
          }
        },
        "required": [
          "items",
          "person",
          "status"
        ],
        "additionalProperties": false
      },
      "AddressFact": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "maxLength": 200
          },
          "displayName": {
            "type": "string",
            "maxLength": 200
          },
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "postalCode": {
            "type": "string",
            "maxLength": 50
          },
          "region": {
            "type": "string",
            "maxLength": 200
          },
          "street": {
            "type": "string",
            "maxLength": 500
          },
          "section": {
            "const": "addresses"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "section"
        ],
        "additionalProperties": false
      },
      "AddressFactCreateInput": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "maxLength": 200
          },
          "displayName": {
            "type": "string",
            "maxLength": 200
          },
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "postalCode": {
            "type": "string",
            "maxLength": 50
          },
          "region": {
            "type": "string",
            "maxLength": 200
          },
          "street": {
            "type": "string",
            "maxLength": 500
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "addresses"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "city"
            ],
            "properties": {
              "city": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "country"
            ],
            "properties": {
              "country": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "displayName"
            ],
            "properties": {
              "displayName": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "postalCode"
            ],
            "properties": {
              "postalCode": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "region"
            ],
            "properties": {
              "region": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "street"
            ],
            "properties": {
              "street": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "AddressFactUpdateInput": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "maxLength": 200
          },
          "displayName": {
            "type": "string",
            "maxLength": 200
          },
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "postalCode": {
            "type": "string",
            "maxLength": 50
          },
          "region": {
            "type": "string",
            "maxLength": 200
          },
          "street": {
            "type": "string",
            "maxLength": 500
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "addresses"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "city"
            ],
            "properties": {
              "city": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "country"
            ],
            "properties": {
              "country": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "displayName"
            ],
            "properties": {
              "displayName": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "postalCode"
            ],
            "properties": {
              "postalCode": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "region"
            ],
            "properties": {
              "region": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "street"
            ],
            "properties": {
              "street": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "ApiTokenContext": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "token": {
            "type": "object",
            "properties": {
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "scopes": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "people:read",
                    "people:profile:read",
                    "relationships:read",
                    "tasks:read",
                    "tasks:create",
                    "tasks:write",
                    "interactions:create",
                    "people:write",
                    "people:delete",
                    "people:merge",
                    "relationships:write",
                    "interactions:read",
                    "interactions:write",
                    "reminders:read",
                    "reminders:write",
                    "journal:read",
                    "journal:write",
                    "gifts:read",
                    "gifts:write",
                    "files:read",
                    "files:write",
                    "search:read",
                    "today:read",
                    "vocabularies:read",
                    "vocabularies:write"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "scopes"
            ],
            "additionalProperties": false
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "memberId",
          "role",
          "token",
          "workspaceId"
        ],
        "additionalProperties": false
      },
      "BlockingWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "CadenceCreateInput": {
        "type": "object",
        "properties": {
          "intervalCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "intervalUnit": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "intervalCount",
          "intervalUnit",
          "personId",
          "requestId"
        ],
        "additionalProperties": false
      },
      "CadenceCreated": {
        "type": "object",
        "properties": {
          "cadence": {
            "$ref": "#/components/schemas/StayInTouchCadence"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "cadence",
          "status"
        ],
        "additionalProperties": false
      },
      "CadenceDeleted": {
        "type": "object",
        "properties": {
          "cadenceId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "cadenceId",
          "status"
        ],
        "additionalProperties": false
      },
      "CallChangeInput": {
        "type": "object",
        "properties": {
          "calledAt": {
            "type": "string",
            "format": "date-time"
          },
          "contactWasCaller": {
            "type": "boolean"
          },
          "content": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "emotionIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The updatedAt the client last read for this record; a changed record answers 409."
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "CallInteraction": {
        "type": "object",
        "properties": {
          "calledAt": {
            "type": "string",
            "format": "date-time"
          },
          "contactWasCaller": {
            "type": "boolean"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "emotions": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "call"
          },
          "person": {
            "$ref": "#/components/schemas/InteractionParticipant"
          },
          "updatedAt": {
            "description": "The record's revision; send it back as expectedUpdatedAt to edit or delete it.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "calledAt",
          "contactWasCaller",
          "createdAt",
          "emotions",
          "id",
          "kind",
          "person"
        ],
        "additionalProperties": false
      },
      "CallInteractionInput": {
        "type": "object",
        "properties": {
          "calledAt": {
            "type": "string",
            "format": "date-time"
          },
          "contactWasCaller": {
            "type": "boolean"
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "emotionIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "kind": {
            "const": "call"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Client retry key mapped deterministically to a distinct workspace-scoped aggregate identifier; it is not the returned record id."
          }
        },
        "required": [
          "calledAt",
          "contactWasCaller",
          "kind",
          "personId",
          "requestId"
        ],
        "additionalProperties": false
      },
      "CommunicationList": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CallInteraction"
                },
                {
                  "$ref": "#/components/schemas/ConversationInteraction"
                }
              ]
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "additionalProperties": false
      },
      "CommunicationMessage": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "writtenAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "content",
          "direction",
          "id",
          "writtenAt"
        ],
        "additionalProperties": false
      },
      "CommunicationOptions": {
        "type": "object",
        "properties": {
          "availability": {
            "type": "object",
            "properties": {
              "call": {
                "type": "boolean"
              },
              "conversation": {
                "type": "boolean"
              }
            },
            "required": [
              "call",
              "conversation"
            ],
            "additionalProperties": false
          },
          "channelTypes": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "emotions": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "availability",
          "channelTypes",
          "emotions",
          "status"
        ],
        "additionalProperties": false
      },
      "ContactMethodFact": {
        "type": "object",
        "properties": {
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "section": {
            "const": "contact-methods"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "typeId",
          "value",
          "section"
        ],
        "additionalProperties": false
      },
      "ContactMethodFactCreateInput": {
        "type": "object",
        "properties": {
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "contact-methods"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "typeId",
          "value",
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false
      },
      "ContactMethodFactUpdateInput": {
        "type": "object",
        "properties": {
          "isPrimary": {
            "type": "boolean"
          },
          "labelIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "contact-methods"
          }
        },
        "required": [
          "isPrimary",
          "labelIds",
          "typeId",
          "value",
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false
      },
      "ContactMethodKind": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "url",
          "social",
          "im",
          "username",
          "custom"
        ]
      },
      "ConversationChangeInput": {
        "type": "object",
        "properties": {
          "channelTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "contactMethodId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The updatedAt the client last read for this record; a changed record answers 409."
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "messages": {
            "description": "Replaces every message of the conversation; an empty list removes them all.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 10000
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "inbound",
                    "outbound"
                  ]
                },
                "writtenAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "content",
                "direction",
                "writtenAt"
              ],
              "additionalProperties": false
            }
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "ConversationInteraction": {
        "type": "object",
        "properties": {
          "channelType": {
            "$ref": "#/components/schemas/InteractionOption"
          },
          "contactMethod": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "value"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "conversation"
          },
          "messages": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunicationMessage"
            }
          },
          "person": {
            "$ref": "#/components/schemas/InteractionParticipant"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "description": "The record's revision; send it back as expectedUpdatedAt to edit or delete it.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAt",
          "happenedAt",
          "id",
          "kind",
          "messages",
          "person"
        ],
        "additionalProperties": false
      },
      "ConversationInteractionInput": {
        "type": "object",
        "properties": {
          "channelTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "contactMethodId": {
            "type": "string",
            "format": "uuid"
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "const": "conversation"
          },
          "messages": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 10000
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "inbound",
                    "outbound"
                  ]
                },
                "writtenAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "content",
                "direction",
                "writtenAt"
              ],
              "additionalProperties": false
            }
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Client retry key mapped deterministically to a distinct workspace-scoped aggregate identifier; it is not the returned record id."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "channelTypeId",
          "happenedAt",
          "kind",
          "personId",
          "requestId"
        ],
        "additionalProperties": false
      },
      "Debt": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurrenceOn": {
            "type": "string",
            "format": "date"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "maxLength": 10000
          },
          "recurringDebtId": {
            "type": "string",
            "format": "uuid"
          },
          "settledAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "settled",
              "cancelled"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "direction",
          "id",
          "personId",
          "status",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "DebtCreateInput": {
        "type": "object",
        "properties": {
          "settlementReason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "settlementPhotoFileId": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "settled",
              "cancelled"
            ]
          }
        },
        "required": [
          "amount",
          "currencyCode",
          "direction",
          "status"
        ],
        "additionalProperties": false
      },
      "DebtCreated": {
        "type": "object",
        "properties": {
          "debt": {
            "$ref": "#/components/schemas/Debt"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "debt",
          "status"
        ],
        "additionalProperties": false
      },
      "DebtDeleted": {
        "type": "object",
        "properties": {
          "debtId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "debtId",
          "status"
        ],
        "additionalProperties": false
      },
      "DebtSaved": {
        "type": "object",
        "properties": {
          "debt": {
            "$ref": "#/components/schemas/Debt"
          },
          "status": {
            "type": "string",
            "enum": [
              "saved",
              "unchanged"
            ]
          }
        },
        "required": [
          "debt",
          "status"
        ],
        "additionalProperties": false
      },
      "DebtSettlement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "settledAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string",
            "maxLength": 10000
          },
          "photoFileId": {
            "type": "string",
            "format": "uuid"
          },
          "photoFilename": {
            "type": "string",
            "maxLength": 500
          },
          "photoAvailable": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "settledAt"
        ],
        "additionalProperties": false
      },
      "DebtSettlementList": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "settlements": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DebtSettlement"
            }
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "settlements"
        ],
        "additionalProperties": false
      },
      "DebtStatusInput": {
        "type": "object",
        "properties": {
          "settlementReason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "settlementPhotoFileId": {
            "type": "string",
            "format": "uuid"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "settled",
              "cancelled"
            ]
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "DebtUpdateInput": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "minProperties": 2
      },
      "FirstMeetingFact": {
        "type": "object",
        "properties": {
          "introducedByPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "placeText": {
            "type": "string",
            "maxLength": 500
          },
          "section": {
            "const": "first-meeting"
          }
        },
        "required": [
          "section"
        ],
        "additionalProperties": false
      },
      "FirstMeetingFactCreateInput": {
        "type": "object",
        "properties": {
          "introducedByPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "placeText": {
            "type": "string",
            "maxLength": 500
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "first-meeting"
          }
        },
        "required": [
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "introducedByPersonId"
            ]
          },
          {
            "required": [
              "notes"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "placeText"
            ],
            "properties": {
              "placeText": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "FirstMeetingFactUpdateInput": {
        "type": "object",
        "properties": {
          "introducedByPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "placeText": {
            "type": "string",
            "maxLength": 500
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "first-meeting"
          }
        },
        "required": [
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "introducedByPersonId"
            ]
          },
          {
            "required": [
              "notes"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          },
          {
            "required": [
              "placeText"
            ],
            "properties": {
              "placeText": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "FoodPreferencesFact": {
        "type": "object",
        "properties": {
          "foodPreferences": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "section": {
            "const": "food-preferences"
          }
        },
        "required": [
          "section"
        ],
        "additionalProperties": false
      },
      "FoodPreferencesFactCreateInput": {
        "type": "object",
        "properties": {
          "foodPreferences": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "food-preferences"
          }
        },
        "required": [
          "foodPreferences",
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false
      },
      "FoodPreferencesFactUpdateInput": {
        "type": "object",
        "properties": {
          "foodPreferences": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "food-preferences"
          }
        },
        "required": [
          "foodPreferences",
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false
      },
      "Gift": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "attachmentFileId": {
            "type": "string",
            "format": "uuid"
          },
          "comment": {
            "type": "string",
            "maxLength": 10000
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "eventAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "recipientPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "idea",
              "planned",
              "given",
              "received",
              "archived"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        "required": [
          "createdAt",
          "id",
          "name",
          "personId",
          "status",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "GiftCreateInput": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "attachmentFileId": {
            "type": "string",
            "format": "uuid"
          },
          "comment": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$"
          },
          "eventAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "recipientPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "idea",
              "planned",
              "given",
              "received",
              "archived"
            ]
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        "required": [
          "name",
          "status"
        ],
        "additionalProperties": false
      },
      "GiftCreated": {
        "type": "object",
        "properties": {
          "gift": {
            "$ref": "#/components/schemas/Gift"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "gift",
          "status"
        ],
        "additionalProperties": false
      },
      "GiftDebtList": {
        "type": "object",
        "properties": {
          "debts": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Debt"
            }
          },
          "defaultCurrencyCode": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "gifts": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Gift"
            }
          },
          "nextDebtCursor": {
            "type": "string"
          },
          "nextGiftCursor": {
            "type": "string"
          },
          "recurringDebts": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecurringDebt"
            }
          },
          "status": {
            "const": "ready"
          },
          "supportedCurrencyCodes": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        },
        "required": [
          "debts",
          "defaultCurrencyCode",
          "gifts",
          "recurringDebts",
          "status",
          "supportedCurrencyCodes"
        ],
        "additionalProperties": false
      },
      "GiftDeleteInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "GiftDeleted": {
        "type": "object",
        "properties": {
          "giftId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "giftId",
          "status"
        ],
        "additionalProperties": false
      },
      "GiftSaved": {
        "type": "object",
        "properties": {
          "gift": {
            "$ref": "#/components/schemas/Gift"
          },
          "status": {
            "type": "string",
            "enum": [
              "saved",
              "unchanged"
            ]
          }
        },
        "required": [
          "gift",
          "status"
        ],
        "additionalProperties": false
      },
      "GiftStatusInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "idea",
              "planned",
              "given",
              "received",
              "archived"
            ]
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "GiftUpdateInput": {
        "type": "object",
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "attachmentFileId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "comment": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "currencyCode": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z]{3}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "eventAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "recipientPersonId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "minProperties": 2
      },
      "ImportantDate": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "isAgeBased": {
            "type": "boolean"
          },
          "isYearApproximate": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "birthday",
              "custom",
              "deceased",
              "first_met"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "scheduling": {
            "type": "string",
            "enum": [
              "annual-reminder",
              "not-schedulable"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "isAgeBased",
          "isYearApproximate",
          "kind",
          "precision",
          "createdAt",
          "id",
          "personId",
          "scheduling",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ImportantDateChanged": {
        "type": "object",
        "properties": {
          "date": {
            "$ref": "#/components/schemas/ImportantDate"
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ]
          }
        },
        "required": [
          "date",
          "status"
        ],
        "additionalProperties": false
      },
      "ImportantDateDeleted": {
        "type": "object",
        "properties": {
          "dateId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "dateId",
          "status"
        ],
        "additionalProperties": false
      },
      "ImportantDateInput": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "isAgeBased": {
            "type": "boolean"
          },
          "isYearApproximate": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "birthday",
              "custom",
              "deceased",
              "first_met"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          }
        },
        "required": [
          "isAgeBased",
          "isYearApproximate",
          "kind",
          "precision"
        ],
        "additionalProperties": false
      },
      "ImportantDateList": {
        "type": "object",
        "properties": {
          "dates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportantDate"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "archived"
            ]
          }
        },
        "required": [
          "dates",
          "status"
        ],
        "additionalProperties": false
      },
      "ImportantDateUpdateInput": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "isAgeBased": {
            "type": "boolean"
          },
          "isYearApproximate": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "birthday",
              "custom",
              "deceased",
              "first_met"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "isAgeBased",
          "isYearApproximate",
          "kind",
          "precision",
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "Interaction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ActivityInteraction"
          },
          {
            "$ref": "#/components/schemas/NoteInteraction"
          },
          {
            "$ref": "#/components/schemas/CallInteraction"
          },
          {
            "$ref": "#/components/schemas/ConversationInteraction"
          }
        ]
      },
      "InteractionCreated": {
        "type": "object",
        "properties": {
          "record": {
            "$ref": "#/components/schemas/Interaction"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "record",
          "status"
        ],
        "additionalProperties": false
      },
      "InteractionDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "activity",
              "call",
              "conversation",
              "note"
            ]
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "id",
          "kind",
          "status"
        ],
        "additionalProperties": false
      },
      "InteractionInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ActivityInteractionInput"
          },
          {
            "$ref": "#/components/schemas/NoteInteractionInput"
          },
          {
            "$ref": "#/components/schemas/CallInteractionInput"
          },
          {
            "$ref": "#/components/schemas/ConversationInteractionInput"
          }
        ]
      },
      "InteractionOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "InteractionOptions": {
        "type": "object",
        "properties": {
          "activityTypes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "activityTypesNextCursor": {
            "type": "string"
          },
          "availability": {
            "type": "object",
            "properties": {
              "activity": {
                "type": "boolean"
              },
              "note": {
                "type": "boolean"
              }
            },
            "required": [
              "activity",
              "note"
            ],
            "additionalProperties": false
          },
          "emotions": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionOption"
            }
          },
          "emotionsNextCursor": {
            "type": "string"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "activityTypes",
          "availability",
          "emotions",
          "status"
        ],
        "additionalProperties": false
      },
      "InteractionParticipant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "InteractionRemovalInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The updatedAt the client last read for this record; a changed record answers 409."
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "InteractionSaved": {
        "type": "object",
        "properties": {
          "record": {
            "$ref": "#/components/schemas/Interaction"
          },
          "status": {
            "const": "saved"
          }
        },
        "required": [
          "record",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalActivityItem": {
        "type": "object",
        "properties": {
          "activity": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "participants": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InteractionParticipant"
                }
              },
              "summary": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "participants",
              "summary"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "const": "activity"
          }
        },
        "required": [
          "activity",
          "id",
          "occurredAt",
          "type"
        ],
        "additionalProperties": false
      },
      "JournalActivityLinked": {
        "type": "object",
        "properties": {
          "activityId": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "activityId",
          "id",
          "occurredAt",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalDayRatingInput": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "ratedOn": {
            "type": "string",
            "format": "date"
          },
          "rating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          }
        },
        "required": [
          "ratedOn",
          "rating"
        ],
        "additionalProperties": false
      },
      "JournalDayRatingItem": {
        "type": "object",
        "properties": {
          "dayRating": {
            "type": "object",
            "properties": {
              "comment": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ratedOn": {
                "type": "string",
                "format": "date"
              },
              "rating": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5
              }
            },
            "required": [
              "id",
              "ratedOn",
              "rating"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "const": "day-rating"
          }
        },
        "required": [
          "dayRating",
          "id",
          "occurredAt",
          "type"
        ],
        "additionalProperties": false
      },
      "JournalDayRatingSaved": {
        "type": "object",
        "properties": {
          "rating": {
            "$ref": "#/components/schemas/JournalStoredDayRating"
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ]
          }
        },
        "required": [
          "rating",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalDeleted": {
        "type": "object",
        "properties": {
          "itemType": {
            "type": "string",
            "enum": [
              "activity",
              "day-rating",
              "post"
            ]
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "itemType",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalItemReady": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/JournalTimelineItem"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "item",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalLinkableActivity": {
        "type": "object",
        "properties": {
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "happenedAt",
          "id",
          "summary"
        ],
        "additionalProperties": false
      },
      "JournalPostCreated": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/JournalStoredPost"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "post",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalPostInput": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50000
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestId": {
            "description": "Optional client-generated UUID that makes the create safe to retry: reuse it when retrying the same create, and send a new one for a different post.",
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "body",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "JournalPostItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "post": {
            "type": "object",
            "properties": {
              "body": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "title": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "body",
              "id",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "type": {
            "const": "post"
          }
        },
        "required": [
          "id",
          "occurredAt",
          "post",
          "type"
        ],
        "additionalProperties": false
      },
      "JournalPostUpdateInput": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50000
          },
          "expectedUpdatedAt": {
            "description": "Optional revision check: the post's updatedAt exactly as a read returned it. When it is no longer the post's revision the edit is refused (409) and nothing changes.",
            "type": "string",
            "format": "date-time"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "body",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "JournalPostUpdated": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/JournalStoredPost"
          },
          "status": {
            "const": "updated"
          }
        },
        "required": [
          "post",
          "status"
        ],
        "additionalProperties": false
      },
      "JournalStoredDayRating": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ratedOn": {
            "type": "string",
            "format": "date"
          },
          "rating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAt",
          "id",
          "ratedOn",
          "rating",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "JournalStoredPost": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "body",
          "createdAt",
          "id",
          "occurredAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "JournalTimelineItem": {
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "activity": "#/components/schemas/JournalActivityItem",
            "day-rating": "#/components/schemas/JournalDayRatingItem",
            "post": "#/components/schemas/JournalPostItem"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/JournalActivityItem"
          },
          {
            "$ref": "#/components/schemas/JournalDayRatingItem"
          },
          {
            "$ref": "#/components/schemas/JournalPostItem"
          }
        ]
      },
      "JournalTimelineList": {
        "type": "object",
        "properties": {
          "activities": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLinkableActivity"
            }
          },
          "items": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalTimelineItem"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "activities",
          "items",
          "status"
        ],
        "additionalProperties": false
      },
      "McpMessage": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "description": "The MCP method, such as initialize, tools/list, or tools/call. Absent on a response.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "params": {
            "type": "object",
            "additionalProperties": {}
          },
          "result": {
            "type": "object",
            "additionalProperties": {}
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {}
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "jsonrpc"
        ],
        "additionalProperties": {}
      },
      "NoteChangeInput": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The updatedAt the client last read for this record; a changed record answers 409."
          },
          "isFavorited": {
            "description": "Whether the note is one of Today's favorite notes.",
            "type": "boolean"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "NoteInteraction": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isFavorited": {
            "type": "boolean"
          },
          "kind": {
            "const": "note"
          },
          "person": {
            "$ref": "#/components/schemas/InteractionParticipant"
          },
          "participants": {
            "minItems": 1,
            "maxItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InteractionParticipant"
            }
          },
          "updatedAt": {
            "description": "The record's revision; send it back as expectedUpdatedAt to edit or delete it.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "body",
          "createdAt",
          "id",
          "isFavorited",
          "kind"
        ],
        "additionalProperties": false
      },
      "NoteInteractionInput": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "isFavorited": {
            "type": "boolean"
          },
          "kind": {
            "const": "note"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Client retry key mapped deterministically to a distinct workspace-scoped aggregate identifier; it is not the returned record id."
          }
        },
        "required": [
          "body",
          "kind",
          "personId",
          "requestId"
        ],
        "additionalProperties": false
      },
      "OccupationFact": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "endOn": {
            "type": "string",
            "format": "date"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string",
            "maxLength": 200
          },
          "startOn": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "\\S"
          },
          "section": {
            "const": "work"
          }
        },
        "required": [
          "isCurrent",
          "title",
          "section"
        ],
        "additionalProperties": false
      },
      "OccupationFactCreateInput": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "endOn": {
            "type": "string",
            "format": "date"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string",
            "maxLength": 200
          },
          "startOn": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "work"
          }
        },
        "required": [
          "isCurrent",
          "title",
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false
      },
      "OccupationFactUpdateInput": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "endOn": {
            "type": "string",
            "format": "date"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string",
            "maxLength": 200
          },
          "startOn": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "\\S"
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "work"
          }
        },
        "required": [
          "isCurrent",
          "title",
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false
      },
      "PeopleBulkInput": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "archive",
              "restore",
              "tag",
              "untag"
            ]
          },
          "personIds": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Distinct people in the active workspace."
          },
          "tagId": {
            "description": "The workspace tag to add or remove; only tagging names one.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "action",
          "personIds"
        ],
        "additionalProperties": false
      },
      "PeopleBulkItemResult": {
        "type": "object",
        "properties": {
          "code": {
            "description": "Why a failed person was refused.",
            "type": "string",
            "enum": [
              "archived_write_rejected",
              "forbidden",
              "invalid",
              "not_found",
              "section_hidden",
              "stale",
              "tag_unavailable",
              "unavailable"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "done",
              "failed",
              "skipped",
              "unchanged"
            ]
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "outcome",
          "personId"
        ],
        "additionalProperties": false
      },
      "PeopleBulkResult": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "archive",
              "restore",
              "tag",
              "untag"
            ]
          },
          "results": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleBulkItemResult"
            }
          },
          "summary": {
            "type": "object",
            "properties": {
              "done": {
                "type": "integer",
                "minimum": 0
              },
              "failed": {
                "type": "integer",
                "minimum": 0
              },
              "skipped": {
                "type": "integer",
                "minimum": 0
              },
              "unchanged": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "done",
              "failed",
              "skipped",
              "unchanged"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "action",
          "results",
          "summary"
        ],
        "additionalProperties": false
      },
      "PeopleDirectoryPage": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleDirectoryPerson"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "selected": {
            "$ref": "#/components/schemas/PeopleDirectoryPerson"
          }
        },
        "required": [
          "status",
          "lifecycle",
          "people"
        ],
        "additionalProperties": false
      },
      "PeopleDirectoryPerson": {
        "type": "object",
        "properties": {
          "avatar": {
            "$ref": "#/components/schemas/PersonAvatar"
          },
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isPartial": {
            "type": "boolean"
          },
          "isStarred": {
            "type": "boolean"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "middleName": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "tagCount": {
            "type": "integer",
            "minimum": 0
          },
          "tags": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleDirectoryTag"
            }
          }
        },
        "required": [
          "givenName",
          "id",
          "isPartial",
          "isStarred",
          "lifecycle",
          "tagCount",
          "tags"
        ],
        "additionalProperties": false
      },
      "PeopleDirectoryTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "PeopleDuplicateDismissalInput": {
        "type": "object",
        "properties": {
          "personIds": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "personIds"
        ],
        "additionalProperties": false
      },
      "PeopleDuplicateDismissed": {
        "type": "object",
        "properties": {
          "personIds": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "status": {
            "const": "dismissed"
          }
        },
        "required": [
          "personIds",
          "status"
        ],
        "additionalProperties": false
      },
      "PeopleDuplicatePair": {
        "type": "object",
        "properties": {
          "people": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleDuplicatePerson"
            }
          },
          "reasons": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "name",
                "phone"
              ]
            }
          }
        },
        "required": [
          "people",
          "reasons"
        ],
        "additionalProperties": false
      },
      "PeopleDuplicatePerson": {
        "type": "object",
        "properties": {
          "avatar": {
            "$ref": "#/components/schemas/PersonAvatar"
          },
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "middleName": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "givenName",
          "id",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PeopleDuplicates": {
        "type": "object",
        "properties": {
          "pairs": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleDuplicatePair"
            }
          },
          "status": {
            "const": "ready"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "pairs",
          "status",
          "truncated"
        ],
        "additionalProperties": false
      },
      "PeopleTagFacet": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "tags": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleTagFacetEntry"
            }
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "lifecycle",
          "tags",
          "truncated"
        ],
        "additionalProperties": false
      },
      "PeopleTagFacetEntry": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 1
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "count",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "PeopleTagOptionsPage": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "options": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleDirectoryTag"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "selected": {
            "$ref": "#/components/schemas/PeopleDirectoryTag"
          }
        },
        "required": [
          "status",
          "options"
        ],
        "additionalProperties": false
      },
      "PersonAvatar": {
        "type": "object",
        "properties": {
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-f]{6}$"
          },
          "imageUrl": {
            "type": "string",
            "pattern": "^\\/api\\/v1\\/people\\/[0-9a-f-]{36}\\/files\\/[0-9a-f-]{36}\\/content$"
          }
        },
        "required": [
          "color"
        ],
        "additionalProperties": false
      },
      "PersonCreated": {
        "type": "object",
        "properties": {
          "status": {
            "const": "created"
          },
          "person": {
            "$ref": "#/components/schemas/PersonIdentity"
          },
          "next": {
            "type": "string",
            "pattern": "^\\/app\\/people\\/[0-9a-f-]+$"
          }
        },
        "required": [
          "status",
          "person",
          "next"
        ],
        "additionalProperties": false
      },
      "PersonDeleteInput": {
        "type": "object",
        "properties": {
          "confirmation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "confirmation",
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "PersonDeleted": {
        "type": "object",
        "properties": {
          "next": {
            "const": "/app/people"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "next",
          "personId",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonDeletionImpact": {
        "type": "object",
        "properties": {
          "impact": {
            "type": "object",
            "properties": {
              "confirmation": {
                "type": "string"
              },
              "dependentRecordPolicy": {
                "const": "retained"
              },
              "person": {
                "$ref": "#/components/schemas/PersonLifecycleIdentity"
              }
            },
            "required": [
              "confirmation",
              "dependentRecordPolicy",
              "person"
            ],
            "additionalProperties": false
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "impact",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonEditInput": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "familyName": {
            "type": "string",
            "maxLength": 200
          },
          "genderOptionId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "const": ""
              }
            ]
          },
          "givenName": {
            "type": "string",
            "maxLength": 200
          },
          "isDeceased": {
            "type": "boolean"
          },
          "isPartial": {
            "type": "boolean"
          },
          "middleName": {
            "type": "string",
            "maxLength": 200
          },
          "nickname": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "expectedUpdatedAt",
          "givenName",
          "isPartial"
        ],
        "additionalProperties": false
      },
      "PersonFile": {
        "type": "object",
        "properties": {
          "byteSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10485760
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "missing",
              "processing",
              "quarantined"
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "byteSize",
          "createdAt",
          "fileId",
          "filename",
          "kind",
          "mimeType",
          "personId",
          "status",
          "title"
        ],
        "additionalProperties": false
      },
      "PersonFileCreated": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/PersonFile"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "file",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonFileList": {
        "type": "object",
        "properties": {
          "files": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonFile"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "files",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonIdentity": {
        "type": "object",
        "properties": {
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isPartial": {
            "type": "boolean"
          },
          "middleName": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "givenName",
          "id",
          "isPartial",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PersonIdentityReady": {
        "type": "object",
        "properties": {
          "person": {
            "$ref": "#/components/schemas/PersonIdentity"
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "archived"
            ]
          }
        },
        "required": [
          "person",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonInput": {
        "type": "object",
        "properties": {
          "duplicateOverride": {
            "type": "boolean"
          },
          "familyName": {
            "type": "string",
            "maxLength": 200
          },
          "givenName": {
            "type": "string",
            "maxLength": 200
          },
          "isPartial": {
            "type": "boolean"
          },
          "middleName": {
            "type": "string",
            "maxLength": 200
          },
          "nickname": {
            "type": "string",
            "maxLength": 200
          },
          "requestId": {
            "description": "Optional client-generated UUID that makes the create safe to retry: reuse it when retrying the same create, and send a new one for a different person.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "givenName",
          "isPartial"
        ],
        "additionalProperties": false
      },
      "PersonLifeEvent": {
        "type": "object",
        "properties": {
          "date": {
            "$ref": "#/components/schemas/PersonLifeEventDate"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "typeName": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "date",
          "id",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventChanged": {
        "type": "object",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/PersonLifeEvent"
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ]
          }
        },
        "required": [
          "event",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventDate": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "happenedAt": {
            "type": "string",
            "format": "date-time"
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          }
        },
        "required": [
          "precision"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventDeleted": {
        "type": "object",
        "properties": {
          "lifeEventId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "lifeEventId",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventInput": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "note": {
            "type": "string",
            "maxLength": 10000
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          }
        },
        "required": [
          "precision"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventUpdateInput": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "note": {
            "type": "string",
            "maxLength": 10000
          },
          "precision": {
            "type": "string",
            "enum": [
              "day",
              "full",
              "month",
              "month_day",
              "unknown",
              "year",
              "year_month"
            ]
          },
          "typeId": {
            "type": "string",
            "format": "uuid"
          },
          "year": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "precision",
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "PersonLifeEventsReady": {
        "type": "object",
        "properties": {
          "events": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonLifeEvent"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "hidden",
              "ready"
            ]
          },
          "types": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonLifeEventType"
            }
          }
        },
        "required": [
          "events",
          "status",
          "types"
        ],
        "additionalProperties": false
      },
      "PersonLifecycleChanged": {
        "type": "object",
        "properties": {
          "person": {
            "$ref": "#/components/schemas/PersonLifecycleIdentity"
          },
          "status": {
            "type": "string",
            "enum": [
              "updated",
              "archived",
              "restored"
            ]
          }
        },
        "required": [
          "person",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonLifecycleIdentity": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "familyName": {
            "type": "string"
          },
          "genderOptionId": {
            "type": "string",
            "format": "uuid"
          },
          "givenName": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isDeceased": {
            "type": "boolean"
          },
          "isPartial": {
            "type": "boolean"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "active",
              "archived",
              "deleted"
            ]
          },
          "middleName": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "givenName",
          "id",
          "isDeceased",
          "isPartial",
          "lifecycle",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PersonMergeConflict": {
        "type": "object",
        "properties": {
          "discarded": {
            "type": "string"
          },
          "fact": {
            "type": "string",
            "enum": [
              "avatar",
              "birthday",
              "deceased",
              "first-meeting",
              "first_met",
              "stay-in-touch"
            ]
          },
          "kept": {
            "type": "string"
          }
        },
        "required": [
          "discarded",
          "fact",
          "kept"
        ],
        "additionalProperties": false
      },
      "PersonMergeInput": {
        "type": "object",
        "properties": {
          "confirmed": {
            "const": true
          },
          "conflictsDigest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "duplicateId": {
            "type": "string",
            "format": "uuid"
          },
          "duplicateRevision": {
            "type": "string",
            "format": "date-time"
          },
          "primaryRevision": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "confirmed",
          "conflictsDigest",
          "duplicateId",
          "duplicateRevision",
          "primaryRevision"
        ],
        "additionalProperties": false
      },
      "PersonMergePreview": {
        "type": "object",
        "properties": {
          "conflicts": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonMergeConflict"
            }
          },
          "conflictsDigest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "duplicate": {
            "$ref": "#/components/schemas/PersonLifecycleIdentity"
          },
          "moves": {
            "type": "integer",
            "minimum": 0
          },
          "primary": {
            "$ref": "#/components/schemas/PersonLifecycleIdentity"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "conflicts",
          "conflictsDigest",
          "duplicate",
          "moves",
          "primary",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonMerged": {
        "type": "object",
        "properties": {
          "duplicateId": {
            "type": "string",
            "format": "uuid"
          },
          "moved": {
            "type": "integer",
            "minimum": 0
          },
          "next": {
            "type": "string",
            "pattern": "^\\/app\\/people\\/[0-9a-f-]{36}$"
          },
          "person": {
            "$ref": "#/components/schemas/PersonLifecycleIdentity"
          },
          "status": {
            "const": "merged"
          }
        },
        "required": [
          "duplicateId",
          "moved",
          "next",
          "person",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonReminders": {
        "type": "object",
        "properties": {
          "cadences": {
            "maxItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StayInTouchCadence"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "reminders": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "cadences",
          "reminders",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonStarChanged": {
        "type": "object",
        "properties": {
          "isStarred": {
            "type": "boolean"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "isStarred",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonTransitionInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "PersonalizationContactTypeCreate": {
        "type": "object",
        "properties": {
          "contactKind": {
            "$ref": "#/components/schemas/ContactMethodKind"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "PersonalizationContactTypeUpdate": {
        "type": "object",
        "properties": {
          "contactKind": {
            "$ref": "#/components/schemas/ContactMethodKind"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "contactKind"
            ]
          },
          {
            "required": [
              "isActive"
            ]
          },
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "sortOrder"
            ]
          }
        ]
      },
      "PersonalizationCreate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PersonalizationContactTypeCreate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationNamedCreate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationNameOnlyCreate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationRelationshipCreate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationReminderCreate"
          }
        ],
        "x-sectionSchemas": {
          "profile-modules": "#/components/schemas/PersonalizationNamedCreate",
          "gender-options": "#/components/schemas/PersonalizationNamedCreate",
          "contact-method-types": "#/components/schemas/PersonalizationContactTypeCreate",
          "contact-labels": "#/components/schemas/PersonalizationNameOnlyCreate",
          "activity-types": "#/components/schemas/PersonalizationNamedCreate",
          "emotion-options": null,
          "life-event-types": "#/components/schemas/PersonalizationNamedCreate",
          "relationship-types": "#/components/schemas/PersonalizationRelationshipCreate",
          "pet-categories": null,
          "reminder-rules": "#/components/schemas/PersonalizationReminderCreate",
          "tags": "#/components/schemas/PersonalizationNameOnlyCreate"
        }
      },
      "PersonalizationDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonalizationEntry": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "object",
            "properties": {
              "delete": {
                "type": "boolean"
              },
              "disable": {
                "type": "boolean"
              },
              "editValue": {
                "type": "boolean"
              },
              "rename": {
                "type": "boolean"
              },
              "reorder": {
                "type": "boolean"
              },
              "replace": {
                "type": "boolean"
              },
              "setDefault": {
                "type": "boolean"
              }
            },
            "required": [
              "delete",
              "disable",
              "editValue",
              "rename",
              "reorder",
              "replace",
              "setDefault"
            ],
            "additionalProperties": false
          },
          "canDelete": {
            "type": "boolean"
          },
          "contactKind": {
            "$ref": "#/components/schemas/ContactMethodKind"
          },
          "daysBefore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650
          },
          "forwardLabel": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "named",
              "relationship-type",
              "reminder-rule"
            ]
          },
          "name": {
            "type": "string"
          },
          "readOnly": {
            "type": "boolean"
          },
          "referenceCount": {
            "type": "integer",
            "minimum": 0
          },
          "reverseLabel": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "capabilities",
          "canDelete",
          "id",
          "isActive",
          "isDefault",
          "kind",
          "name",
          "readOnly",
          "referenceCount",
          "sortOrder",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PersonalizationGenderUpdate": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefault": {
            "const": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "isActive"
            ]
          },
          {
            "required": [
              "isDefault"
            ]
          },
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "sortOrder"
            ]
          }
        ]
      },
      "PersonalizationList": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "object",
            "properties": {
              "create": {
                "type": "boolean"
              },
              "editValue": {
                "type": "boolean"
              }
            },
            "required": [
              "create",
              "editValue"
            ],
            "additionalProperties": false
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonalizationEntry"
            }
          },
          "readOnly": {
            "type": "boolean"
          },
          "section": {
            "$ref": "#/components/schemas/PersonalizationSection"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "capabilities",
          "entries",
          "readOnly",
          "section",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonalizationNameOnlyCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "PersonalizationNameOnlyUpdate": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "expectedUpdatedAt",
          "name"
        ],
        "additionalProperties": false
      },
      "PersonalizationNamedCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "PersonalizationNamedUpdate": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "isActive"
            ]
          },
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "sortOrder"
            ]
          }
        ]
      },
      "PersonalizationRelationshipCreate": {
        "type": "object",
        "properties": {
          "forwardLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reverseLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "forwardLabel",
          "reverseLabel"
        ],
        "additionalProperties": false
      },
      "PersonalizationRelationshipUpdate": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "forwardLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "isActive": {
            "type": "boolean"
          },
          "reverseLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "dependentRequired": {
          "forwardLabel": [
            "reverseLabel"
          ],
          "reverseLabel": [
            "forwardLabel"
          ]
        },
        "anyOf": [
          {
            "required": [
              "forwardLabel",
              "reverseLabel"
            ]
          },
          {
            "required": [
              "isActive"
            ]
          },
          {
            "required": [
              "sortOrder"
            ]
          }
        ]
      },
      "PersonalizationReminderCreate": {
        "type": "object",
        "properties": {
          "daysBefore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650
          }
        },
        "required": [
          "daysBefore"
        ],
        "additionalProperties": false
      },
      "PersonalizationReminderUpdate": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "daysBefore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "daysBefore"
            ]
          },
          {
            "required": [
              "isActive"
            ]
          }
        ]
      },
      "PersonalizationSaved": {
        "type": "object",
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/PersonalizationEntry"
          },
          "status": {
            "const": "saved"
          }
        },
        "required": [
          "entry",
          "status"
        ],
        "additionalProperties": false
      },
      "PersonalizationSection": {
        "type": "string",
        "enum": [
          "profile-modules",
          "gender-options",
          "contact-method-types",
          "contact-labels",
          "activity-types",
          "emotion-options",
          "life-event-types",
          "relationship-types",
          "pet-categories",
          "reminder-rules",
          "tags"
        ]
      },
      "PersonalizationUpdate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PersonalizationContactTypeUpdate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationNamedUpdate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationGenderUpdate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationNameOnlyUpdate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationRelationshipUpdate"
          },
          {
            "$ref": "#/components/schemas/PersonalizationReminderUpdate"
          }
        ],
        "x-sectionSchemas": {
          "profile-modules": "#/components/schemas/PersonalizationNamedUpdate",
          "gender-options": "#/components/schemas/PersonalizationGenderUpdate",
          "contact-method-types": "#/components/schemas/PersonalizationContactTypeUpdate",
          "contact-labels": "#/components/schemas/PersonalizationNameOnlyUpdate",
          "activity-types": "#/components/schemas/PersonalizationNamedUpdate",
          "emotion-options": null,
          "life-event-types": "#/components/schemas/PersonalizationNamedUpdate",
          "relationship-types": "#/components/schemas/PersonalizationRelationshipUpdate",
          "pet-categories": null,
          "reminder-rules": "#/components/schemas/PersonalizationReminderUpdate",
          "tags": "#/components/schemas/PersonalizationNameOnlyUpdate"
        }
      },
      "PetFact": {
        "type": "object",
        "properties": {
          "categoryId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "section": {
            "const": "pets"
          }
        },
        "required": [
          "section"
        ],
        "additionalProperties": false
      },
      "PetFactCreateInput": {
        "type": "object",
        "properties": {
          "categoryId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "pets"
          }
        },
        "required": [
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "categoryId"
            ]
          },
          {
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "PetFactUpdateInput": {
        "type": "object",
        "properties": {
          "categoryId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "pets"
          }
        },
        "required": [
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "categoryId"
            ]
          },
          {
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            }
          }
        ]
      },
      "PlanningRevisionInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "blockingWorkspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockingWorkspace"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "additionalProperties": false
      },
      "ProfileFactChanged": {
        "type": "object",
        "properties": {
          "status": {
            "const": "saved"
          },
          "personUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "record": {
            "$ref": "#/components/schemas/ProfileFactRecord"
          }
        },
        "required": [
          "status",
          "personUpdatedAt",
          "record"
        ],
        "additionalProperties": false
      },
      "ProfileFactCreateInput": {
        "discriminator": {
          "propertyName": "section",
          "mapping": {
            "addresses": "#/components/schemas/AddressFactCreateInput",
            "contact-methods": "#/components/schemas/ContactMethodFactCreateInput",
            "first-meeting": "#/components/schemas/FirstMeetingFactCreateInput",
            "food-preferences": "#/components/schemas/FoodPreferencesFactCreateInput",
            "pets": "#/components/schemas/PetFactCreateInput",
            "tags": "#/components/schemas/TagsFactCreateInput",
            "work": "#/components/schemas/OccupationFactCreateInput"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/AddressFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/ContactMethodFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/FirstMeetingFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/FoodPreferencesFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/PetFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/TagsFactCreateInput"
          },
          {
            "$ref": "#/components/schemas/OccupationFactCreateInput"
          }
        ]
      },
      "ProfileFactDeleteInput": {
        "type": "object",
        "properties": {
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "$ref": "#/components/schemas/ProfileFactSectionId"
          }
        },
        "required": [
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "section"
        ],
        "additionalProperties": false
      },
      "ProfileFactDeleted": {
        "type": "object",
        "properties": {
          "status": {
            "const": "deleted"
          },
          "factId": {
            "type": "string",
            "format": "uuid"
          },
          "personUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "factId",
          "personUpdatedAt"
        ],
        "additionalProperties": false
      },
      "ProfileFactOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "contact-label",
              "contact-type",
              "organization",
              "pet-category"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ProfileFactRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "referencesResolved": {
            "type": "boolean"
          },
          "section": {
            "$ref": "#/components/schemas/ProfileFactSectionId"
          },
          "selectedOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileFactOption"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "value": {
            "$ref": "#/components/schemas/ProfileFactValue"
          }
        },
        "required": [
          "id",
          "section",
          "updatedAt",
          "value"
        ],
        "additionalProperties": false
      },
      "ProfileFactSection": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "type": "string"
          },
          "nextOptionsCursor": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "archived",
              "hidden"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileFactOption"
            }
          },
          "personUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileFactRecord"
            }
          }
        },
        "required": [
          "status",
          "options",
          "personUpdatedAt",
          "records"
        ],
        "additionalProperties": false
      },
      "ProfileFactSectionId": {
        "type": "string",
        "enum": [
          "addresses",
          "contact-methods",
          "first-meeting",
          "food-preferences",
          "pets",
          "tags",
          "work"
        ]
      },
      "ProfileFactUpdateInput": {
        "discriminator": {
          "propertyName": "section",
          "mapping": {
            "addresses": "#/components/schemas/AddressFactUpdateInput",
            "contact-methods": "#/components/schemas/ContactMethodFactUpdateInput",
            "first-meeting": "#/components/schemas/FirstMeetingFactUpdateInput",
            "food-preferences": "#/components/schemas/FoodPreferencesFactUpdateInput",
            "pets": "#/components/schemas/PetFactUpdateInput",
            "tags": "#/components/schemas/TagsFactUpdateInput",
            "work": "#/components/schemas/OccupationFactUpdateInput"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/AddressFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/ContactMethodFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/FirstMeetingFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/FoodPreferencesFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/PetFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/TagsFactUpdateInput"
          },
          {
            "$ref": "#/components/schemas/OccupationFactUpdateInput"
          }
        ]
      },
      "ProfileFactValue": {
        "discriminator": {
          "propertyName": "section",
          "mapping": {
            "addresses": "#/components/schemas/AddressFact",
            "contact-methods": "#/components/schemas/ContactMethodFact",
            "first-meeting": "#/components/schemas/FirstMeetingFact",
            "food-preferences": "#/components/schemas/FoodPreferencesFact",
            "pets": "#/components/schemas/PetFact",
            "tags": "#/components/schemas/TagsFact",
            "work": "#/components/schemas/OccupationFact"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/AddressFact"
          },
          {
            "$ref": "#/components/schemas/ContactMethodFact"
          },
          {
            "$ref": "#/components/schemas/FirstMeetingFact"
          },
          {
            "$ref": "#/components/schemas/FoodPreferencesFact"
          },
          {
            "$ref": "#/components/schemas/PetFact"
          },
          {
            "$ref": "#/components/schemas/TagsFact"
          },
          {
            "$ref": "#/components/schemas/OccupationFact"
          }
        ]
      },
      "RecurringDebt": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "dayOfMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "endsOn": {
            "type": "string",
            "format": "date"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "intervalMonths": {
            "type": "integer",
            "minimum": 1,
            "maximum": 120
          },
          "nextOccurrenceOn": {
            "type": "string",
            "format": "date"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "maxLength": 10000
          },
          "startsOn": {
            "type": "string",
            "format": "date"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "active",
          "amount",
          "createdAt",
          "currencyCode",
          "dayOfMonth",
          "direction",
          "id",
          "intervalMonths",
          "personId",
          "startsOn",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "RecurringDebtCreateInput": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$"
          },
          "dayOfMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "endsOn": {
            "type": "string",
            "format": "date"
          },
          "intervalMonths": {
            "type": "integer",
            "minimum": 1,
            "maximum": 120
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "startsOn": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "amount",
          "currencyCode",
          "dayOfMonth",
          "direction",
          "intervalMonths",
          "startsOn"
        ],
        "additionalProperties": false
      },
      "RecurringDebtCreated": {
        "type": "object",
        "properties": {
          "charged": {
            "type": "integer",
            "minimum": 0
          },
          "recurringDebt": {
            "$ref": "#/components/schemas/RecurringDebt"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "charged",
          "recurringDebt",
          "status"
        ],
        "additionalProperties": false
      },
      "RecurringDebtDeleted": {
        "type": "object",
        "properties": {
          "recurringDebtId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "recurringDebtId",
          "status"
        ],
        "additionalProperties": false
      },
      "RecurringDebtSaved": {
        "type": "object",
        "properties": {
          "charged": {
            "type": "integer",
            "minimum": 0
          },
          "recurringDebt": {
            "$ref": "#/components/schemas/RecurringDebt"
          },
          "status": {
            "const": "saved"
          }
        },
        "required": [
          "charged",
          "recurringDebt",
          "status"
        ],
        "additionalProperties": false
      },
      "RecurringDebtUpdateInput": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,15}(?:\\.\\d{1,4})?$"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$"
          },
          "dayOfMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "direction": {
            "type": "string",
            "enum": [
              "i_owe",
              "they_owe"
            ]
          },
          "endsOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "intervalMonths": {
            "type": "integer",
            "minimum": 1,
            "maximum": 120
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "startsOn": {
            "type": "string",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "minProperties": 1
      },
      "Relationship": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "forwardLabel": {
            "type": "string"
          },
          "fromPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "relationshipTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "relationshipTypeArchived": {
            "type": "boolean"
          },
          "reverseLabel": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "ended"
            ]
          },
          "toPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAt",
          "forwardLabel",
          "fromPersonId",
          "id",
          "relationshipTypeId",
          "relationshipTypeArchived",
          "reverseLabel",
          "status",
          "toPersonId",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "RelationshipChanged": {
        "type": "object",
        "properties": {
          "affectedPersonIds": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "forward": {
            "$ref": "#/components/schemas/RelationshipDisplay"
          },
          "inverse": {
            "$ref": "#/components/schemas/RelationshipDisplay"
          },
          "relationship": {
            "$ref": "#/components/schemas/Relationship"
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "existing",
              "updated"
            ]
          }
        },
        "required": [
          "affectedPersonIds",
          "forward",
          "inverse",
          "relationship",
          "status"
        ],
        "additionalProperties": false
      },
      "RelationshipCreateInput": {
        "type": "object",
        "properties": {
          "relationshipTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "targetPersonId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "relationshipTypeId",
          "targetPersonId"
        ],
        "additionalProperties": false
      },
      "RelationshipDeleted": {
        "type": "object",
        "properties": {
          "affectedPersonIds": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "relationshipId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "affectedPersonIds",
          "relationshipId",
          "status"
        ],
        "additionalProperties": false
      },
      "RelationshipDisplay": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "relationshipId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "label",
          "personId",
          "relationshipId"
        ],
        "additionalProperties": false
      },
      "RelationshipList": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "type": "string"
          },
          "relationships": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipWithDisplay"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "archived",
              "hidden",
              "ready"
            ]
          }
        },
        "required": [
          "relationships",
          "status"
        ],
        "additionalProperties": false
      },
      "RelationshipType": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "forwardLabel": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reverseLabel": {
            "type": "string"
          }
        },
        "required": [
          "archived",
          "forwardLabel",
          "id",
          "reverseLabel"
        ],
        "additionalProperties": false
      },
      "RelationshipTypeList": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "type": "string"
          },
          "options": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipType"
            }
          },
          "selected": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipType"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "hidden",
              "ready"
            ]
          }
        },
        "required": [
          "options",
          "selected",
          "status"
        ],
        "additionalProperties": false
      },
      "RelationshipUpdateInput": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "relationshipTypeId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "expectedUpdatedAt",
          "relationshipTypeId"
        ],
        "additionalProperties": false
      },
      "RelationshipWithDisplay": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "forwardLabel": {
            "type": "string"
          },
          "fromPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "relationshipTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "relationshipTypeArchived": {
            "type": "boolean"
          },
          "reverseLabel": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "ended"
            ]
          },
          "toPersonId": {
            "type": "string",
            "format": "uuid"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "display": {
            "$ref": "#/components/schemas/RelationshipDisplay"
          }
        },
        "required": [
          "createdAt",
          "forwardLabel",
          "fromPersonId",
          "id",
          "relationshipTypeId",
          "relationshipTypeArchived",
          "reverseLabel",
          "status",
          "toPersonId",
          "updatedAt",
          "display"
        ],
        "additionalProperties": false
      },
      "Reminder": {
        "type": "object",
        "properties": {
          "anchorOn": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "nextOccurrence": {
            "$ref": "#/components/schemas/ReminderOccurrence"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "recurrenceInterval": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "recurrenceUnit": {
            "type": "string",
            "enum": [
              "none",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "sendTime": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "anchorOn",
          "createdAt",
          "id",
          "isActive",
          "personId",
          "recurrenceInterval",
          "recurrenceUnit",
          "sendTime",
          "title",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ReminderChanged": {
        "type": "object",
        "properties": {
          "reminder": {
            "$ref": "#/components/schemas/Reminder"
          },
          "status": {
            "type": "string",
            "enum": [
              "saved",
              "unchanged"
            ]
          }
        },
        "required": [
          "reminder",
          "status"
        ],
        "additionalProperties": false
      },
      "ReminderCreateInput": {
        "type": "object",
        "properties": {
          "anchorOn": {
            "type": "string",
            "format": "date"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "recurrenceInterval": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "recurrenceUnit": {
            "type": "string",
            "enum": [
              "none",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "sendTime": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d)?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "anchorOn",
          "personId",
          "recurrenceInterval",
          "recurrenceUnit",
          "requestId",
          "sendTime",
          "title"
        ],
        "additionalProperties": false
      },
      "ReminderCreated": {
        "type": "object",
        "properties": {
          "reminder": {
            "$ref": "#/components/schemas/Reminder"
          },
          "status": {
            "const": "created"
          }
        },
        "required": [
          "reminder",
          "status"
        ],
        "additionalProperties": false
      },
      "ReminderDeleted": {
        "type": "object",
        "properties": {
          "reminderId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "deleted"
          }
        },
        "required": [
          "reminderId",
          "status"
        ],
        "additionalProperties": false
      },
      "ReminderEditInput": {
        "type": "object",
        "properties": {
          "anchorOn": {
            "type": "string",
            "format": "date"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "recurrenceInterval": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "recurrenceUnit": {
            "type": "string",
            "enum": [
              "none",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "sendTime": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d)?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "ReminderOccurrence": {
        "type": "object",
        "properties": {
          "attemptCount": {
            "type": "integer",
            "minimum": 0
          },
          "deliverAt": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occursOn": {
            "type": "string",
            "format": "date"
          },
          "providerEffectAt": {
            "type": "string",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "claimed",
              "retry",
              "sent",
              "skipped",
              "failed",
              "cancelled",
              "manual_attention"
            ]
          },
          "visibleAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "attemptCount",
          "deliverAt",
          "id",
          "occursOn",
          "status"
        ],
        "additionalProperties": false
      },
      "ReminderSaved": {
        "type": "object",
        "properties": {
          "reminder": {
            "$ref": "#/components/schemas/Reminder"
          },
          "status": {
            "const": "saved"
          }
        },
        "required": [
          "reminder",
          "status"
        ],
        "additionalProperties": false
      },
      "SearchEntityGroup": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "notes",
              "activities",
              "journal-posts",
              "tasks"
            ]
          },
          "results": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchEntityResult"
            }
          },
          "unavailable": {
            "const": true
          }
        },
        "required": [
          "kind",
          "results"
        ],
        "additionalProperties": false
      },
      "SearchEntityResult": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "pattern": "^\\/app\\/(?:people\\/[0-9a-f-]{36}\\?section=(?:notes|activities|tasks)|journal\\/[0-9a-f-]{36}|tasks)$"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "note",
              "activity",
              "journal-post",
              "task"
            ]
          },
          "person": {
            "$ref": "#/components/schemas/SearchPersonReference"
          },
          "snippet": {
            "type": "string",
            "maxLength": 322
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "href",
          "id",
          "kind",
          "snippet"
        ],
        "additionalProperties": false
      },
      "SearchPeopleGroup": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "people"
          },
          "results": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchPersonResult"
            }
          }
        },
        "required": [
          "kind",
          "results"
        ],
        "additionalProperties": false
      },
      "SearchPersonReference": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "archived",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "SearchPersonResult": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "avatar": {
            "$ref": "#/components/schemas/PersonAvatar"
          },
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "href": {
            "type": "string",
            "pattern": "^\\/app\\/people\\/[0-9a-f-]{36}$"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "person"
          },
          "middleName": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          }
        },
        "required": [
          "givenName",
          "href",
          "id",
          "kind"
        ],
        "additionalProperties": false
      },
      "SearchResults": {
        "type": "object",
        "properties": {
          "groups": {
            "minItems": 5,
            "maxItems": 5,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SearchPeopleGroup"
                },
                {
                  "$ref": "#/components/schemas/SearchEntityGroup"
                }
              ]
            }
          },
          "query": {
            "type": "string"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "groups",
          "query",
          "status"
        ],
        "additionalProperties": false
      },
      "StayInTouchCadence": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "intervalCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "intervalUnit": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "lastContactedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextDueAt": {
            "type": "string",
            "format": "date-time"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "intervalCount",
          "intervalUnit",
          "isActive",
          "nextDueAt",
          "personId",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "TagsFact": {
        "type": "object",
        "properties": {
          "tagIds": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "section": {
            "const": "tags"
          }
        },
        "required": [
          "tagIds",
          "section"
        ],
        "additionalProperties": false
      },
      "TagsFactCreateInput": {
        "type": "object",
        "properties": {
          "tagIds": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "section": {
            "const": "tags"
          }
        },
        "required": [
          "tagIds",
          "expectedPersonUpdatedAt",
          "section"
        ],
        "additionalProperties": false
      },
      "TagsFactUpdateInput": {
        "type": "object",
        "properties": {
          "tagIds": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expectedPersonUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "section": {
            "const": "tags"
          }
        },
        "required": [
          "tagIds",
          "expectedPersonUpdatedAt",
          "expectedUpdatedAt",
          "id",
          "section"
        ],
        "additionalProperties": false
      },
      "Task": {
        "type": "object",
        "properties": {
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedByMemberId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByMemberId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "person": {
            "$ref": "#/components/schemas/TaskPerson"
          },
          "status": {
            "type": "string",
            "enum": [
              "cancelled",
              "completed",
              "open"
            ]
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAt",
          "id",
          "status",
          "title",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "TaskChangeInput": {
        "type": "object",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000,
                "pattern": "\\S"
              },
              {
                "type": "null"
              }
            ]
          },
          "dueAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "personId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "cancelled",
              "open"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "pattern": "\\S"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "TaskChanged": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "saved",
              "unchanged"
            ]
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "TaskCompletionInput": {
        "type": "object",
        "properties": {
          "completed": {
            "type": "boolean"
          }
        },
        "required": [
          "completed"
        ],
        "additionalProperties": false
      },
      "TaskCreateInput": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "\\S"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "pattern": "\\S"
          }
        },
        "required": [
          "requestId",
          "title"
        ],
        "additionalProperties": false
      },
      "TaskCreated": {
        "type": "object",
        "properties": {
          "status": {
            "const": "created"
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "TaskDeleted": {
        "type": "object",
        "properties": {
          "status": {
            "const": "deleted"
          },
          "taskId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "status",
          "taskId"
        ],
        "additionalProperties": false
      },
      "TaskList": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "additionalProperties": false
      },
      "TaskPerson": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "unavailable": {
            "type": "boolean"
          }
        },
        "required": [
          "archived",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "TaskReady": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "TodayAttention": {
        "type": "object",
        "properties": {
          "attention": {
            "$ref": "#/components/schemas/TodayAttentionGroup"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "const": "ready"
          },
          "timezone": {
            "type": "string",
            "minLength": 1
          },
          "upcoming": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayAttentionItem"
            }
          }
        },
        "required": [
          "attention",
          "date",
          "status",
          "timezone",
          "upcoming"
        ],
        "additionalProperties": false
      },
      "TodayAttentionGroup": {
        "type": "object",
        "properties": {
          "nextSevenDays": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayAttentionItem"
            }
          },
          "overdue": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayAttentionItem"
            }
          },
          "today": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayAttentionItem"
            }
          }
        },
        "required": [
          "nextSevenDays",
          "overdue",
          "today"
        ],
        "additionalProperties": false
      },
      "TodayAttentionItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TodayTaskAttentionItem"
          },
          {
            "$ref": "#/components/schemas/TodayReminderAttentionItem"
          },
          {
            "$ref": "#/components/schemas/TodayImportantDateAttentionItem"
          },
          {
            "$ref": "#/components/schemas/TodayLifeEventAttentionItem"
          },
          {
            "$ref": "#/components/schemas/TodayCadenceAttentionItem"
          }
        ]
      },
      "TodayAttentionPerson": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "unavailable": {
            "type": "boolean"
          }
        },
        "required": [
          "archived",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "TodayCadenceAttentionItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "cadence"
          },
          "person": {
            "$ref": "#/components/schemas/TodayAttentionPerson"
          },
          "lastContactedAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "dueAt",
          "id",
          "kind",
          "person",
          "title"
        ],
        "additionalProperties": false
      },
      "TodayCadenceItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lastContactedAt": {
            "type": "string",
            "format": "date-time"
          },
          "person": {
            "$ref": "#/components/schemas/TodayReminderPerson"
          }
        },
        "required": [
          "dueAt",
          "id",
          "person"
        ],
        "additionalProperties": false
      },
      "TodayFavoriteNotes": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 8,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NoteInteraction"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "additionalProperties": false
      },
      "TodayImportantDateAttentionItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "important-date"
          },
          "person": {
            "$ref": "#/components/schemas/TodayAttentionPerson"
          },
          "occursOn": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "dueAt",
          "id",
          "kind",
          "occursOn",
          "title"
        ],
        "additionalProperties": false
      },
      "TodayLifeEventAttentionItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "life-event"
          },
          "person": {
            "$ref": "#/components/schemas/TodayAttentionPerson"
          },
          "occursOn": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "dueAt",
          "id",
          "kind",
          "occursOn",
          "title"
        ],
        "additionalProperties": false
      },
      "TodayRecentActivity": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityOrNoteInteraction"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "additionalProperties": false
      },
      "TodayRecentPeople": {
        "type": "object",
        "properties": {
          "people": {
            "maxItems": 8,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayRecentPerson"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "people",
          "status"
        ],
        "additionalProperties": false
      },
      "TodayRecentPerson": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "archived",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "TodayReminderAttentionItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "reminder"
          },
          "person": {
            "$ref": "#/components/schemas/TodayAttentionPerson"
          },
          "occursOn": {
            "type": "string",
            "format": "date"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "in_app"
            ]
          },
          "reminderStatus": {
            "type": "string",
            "enum": [
              "failed",
              "manual_attention",
              "pending",
              "retry"
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "dueAt",
          "id",
          "kind",
          "occursOn",
          "channel",
          "reminderStatus",
          "title"
        ],
        "additionalProperties": false
      },
      "TodayReminderItem": {
        "type": "object",
        "properties": {
          "attemptCount": {
            "type": "integer",
            "minimum": 0
          },
          "deliverAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time"
          },
          "person": {
            "$ref": "#/components/schemas/TodayReminderPerson"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "claimed",
              "retry",
              "sent",
              "failed",
              "manual_attention"
            ]
          },
          "title": {
            "type": "string"
          },
          "visibleAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "attemptCount",
          "deliverAt",
          "id",
          "person",
          "status",
          "title"
        ],
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "nextAttemptAt"
            ],
            "properties": {
              "status": {
                "const": "retry"
              }
            }
          },
          {
            "not": {
              "required": [
                "nextAttemptAt"
              ]
            },
            "properties": {
              "status": {
                "enum": [
                  "pending",
                  "claimed",
                  "sent",
                  "failed",
                  "manual_attention"
                ]
              }
            }
          }
        ]
      },
      "TodayReminderPerson": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "archived",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "TodayReminders": {
        "type": "object",
        "properties": {
          "cadences": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayCadenceItem"
            }
          },
          "reminders": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayReminderItem"
            }
          },
          "status": {
            "const": "ready"
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "cadences",
          "reminders",
          "status",
          "timezone"
        ],
        "additionalProperties": false
      },
      "TodayTaskAttentionItem": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "task"
          },
          "person": {
            "$ref": "#/components/schemas/TodayAttentionPerson"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "dueAt",
          "id",
          "kind",
          "title"
        ],
        "additionalProperties": false
      },
      "TodayTasks": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "additionalProperties": false
      }
    }
  }
}
