{
  "openapi": "3.1.0",
  "info": {
    "title": "Pending You person API",
    "version": "2026-10-05",
    "summary": "Apps that answer as the person: their cards, their assistants, their presence.",
    "description": "The person API lets an app act as the person who signs it in: list the cards their assistants ask them, show one, answer it, write to its assistant, put it in Later, hand it to another assistant, see which assistants are running, bring the one that asked to the front when they press Show in Pending You, and keep their phone quiet while they’re at the app.\n\nPending You never answers for the person: an app answers only when the person presses something in it. High-stakes cards (they spend money, can’t be undone or go public) can be read but never acted on: send the person to the card’s `url`. Account, sign-in, billing, secrets and managing assistants aren’t in this API at all.\n\nSign-in is OAuth 2.1 at Pending You: by device code (RFC 8628, `x-pendingyou-device`) for terminals and plugins, which proves the computer’s key, and authorization code with PKCE for web and desktop apps. Public apps’ tokens are bound to a key that stays on their computer (DPoP, RFC 9449): send `Authorization: DPoP <token>` with a `DPoP` proof for each request (`x-pendingyou-dpop`).\n\nRefusals past sign-in are problem details (RFC 9457) with a stable `code`. Sign-in’s own (a token, its proof, its scope) are OAuth’s: 401 or 403 with `WWW-Authenticate`.\n\n/v1 only ever adds: paths, optional input fields, output fields and enum values. Ignore fields you don’t know, and keep a value you don’t know: what /v1 sends never closes its objects (no `additionalProperties: false`), its enums are open (`anyOf` the known strings and any string), and so are its unions of kinds (`anyOf` the known kinds and any object with the kind’s tag: a doc’s blocks and runs), so a generated client reads a newer answer. What it reads stays strict: a field it doesn’t know is refused. Behaviour changes are dated: send `Pending-You-Version` to pin one."
  },
  "servers": [
    {
      "url": "https://staging.pendingyou.com"
    }
  ],
  "externalDocs": {
    "description": "The person API",
    "url": "https://staging.pendingyou.com/docs/api"
  },
  "tags": [
    {
      "name": "me",
      "description": "This sign-in."
    },
    {
      "name": "snapshot",
      "description": "The queue in one read."
    },
    {
      "name": "cards",
      "description": "The person’s cards: read them, and act as the person."
    },
    {
      "name": "threads",
      "description": "Pending You’s own apps: a thread’s earlier items, a page at a time."
    },
    {
      "name": "changes",
      "description": "The change feed."
    },
    {
      "name": "assistants",
      "description": "The person’s assistants and their agents."
    },
    {
      "name": "shows",
      "description": "Show me: the agent that asked, brought to the front on its computer."
    },
    {
      "name": "presence",
      "description": "The person at the app."
    },
    {
      "name": "client",
      "description": "Pending You’s own apps: their version and switches."
    },
    {
      "name": "yes_key",
      "description": "Pending You’s own apps: the key that signs the person’s yes."
    },
    {
      "name": "web_handoff",
      "description": "Pending You’s own apps: a page of the website, signed in."
    },
    {
      "name": "push",
      "description": "Pending You’s own apps: the person’s notifications on this device, and their settings."
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Who and what this sign-in is",
        "description": "The person, their workspace, the app and this sign-in: its scopes, its reach (one computer or every card), its computer, and when it ends. Any scope.",
        "tags": [
          "me"
        ],
        "security": [
          {
            "oauth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Who and what this sign-in is",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "me",
        "x-pendingyou-scope": null,
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/snapshot": {
      "get": {
        "operationId": "getSnapshot",
        "summary": "The queue in one read",
        "description": "Every list at once, as Pending You shows them: the stack’s first 200 in its order (the first 3 whole), Later’s soonest 100, the newest 100 with a helper, and Done (every card with a new reply the person hasn’t opened, then the newest 50 of the last 30 days); the counts; and the areas and groups the cards are filed in, as the person arranged them. Kept to this sign-in’s reach. Send its ETag back as If-None-Match to hear 304 when nothing changed; GET /v1/cards pages on past each list’s first.",
        "tags": [
          "snapshot"
        ],
        "security": [
          {
            "oauth2": [
              "cards:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The queue in one read",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "snapshot",
        "x-pendingyou-scope": "cards:read",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/cards": {
      "get": {
        "operationId": "listCards",
        "summary": "The cards in reach, one list at a time",
        "description": "Waiting on the person in the stack’s order (pending), in Later soonest back first (snoozed), with a helper (delegated), or done in the last 30 days newest first. Filters repeat (`?area=prj_…&area=prj_…`); pages follow `next`. The first `whole` cards come whole.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "pending",
              "type": "string",
              "enum": [
                "pending",
                "snoozed",
                "delegated",
                "done"
              ]
            }
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^prj_[A-Za-z0-9-]+$"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "assistant",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^con_[A-Za-z0-9-]+$"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "agent",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^agt_[A-Za-z0-9-]+$"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "app",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 14,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "claude-code",
                  "codex",
                  "cursor",
                  "gemini-cli",
                  "opencode",
                  "pi",
                  "antigravity",
                  "grok",
                  "muse",
                  "chatgpt",
                  "claude",
                  "dots",
                  "other",
                  "webhook"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "machine",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^mch_[A-Za-z0-9-]+$"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "threadId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^req_[A-Za-z0-9-]+$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "whole",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 0,
              "maximum": 3
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The cards in reach, one list at a time",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.list",
        "x-pendingyou-scope": "cards:read",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/cards/{id}": {
      "get": {
        "operationId": "getCard",
        "summary": "One card, whole",
        "description": "A card out of reach is not found, exactly as one that doesn’t exist.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "One card, whole",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardResponse"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.get",
        "x-pendingyou-scope": "cards:read",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/cards/{id}/answer": {
      "post": {
        "operationId": "answerCard",
        "summary": "Answer a card",
        "description": "With the version you showed the person. Its assistant hears it once its 5 seconds are over; until `undoUntil` this app may take it back. On a card waiting to be sent (`sendTo`), its no is `notSent` and its yes is POST /v1/cards/{id}/delegate; a teammate’s is answered in Pending You.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:answer"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/PendingYouYes"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer a card",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; yes_required; area_change; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "yes_required",
              "area_change",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "version_conflict; not_waiting; delegated; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "version_conflict",
              "not_waiting",
              "delegated",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "501": {
            "description": "not_available",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_available"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.answer",
        "x-pendingyou-scope": "cards:answer",
        "x-pendingyou-limits": [
          "answers",
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "required"
      }
    },
    "/v1/cards/{id}/undo": {
      "post": {
        "operationId": "undoAnswer",
        "summary": "Take this app’s answer back",
        "description": "Within its 5 seconds, and only an answer given in this app.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:answer"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UndoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Take this app’s answer back",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UndoResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; not_your_answer; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "not_your_answer",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; hold_over; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "hold_over",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.undo",
        "x-pendingyou-scope": "cards:answer",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/finish": {
      "post": {
        "operationId": "finishCard",
        "summary": "Move a card to Done",
        "description": "The person moves a card in In motion to Done themselves (its `actions` offer `finish`), with the version you showed. Filed (`how` filed): done for them, and nothing its assistant receives changes: an answer still to pick up, words it still owes, its status and version. One that still waited on them (`how` closed) is answered as closed without an answer (`answer.closed`), held, woken and read as any answer. Until `undoUntil`, POST /v1/cards/{id}/undo takes it back. Pending You’s own apps only (`cards:manage`).",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Move a card to Done",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinishResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "version_conflict; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "version_conflict",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.finish",
        "x-pendingyou-scope": "cards:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/messages": {
      "post": {
        "operationId": "replyToCard",
        "summary": "Write to the assistant that asked",
        "description": "The person’s words, on its card. They hand it the turn and it acts on them as the answer, so they count against the answers’ limit.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:reply"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/PendingYouYes"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Write to the assistant that asked",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; yes_required; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "yes_required",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; delegated; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "delegated",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.messages",
        "x-pendingyou-scope": "cards:reply",
        "x-pendingyou-limits": [
          "answers",
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/later": {
      "post": {
        "operationId": "putCardInLater",
        "summary": "Put a card in Later",
        "description": "Until a time (a minute to two months ahead) or a preset, `1h`, `tonight` or `tomorrow`, in `timeZone`.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:later"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LaterRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Put a card in Later",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaterResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; delegated; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "delegated",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.later",
        "x-pendingyou-scope": "cards:later",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/back": {
      "post": {
        "operationId": "bringCardBack",
        "summary": "Bring a card back from Later",
        "description": "Now, to its place in the stack. One already back answers with its version. With `thread`, its thread’s other cards in Later come back too, as `others`.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:later"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bring a card back from Later",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardBack"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.back",
        "x-pendingyou-scope": "cards:later",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/delegate": {
      "post": {
        "operationId": "delegateCard",
        "summary": "Hand a card to another assistant",
        "description": "One of the person’s assistants in reach (GET /v1/assistants). `freely`: its answer goes straight back; `loop`: it comes to the person first. Until `undoUntil` the helper can’t see it. On “Ask Maple again?”, yes this time is the card’s `sendTo.to` in `sendTo.mode`; “from now on” is the person’s, in Pending You.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:delegate"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/PendingYouYes"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Hand a card to another assistant",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DelegateResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; yes_required; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "yes_required",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; delegated; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "delegated",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.delegate",
        "x-pendingyou-scope": "cards:delegate",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/take-back": {
      "post": {
        "operationId": "takeCardBack",
        "summary": "Take a card back from its helper",
        "description": "Before the helper answers it: the card waits on the person again.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:delegate"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TakeBackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Take a card back from its helper",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardBack"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.take_back",
        "x-pendingyou-scope": "cards:delegate",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/seen": {
      "post": {
        "operationId": "markCardSeen",
        "summary": "Say the person opened a card",
        "description": "Seen for the person on every device, up to `upTo` (the newest thing the screen drew: send the `presentation.seen.upTo` the whole card came with; absent: now), never backwards: the card is no longer `unread`, and a new reply the screen drew leaves Pending and loses its mark in Done. `seen: false` when there was no new reply for them on it. Pending You’s own apps only, for now (cards:manage).",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Say the person opened a card",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeenResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.seen",
        "x-pendingyou-scope": "cards:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/hold": {
      "post": {
        "operationId": "holdAnswer",
        "summary": "Keep an answer back while its Undo is paused",
        "description": "Its assistant sees it `seconds` from now instead: a minute ahead while the person keeps the Undo paused, asked again as it stays paused, then the time it had left. Pending You’s own apps only (cards:manage).",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HoldRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Keep an answer back while its Undo is paused",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HoldResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; hold_over; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "hold_over",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.hold",
        "x-pendingyou-scope": "cards:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/cards/{id}/steps": {
      "post": {
        "operationId": "tickCardStep",
        "summary": "Tick a to-do’s step off, or untick it",
        "description": "By its id (`s3`): `done` true or false, never a toggle, so the last to arrive wins. `through` ticks the steps before it too, but not one with a command to copy or a link of its own to open, nor one the person unticked. Kept on the card for every device; nothing reaches its assistant, and its version doesn’t move. Refused once the card stops waiting on the person, and `invalid` for a step that isn’t on it anymore.",
        "tags": [
          "cards"
        ],
        "security": [
          {
            "oauth2": [
              "cards:answer"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tick a to-do’s step off, or untick it",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepsResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; high_stakes; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "high_stakes",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "not_waiting; delegated; conflict; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_waiting",
              "delegated",
              "conflict",
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "cards.steps",
        "x-pendingyou-scope": "cards:answer",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/threads/{threadId}": {
      "get": {
        "operationId": "getThreadItems",
        "summary": "A thread’s older items, a page at a time",
        "description": "What “Show N earlier” brings above a card (`presentation.conversation.before`): its thread’s earlier items older than the ones `before` showed, newest first (reverse a page to draw it), each in `before`’s words, at most `limit` (50). `after` is `before.next`, then each page’s `next`, until a page has none. Only the cards in this sign-in’s reach, as the card’s own thread: never a card of another computer for a sign-in kept to one, nor a card a teammate handed the person; a thread out of reach is not found. Pending You’s own apps only (cards:manage); any other app is `forbidden` (`reason` `not_pending_you`).",
        "tags": [
          "threads"
        ],
        "security": [
          {
            "oauth2": [
              "cards:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ThreadId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "after",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(req_[A-Za-z0-9_-]{1,64})(?:~(\\d{4}-\\d\\d-\\d\\dT[\\d:.]+Z)~(card|asked|message|handed|handed_back|taken_back|back|reopened)~([A-Za-z0-9_-]{1,100}))?$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A thread’s older items, a page at a time",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadPage"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "threads.get",
        "x-pendingyou-scope": "cards:manage",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/yes-key": {
      "post": {
        "operationId": "registerYesKey",
        "summary": "Register the key that signs the person’s yes",
        "description": "The key that signs the person’s yes to a high-stakes card (`Pending-You-Yes`), kept on the device behind Face ID or the phone’s passcode. `proof` is a JWS of type `pending-you-yes-key+jwt`, signed by that key with it in its header, naming this sign-in (`grant`), when it was made (`iat`) and a `jti`. A new key replaces the last. Pending You’s own apps only (cards:high_stakes).",
        "tags": [
          "yes_key"
        ],
        "security": [
          {
            "oauth2": [
              "cards:high_stakes"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/YesKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Register the key that signs the person’s yes",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/YesKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "yes_key",
        "x-pendingyou-scope": "cards:high_stakes",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/changes": {
      "get": {
        "operationId": "listChanges",
        "summary": "What changed since a cursor",
        "description": "Ids and types only, in commit order, kept to the reach. Without `after`: from now. With `wait` (up to 25 seconds) it waits for the first change. Read GET /v1/cards again on start and every 10 minutes too: a card that comes into reach makes no change.",
        "tags": [
          "changes"
        ],
        "security": [
          {
            "oauth2": [
              "cards:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 25
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What changed since a cursor",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "changes",
        "x-pendingyou-scope": "cards:read",
        "x-pendingyou-limits": [
          "read",
          "workspace",
          "wait"
        ]
      }
    },
    "/v1/assistants": {
      "get": {
        "operationId": "listAssistants",
        "summary": "The assistants in reach",
        "description": "Each sign-in, its computer and how it hears answers, and its agents: live, recent or quiet, their open cards, and the sessions running now with the terminal each runs in. Live ones first.",
        "tags": [
          "assistants"
        ],
        "security": [
          {
            "oauth2": [
              "assistants:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The assistants in reach",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssistantList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "assistants",
        "x-pendingyou-scope": "assistants:read",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/agents/{agentId}": {
      "patch": {
        "operationId": "renameAgent",
        "summary": "Rename an assistant",
        "description": "The name the person sees one of their assistants called, on every card, row and notification (`shownName`), 1 to 40 characters; null takes it away, so it’s called by its own name again. Nothing the assistant sends changes it, and its own name (`name`), cards and webhook stay as they are. `invalid` with `reason` `name_empty`, `name_too_long` or `name_characters` (a line break or a hidden character). Pending You’s own apps only (assistants:manage).",
        "tags": [
          "assistants"
        ],
        "security": [
          {
            "oauth2": [
              "assistants:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameAgentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename an assistant",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenameAgentResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "agents.rename",
        "x-pendingyou-scope": "assistants:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/shows": {
      "get": {
        "operationId": "listShows",
        "summary": "Show requests for this computer",
        "description": "The person pressed Show on a card in Pending You: bring the agent that asked to the front, in a place of the kinds this app names (`places`, repeated: `herdr`, `tmux`). Only the show requests still open for this sign-in’s computer, oldest first, each with its card’s and agent’s ids and the agent’s places of those kinds, never a card’s words. With `wait` (up to 25 seconds) it waits for the first; each call says this app is listening for the next minute, so the button shows. Before moving anything, check the place is yours and still the agent’s: answer `not_found` when it isn’t, and leave a place on another server of yours to that server’s app. A show only brings a window you already know to the front: never type, run or open anything for one. A sign-in with no computer is refused, `no_machine`.",
        "tags": [
          "shows"
        ],
        "security": [
          {
            "oauth2": [
              "assistants:show"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "places",
            "in": "query",
            "required": true,
            "schema": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "herdr",
                  "tmux"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Show requests for this computer",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShowList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; no_machine; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "no_machine"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "shows.list",
        "x-pendingyou-scope": "assistants:show",
        "x-pendingyou-limits": [
          "read",
          "workspace",
          "wait"
        ]
      }
    },
    "/v1/shows/{showId}": {
      "post": {
        "operationId": "answerShow",
        "summary": "Answer a show request",
        "description": "`shown` once the agent’s place is at the front, `not_found` when you couldn’t confirm it and moved nothing. The person sees what came of it. The first answer wins (`already_answered`), and a show request is dead 30 seconds after the press (`expired`). One for another computer is not found.",
        "tags": [
          "shows"
        ],
        "security": [
          {
            "oauth2": [
              "assistants:show"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ShowId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShowAnswerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer a show request",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShowAnswer"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; no_machine; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "no_machine"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "409": {
            "description": "already_answered; idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "already_answered",
              "idempotency_in_progress"
            ]
          },
          "410": {
            "description": "expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "expired"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "shows.answer",
        "x-pendingyou-scope": "assistants:show",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/presence": {
      "post": {
        "operationId": "setPresence",
        "summary": "Say the person is at this app",
        "description": "`here: true` every 30 seconds while they’re active in it (it lasts 75), `here: false` when they leave. Meanwhile their phones stay quiet, as with Pending You open on a computer. Answers 204.",
        "tags": [
          "presence"
        ],
        "security": [
          {
            "oauth2": [
              "presence:desk"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresenceRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Say the person is at this app"
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "presence",
        "x-pendingyou-scope": "presence:desk",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/focus": {
      "post": {
        "operationId": "reportFocus",
        "summary": "Say which pane the person is in",
        "description": "Pending You’s own apps only (Herdr’s watcher). The focused pane (`place`, null for none: a Herdr pane by its id and its server’s hash) and the person’s last sign of activity there (`activeAt`, taken as now at the latest). A card their assistant in that pane also asks them in the conversation waits out of their sight while they stay; it shows when they leave the pane, after 5 minutes with no sign of them, or after 30 minutes, and never if it’s answered in the conversation first. Say it on every change of focus, and every `everySeconds` while they’re active or `held` isn’t empty. `held` names the cards held in this place now, ids only, to keep off what the app shows.",
        "tags": [
          "focus"
        ],
        "security": [
          {
            "oauth2": [
              "presence:focus"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FocusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Say which pane the person is in",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FocusResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "focus",
        "x-pendingyou-scope": "presence:focus",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/client": {
      "get": {
        "operationId": "getClient",
        "summary": "What this app should know of Pending You",
        "description": "For Pending You’s own apps, which say who they are in `Pending-You-Client` (`ios/1.4.0+120`): whether this version must update (`status`, `minimum`, `recommended`), its switches, and the versions of the string catalog and of cards’ presentation. Any scope, or no sign-in at all; signed in, switches that reach some people are read for the person.",
        "tags": [
          "client"
        ],
        "security": [
          {},
          {
            "oauth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "What this app should know of Pending You",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientConfig"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "client",
        "x-pendingyou-scope": null,
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    },
    "/v1/web-handoff": {
      "post": {
        "operationId": "createWebHandoff",
        "summary": "Open a page of Pending You on the web, signed in",
        "description": "For Pending You’s own app on the phone, signed in with its key: a link that signs its browser view in to Pending You once, within 60 seconds, and lands on `path` (Settings or one of its sections, an area, a card, or another page of the app). The link stops working once this sign-in ends, and so does the session it starts. Ask for a new one each time: it’s never kept, and never sent again for a retry. Pending You’s own apps only (account:manage).",
        "tags": [
          "web_handoff"
        ],
        "security": [
          {
            "oauth2": [
              "account:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebHandoffRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Open a page of Pending You on the web, signed in",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebHandoff"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "web_handoff",
        "x-pendingyou-scope": "account:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/time-zone": {
      "post": {
        "operationId": "setTimeZone",
        "summary": "Keep the person’s time zone",
        "description": "The person’s time zone, by its IANA name (`America/Chicago`), kept as the web keeps it: the days a card’s conversation breaks on, and the zone its times and dates are written in (`zone` in a time’s arguments), are the person’s own. Send it when the app starts and whenever the device’s zone changes; the same zone again changes nothing (`changed` false). An unknown zone is refused (`invalid`). Pending You’s own apps only (account:manage).",
        "tags": [
          "time_zone"
        ],
        "security": [
          {
            "oauth2": [
              "account:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeZoneRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Keep the person’s time zone",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeZone"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "time_zone",
        "x-pendingyou-scope": "account:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/push/devices": {
      "post": {
        "operationId": "registerPushDevice",
        "summary": "Register this iPhone for notifications",
        "description": "Pending You’s own iPhone app, with the push token iOS gave it (hex), the APNs host it belongs to (`sandbox` for a build from Xcode, `production` for TestFlight and the App Store) and its bundle id. Register on every launch: the same token is the same device, and a new token from this sign-in replaces its last. `firstDevice` says no device of the person’s took notifications before this one: then, and only then, ask “Show the question on your lock screen?”, as the web does. Once the person removed this iPhone (Settings’ Remove, or DELETE), registering again leaves it off and says so (`device.off: removed`, `ready` false): send `turnOn: true` only from the person’s own Turn on in the app. Its notifications follow the person’s settings and carry ids only (`cardId`, `threadId`, `reason`); read the card to show more. It takes pushes while this sign-in lasts: signing out removes it. `ready` is false until this server can send to iPhones; the device is kept either way. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushDeviceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Register this iPhone for notifications",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushDeviceResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.devices.add",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/push/devices/{deviceId}": {
      "delete": {
        "operationId": "removePushDevice",
        "summary": "Stop notifications to a device",
        "description": "One of the person’s devices gets nothing more, as Remove in Settings. `reason`: `removed` (the default) when the person turned notifications off, so it stays off when the app registers again at launch, until they turn them on in the app (`turnOn`); `signed_out` when the app is signing out, so the next sign-in brings it back. `removed` is false when it was off already. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DeviceId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "removed",
                "signed_out"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stop notifications to a device",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushDeviceRemoved"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.devices.remove",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/push/devices/{deviceId}/test": {
      "post": {
        "operationId": "testPushDevice",
        "summary": "Send a test notification",
        "description": "A real notification to one of the person’s devices, now, as Send test in Settings: whether its push service took it, or says it’s gone (then it’s removed; register again). Where this server can’t send to it yet, `push_not_set_up`. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DeviceId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Send a test notification",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "501": {
            "description": "push_not_set_up",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "push_not_set_up"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.devices.test",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ]
      }
    },
    "/v1/push/settings": {
      "get": {
        "operationId": "getPushSettings",
        "summary": "The person’s notification settings",
        "description": "Their mute, whether an assistant stuck on a card still notifies while muted, whether lock screens show the question, and which new cards notify: the same settings as on the web, for every device. Also in GET /v1/snapshot as `notify`. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The person’s notification settings",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotifySettings"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.settings",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      },
      "patch": {
        "operationId": "updatePushSettings",
        "summary": "Change the person’s notification settings",
        "description": "The fields sent change; the rest stay. `mute`: `1h`, `2h`, `tomorrow` (8:00 AM in `timeZone`) or `forever`, or null to turn notifications back on. The web shows the change too: they’re one set of settings. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Change the person’s notification settings",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotifySettings"
                }
              }
            }
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available"
            ]
          },
          "409": {
            "description": "idempotency_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_in_progress"
            ]
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "idempotency_mismatch"
            ]
          },
          "426": {
            "description": "client_outdated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "client_outdated"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.settings.update",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "write",
          "workspace"
        ],
        "x-pendingyou-idempotency": "optional"
      }
    },
    "/v1/push/notifications/{id}": {
      "get": {
        "operationId": "getPushNotification",
        "summary": "What a card’s notification says",
        "description": "For Pending You’s iPhone app’s notification service extension, after a push (which carries ids, `reason` and a neutral line only): the words a browser’s notification says for this card, by the person’s choice to show the question on the lock screen, with `reason` as the push carried it. A reason it doesn’t know answers the neutral line. `gone`: the card no longer waits on the person for that reason; drop the notification or show the words. Any failure: keep the neutral line. Pending You’s own apps only (notify:manage).",
        "tags": [
          "push"
        ],
        "security": [
          {
            "oauth2": [
              "notify:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CardId"
          },
          {
            "$ref": "#/components/parameters/PendingYouVersion"
          },
          {
            "$ref": "#/components/parameters/PendingYouClient"
          },
          {
            "$ref": "#/components/parameters/DPoP"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What a card’s notification says",
            "headers": {
              "Pending-You-Version": {
                "$ref": "#/components/headers/PendingYouVersion"
              },
              "Pending-You-Client-Status": {
                "$ref": "#/components/headers/PendingYouClientStatus"
              },
              "DPoP-Nonce": {
                "$ref": "#/components/headers/DPoPNonce"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushNotificationWords"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: If-None-Match named this answer’s ETag."
          },
          "400": {
            "description": "invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "invalid"
            ]
          },
          "401": {
            "description": "invalid_token, invalid_dpop_proof or use_dpop_nonce (OAuth, with WWW-Authenticate)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "app_not_available; forbidden; insufficient_scope (OAuth, with WWW-Authenticate naming the scope)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            },
            "x-pendingyou-problems": [
              "app_not_available",
              "forbidden"
            ]
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "not_found"
            ]
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "rate_limited"
            ]
          },
          "500": {
            "description": "server_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "server_error"
            ]
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-pendingyou-problems": [
              "unavailable"
            ]
          }
        },
        "x-pendingyou-name": "push.notification",
        "x-pendingyou-scope": "notify:manage",
        "x-pendingyou-limits": [
          "read",
          "workspace"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Me": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^usr_[A-Za-z0-9-]+$"
              }
            },
            "required": [
              "id"
            ]
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^ws_[A-Za-z0-9-]+$"
              }
            },
            "required": [
              "id"
            ]
          },
          "app": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^app_[A-Za-z0-9-]+$"
              },
              "name": {
                "type": "string"
              },
              "verified": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "verified"
            ]
          },
          "grant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^apg_[A-Za-z0-9-]+$"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "cards:read",
                        "cards:read:all",
                        "cards:answer",
                        "cards:reply",
                        "cards:later",
                        "cards:delegate",
                        "assistants:read",
                        "assistants:show",
                        "presence:desk",
                        "cards:high_stakes",
                        "cards:manage",
                        "notify:manage",
                        "assistants:manage",
                        "account:manage",
                        "presence:focus"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "reach": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "machine",
                      "all"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "machine": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^mch_[A-Za-z0-9-]+$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "dpop": {
                "type": "boolean"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "yesKey": {
                "type": "object",
                "properties": {
                  "registeredAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "registeredAt"
                ]
              }
            },
            "required": [
              "id",
              "scopes",
              "reach",
              "dpop",
              "createdAt",
              "expiresAt"
            ]
          }
        },
        "required": [
          "user",
          "workspace",
          "app",
          "grant"
        ]
      },
      "Card": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "delegated",
                  "answered",
                  "resolved",
                  "snoozed",
                  "expired",
                  "cancelled"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "turn": {
            "type": "string",
            "enum": [
              "you",
              "agent"
            ]
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "choice",
                  "multi",
                  "approve",
                  "text",
                  "review",
                  "action",
                  "fyi",
                  "group",
                  "answer"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "intent": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "decide",
                  "approve",
                  "do",
                  "tell",
                  "heads_up"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "summaryRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Run"
            }
          },
          "textRuns": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Run"
              }
            }
          },
          "urgency": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "now",
                  "today",
                  "whenever"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "blocking": {
            "type": "boolean"
          },
          "fallback": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "text",
              "at"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                },
                "detail": {
                  "type": "string",
                  "maxLength": 200
                },
                "consequence": {
                  "type": "string",
                  "maxLength": 200
                },
                "sends": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "required": [
                    "to"
                  ]
                }
              },
              "required": [
                "id",
                "label"
              ]
            }
          },
          "recommendedIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rationale": {
            "type": "string"
          },
          "multi": {
            "type": "object",
            "properties": {
              "min": {
                "type": "integer"
              },
              "max": {
                "type": "integer"
              }
            },
            "required": [
              "min",
              "max"
            ]
          },
          "approve": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string"
              },
              "command": {
                "type": "string"
              },
              "risk": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "reversible": {
                "type": "boolean"
              },
              "because": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "spends",
                      "irreversible",
                      "public"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "action",
              "risk",
              "reversible"
            ]
          },
          "text": {
            "type": "object",
            "properties": {
              "placeholder": {
                "type": "string"
              },
              "suggestions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "long": {
                "type": "boolean"
              }
            },
            "required": [
              "placeholder"
            ]
          },
          "action": {
            "type": "object",
            "properties": {
              "where": {
                "type": "string"
              },
              "steps": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^s[1-9][0-9]{0,4}$"
                        },
                        "text": {
                          "type": "string"
                        },
                        "command": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "text"
                      ]
                    }
                  ]
                }
              },
              "done": {
                "type": "string"
              },
              "command": {
                "type": "string"
              },
              "verify": {
                "type": "string"
              }
            },
            "required": [
              "steps"
            ]
          },
          "progress": {
            "$ref": "#/components/schemas/StepProgress"
          },
          "questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]{1,40}$"
                },
                "kind": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "choice",
                        "multi",
                        "approve",
                        "text"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "title": {
                  "type": "string",
                  "maxLength": 140
                },
                "detail": {
                  "type": "string",
                  "maxLength": 200
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "detail": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "consequence": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "sends": {
                        "type": "object",
                        "properties": {
                          "to": {
                            "type": "string",
                            "maxLength": 120
                          }
                        },
                        "required": [
                          "to"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "label"
                    ]
                  }
                },
                "recommendedIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "rationale": {
                  "type": "string",
                  "maxLength": 200
                },
                "multi": {
                  "type": "object",
                  "properties": {
                    "min": {
                      "type": "number"
                    },
                    "max": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ]
                },
                "approve": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "command": {
                      "type": "string"
                    },
                    "risk": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "reversible": {
                      "type": "boolean"
                    },
                    "because": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "spends",
                            "irreversible",
                            "public"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  },
                  "required": [
                    "action",
                    "risk",
                    "reversible"
                  ]
                },
                "highStakes": {
                  "type": "boolean"
                },
                "text": {
                  "type": "object",
                  "properties": {
                    "placeholder": {
                      "type": "string"
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "long": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "placeholder"
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "title"
              ]
            }
          },
          "about": {
            "type": "object",
            "properties": {
              "kind": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "email",
                      "pr",
                      "booking",
                      "document",
                      "other"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "ref": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              }
            },
            "required": [
              "kind",
              "title"
            ]
          },
          "threadId": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "follows": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "highStakes": {
            "type": "boolean"
          },
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "answer",
                    "undo",
                    "reply",
                    "later",
                    "back",
                    "delegate",
                    "take_back",
                    "tick",
                    "finish"
                  ]
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "area": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^prj_[A-Za-z0-9-]+$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "asker": {
            "type": "object",
            "properties": {
              "assistant": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^con_[A-Za-z0-9-]+$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "app": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "claude-code",
                          "codex",
                          "cursor",
                          "gemini-cli",
                          "opencode",
                          "pi",
                          "antigravity",
                          "grok",
                          "muse",
                          "chatgpt",
                          "claude",
                          "dots",
                          "other",
                          "webhook"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "appName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "app",
                  "appName"
                ]
              },
              "agent": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^agt_[A-Za-z0-9-]+$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "shownName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "task": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "cwd": {
                    "type": "string"
                  },
                  "branch": {
                    "type": "string"
                  }
                },
                "required": [
                  "label"
                ]
              },
              "machine": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^mch_[A-Za-z0-9-]+$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "required": [
              "assistant",
              "task"
            ]
          },
          "askedFirst": {
            "type": "object",
            "properties": {
              "where": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "terminal",
                      "chat"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "why": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "quiet",
                      "away"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "where",
              "at"
            ]
          },
          "answer": {
            "$ref": "#/components/schemas/Answer"
          },
          "undoUntil": {
            "type": "string",
            "format": "date-time"
          },
          "snoozedUntil": {
            "type": "string",
            "format": "date-time"
          },
          "sendTo": {
            "$ref": "#/components/schemas/SendTo"
          },
          "drafted": {
            "type": "object",
            "properties": {
              "by": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "claude-code",
                      "codex",
                      "opencode",
                      "pi"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "model": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9.:_-]{0,39}$"
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "said": {
                "type": "string",
                "minLength": 1,
                "maxLength": 6000
              }
            },
            "required": [
              "by",
              "model",
              "confidence"
            ]
          },
          "delegation": {
            "type": "object",
            "properties": {
              "to": {
                "type": "object",
                "properties": {
                  "assistantId": {
                    "type": "string",
                    "pattern": "^con_[A-Za-z0-9-]+$"
                  },
                  "agentId": {
                    "type": "string",
                    "pattern": "^agt_[A-Za-z0-9-]+$"
                  }
                },
                "required": [
                  "assistantId"
                ]
              },
              "mode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "freely",
                      "loop"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "state": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "working",
                      "suggested",
                      "answered",
                      "returned",
                      "taken_back"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "onStandingOk": {
                "type": "boolean",
                "const": true
              },
              "pickedUpAt": {
                "type": "string",
                "format": "date-time"
              },
              "returnAt": {
                "type": "string",
                "format": "date-time"
              },
              "working": {
                "type": "object",
                "properties": {
                  "doing": {
                    "type": "string"
                  },
                  "since": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "until": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "doing",
                  "since",
                  "until"
                ]
              },
              "resumes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "handedBackAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "found": {
                      "type": "string"
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "blocked",
                            "needs_person",
                            "not_mine"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  },
                  "required": [
                    "at",
                    "handedBackAt"
                  ]
                }
              }
            },
            "required": [
              "to",
              "mode",
              "state",
              "at"
            ]
          },
          "ask": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "from": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "helper",
                      "asker"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "why": {
                "type": "string"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "detail": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "consequence": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "sends": {
                      "type": "object",
                      "properties": {
                        "to": {
                          "type": "string",
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "to"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "label"
                  ]
                }
              },
              "recommendedIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rationale": {
                "type": "string"
              },
              "artifacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "image",
                            "diff",
                            "url",
                            "file",
                            "draft",
                            "code"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "attachmentId": {
                      "type": "string"
                    },
                    "upload": {
                      "description": "image or file: true for an uploadUrl",
                      "type": "boolean"
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "caption": {
                      "type": "string"
                    },
                    "lang": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "ts",
                            "json",
                            "shell",
                            "sql",
                            "yaml",
                            "toml",
                            "css",
                            "markdown",
                            "text"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "startLine": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "kind",
                    "title",
                    "ref"
                  ]
                }
              },
              "action": {
                "type": "object",
                "properties": {
                  "where": {
                    "type": "string"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^s[1-9][0-9]{0,4}$"
                            },
                            "text": {
                              "type": "string"
                            },
                            "command": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        }
                      ]
                    }
                  },
                  "done": {
                    "type": "string"
                  },
                  "command": {
                    "type": "string"
                  },
                  "verify": {
                    "type": "string"
                  }
                },
                "required": [
                  "steps"
                ]
              },
              "highStakes": {
                "type": "boolean"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "answered": {
                "type": "object",
                "properties": {
                  "choiceIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "done": {
                    "type": "boolean"
                  },
                  "text": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "answeredAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "answeredAt"
                ]
              }
            },
            "required": [
              "id",
              "from",
              "name",
              "title",
              "highStakes",
              "at"
            ]
          },
          "context": {
            "type": "object",
            "properties": {
              "background": {
                "type": "string"
              },
              "trace": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "done",
                            "paused",
                            "warn",
                            "failed"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "text"
                  ]
                }
              },
              "filesTouched": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tried": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "label",
                    "url"
                  ]
                }
              }
            },
            "required": [
              "background",
              "trace",
              "filesTouched",
              "tried",
              "links"
            ]
          },
          "backgroundDoc": {
            "$ref": "#/components/schemas/Doc"
          },
          "artifacts": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "image",
                            "diff",
                            "url",
                            "file",
                            "draft",
                            "code"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "attachmentId": {
                      "type": "string"
                    },
                    "upload": {
                      "description": "image or file: true for an uploadUrl",
                      "type": "boolean"
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "caption": {
                      "type": "string"
                    },
                    "lang": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "ts",
                            "json",
                            "shell",
                            "sql",
                            "yaml",
                            "toml",
                            "css",
                            "markdown",
                            "text"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "startLine": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "kind",
                    "title",
                    "ref"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "path"
                    },
                    "title": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "machine": {
                      "type": "string"
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "modifiedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "fetch": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "title",
                    "path"
                  ]
                }
              ]
            }
          },
          "asked": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "text"
            ]
          },
          "body": {
            "$ref": "#/components/schemas/Doc"
          },
          "asOf": {
            "type": "string",
            "format": "date-time"
          },
          "dataSource": {
            "type": "string"
          },
          "dataSourceRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Run"
            }
          },
          "inChat": {
            "type": "boolean"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "hasFiles": {
            "type": "boolean",
            "const": true
          },
          "thread": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^msg_[A-Za-z0-9-]+$"
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "you",
                        "agent",
                        "pendingyou",
                        "helper",
                        "teammate"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "teammate": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ]
                },
                "body": {
                  "type": "string"
                },
                "via": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "voice",
                        "text"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "audioSeconds": {
                  "type": "number"
                },
                "attachmentIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^att_[A-Za-z0-9-]+$"
                  }
                },
                "app": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^app_[A-Za-z0-9-]+$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "machine": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ]
                },
                "doc": {
                  "$ref": "#/components/schemas/Doc"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "author",
                "body",
                "createdAt"
              ]
            }
          },
          "threadCount": {
            "type": "integer",
            "minimum": 0
          },
          "newReply": {
            "$ref": "#/components/schemas/NewReply"
          },
          "lane": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "new",
                  "motion",
                  "later",
                  "done"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "section": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "yours",
                  "theirs"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "settled": {
            "type": "string",
            "const": "words"
          },
          "filedAt": {
            "type": "string",
            "format": "date-time"
          },
          "unread": {
            "type": "boolean",
            "const": true
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "presentation": {
            "$ref": "#/components/schemas/Presentation"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "status",
          "turn",
          "kind",
          "title",
          "summary",
          "urgency",
          "blocking",
          "highStakes",
          "actions",
          "area",
          "asker",
          "threadCount",
          "url",
          "createdAt",
          "updatedAt"
        ]
      },
      "Answer": {
        "type": "object",
        "properties": {
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "choiceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "approved": {
                  "type": "boolean"
                },
                "text": {
                  "type": "string",
                  "maxLength": 4000
                },
                "note": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 4000
                    },
                    "via": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "voice",
                            "text"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "audioSeconds": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "text",
                    "via"
                  ]
                },
                "theyDecide": {
                  "type": "boolean"
                }
              }
            }
          },
          "choiceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approved": {
            "type": "boolean"
          },
          "text": {
            "type": "string"
          },
          "note": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "maxLength": 4000
              },
              "via": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "voice",
                      "text"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "audioSeconds": {
                "type": "number"
              }
            },
            "required": [
              "text",
              "via"
            ]
          },
          "theyDecide": {
            "type": "boolean"
          },
          "failed": {
            "type": "boolean",
            "const": true
          },
          "failedStep": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "handled": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "self",
                  "leave"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "notSent": {
            "type": "boolean",
            "const": true
          },
          "notNeeded": {
            "type": "boolean",
            "const": true
          },
          "closed": {
            "type": "boolean",
            "const": true
          },
          "by": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "you",
                  "go-between",
                  "helper",
                  "teammate"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "helper": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "why": {
                "type": "string"
              },
              "note": {
                "type": "string",
                "maxLength": 1000
              }
            },
            "required": [
              "name",
              "why"
            ]
          },
          "where": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "app",
                  "conversation"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "app": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^app_[A-Za-z0-9-]+$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "machine": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "answeredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "answeredAt"
        ]
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^att_[A-Za-z0-9-]+$"
          },
          "place": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "card",
                  "message",
                  "answer"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "waiting",
                  "ready",
                  "failed",
                  "removed"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "width": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "height": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "downloadUrl": {
            "type": "string",
            "format": "uri"
          },
          "thumbUrl": {
            "type": "string",
            "format": "uri"
          },
          "previewUrl": {
            "type": "string",
            "format": "uri"
          },
          "downloadExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "place",
          "status",
          "title"
        ]
      },
      "NewReply": {
        "type": "object",
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "report"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "messageId": {
            "type": "string"
          },
          "preview": {
            "type": "string"
          },
          "answersYou": {
            "type": "boolean"
          },
          "asked": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "text",
              "at"
            ]
          }
        },
        "required": [
          "at",
          "messageId",
          "preview",
          "answersYou"
        ]
      },
      "SendTo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "assistant",
                  "teammate"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "to": {
            "type": "object",
            "properties": {
              "assistantId": {
                "type": "string",
                "pattern": "^con_[A-Za-z0-9-]+$"
              },
              "agentId": {
                "type": "string",
                "pattern": "^agt_[A-Za-z0-9-]+$"
              }
            },
            "required": [
              "assistantId",
              "agentId"
            ]
          },
          "mode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "freely",
                  "loop"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "helped": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "answered": {
                "type": "boolean"
              },
              "theirs": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "title",
              "at",
              "answered"
            ]
          }
        },
        "required": [
          "name",
          "kind"
        ]
      },
      "StepProgress": {
        "type": "object",
        "properties": {
          "rev": {
            "type": "integer",
            "minimum": 0
          },
          "done": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^s[1-9][0-9]{0,4}$"
            }
          },
          "unticked": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^s[1-9][0-9]{0,4}$"
            }
          },
          "agent": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^s[1-9][0-9]{0,4}$"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "how": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "saw",
                        "told"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "at",
                "how"
              ]
            }
          },
          "failed": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^s[1-9][0-9]{0,4}$"
              },
              "n": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "by": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "you",
                      "agent"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "n",
              "by",
              "at"
            ]
          },
          "change": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "added": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^s[1-9][0-9]{0,4}$"
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^s[1-9][0-9]{0,4}$"
                }
              },
              "removed": {
                "type": "integer",
                "minimum": 0
              },
              "before": {
                "type": "string",
                "pattern": "^s[1-9][0-9]{0,4}$"
              },
              "ticksOff": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^s[1-9][0-9]{0,4}$"
                }
              },
              "failed": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^s[1-9][0-9]{0,4}$"
                  },
                  "n": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "by": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "you",
                          "agent"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "n",
                  "by",
                  "at"
                ]
              }
            },
            "required": [
              "at",
              "added",
              "changed",
              "removed"
            ]
          }
        },
        "required": [
          "rev",
          "done"
        ]
      },
      "Doc": {
        "type": "object",
        "properties": {
          "v": {
            "type": "number",
            "const": 1
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Block"
            }
          },
          "plain": {
            "type": "string"
          }
        },
        "required": [
          "v",
          "blocks"
        ]
      },
      "Block": {
        "anyOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "p"
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Run"
                    }
                  }
                },
                "required": [
                  "t",
                  "runs"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "heading"
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Run"
                    }
                  }
                },
                "required": [
                  "t",
                  "runs"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "list"
                  },
                  "ordered": {
                    "type": "boolean"
                  },
                  "start": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "blocks": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Block"
                          }
                        },
                        "done": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "blocks"
                      ]
                    }
                  }
                },
                "required": [
                  "t",
                  "ordered",
                  "items"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "quote"
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Block"
                    }
                  }
                },
                "required": [
                  "t",
                  "blocks"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "code"
                  },
                  "lang": {
                    "type": "string"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "t",
                  "lines"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "table"
                  },
                  "head": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Run"
                      }
                    }
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Run"
                        }
                      }
                    }
                  },
                  "align": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "left",
                            "right",
                            "center"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  },
                  "compact": {
                    "type": "boolean"
                  },
                  "caption": {
                    "type": "string"
                  },
                  "more": {
                    "type": "object",
                    "properties": {
                      "rows": {
                        "type": "integer"
                      },
                      "columns": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "required": [
                  "t",
                  "head",
                  "rows",
                  "align",
                  "compact"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "rule"
                  }
                },
                "required": [
                  "t"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "cut"
                  }
                },
                "required": [
                  "t"
                ]
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "t": {
                "type": "string",
                "description": "A kind this version doesn’t know: /v1 adds kinds, so read past it (a doc has its `plain`)."
              }
            },
            "required": [
              "t"
            ]
          }
        ]
      },
      "Run": {
        "anyOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "text"
                  },
                  "text": {
                    "type": "string"
                  },
                  "b": {
                    "type": "boolean",
                    "const": true
                  },
                  "i": {
                    "type": "boolean",
                    "const": true
                  },
                  "s": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "t",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "code"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "t",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "br"
                  }
                },
                "required": [
                  "t"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "address"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "t",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "t": {
                    "type": "string",
                    "const": "link"
                  },
                  "href": {
                    "type": "string",
                    "format": "uri"
                  },
                  "words": {
                    "type": "string"
                  },
                  "site": {
                    "type": "string"
                  },
                  "asWritten": {
                    "type": "boolean",
                    "const": true
                  },
                  "own": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "card",
                              "page"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "id": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  },
                  "b": {
                    "type": "boolean",
                    "const": true
                  },
                  "i": {
                    "type": "boolean",
                    "const": true
                  },
                  "s": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "t",
                  "href",
                  "words",
                  "site"
                ]
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "t": {
                "type": "string",
                "description": "A kind this version doesn’t know: /v1 adds kinds, so read past it (a doc has its `plain`)."
              }
            },
            "required": [
              "t"
            ]
          }
        ]
      },
      "Presentation": {
        "type": "object",
        "properties": {
          "v": {
            "type": "number",
            "const": 1
          },
          "layout": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "choice",
                  "multi",
                  "approve",
                  "draft",
                  "review",
                  "todo",
                  "text",
                  "update",
                  "group",
                  "ask",
                  "permission",
                  "answer",
                  "settled",
                  "fallback"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "head": {
            "type": "object",
            "properties": {
              "intent": {
                "type": "object",
                "properties": {
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "decide",
                          "approve",
                          "do",
                          "tell",
                          "heads_up"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "label": {
                    "$ref": "#/components/schemas/Line"
                  }
                },
                "required": [
                  "kind",
                  "label"
                ]
              },
              "wait": {
                "type": "object",
                "properties": {
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "tone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "you",
                          "deadline",
                          "quiet"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "line",
                  "tone"
                ]
              },
              "marks": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "files",
                        "high_stakes"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            },
            "required": [
              "marks"
            ]
          },
          "above": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "asked_first",
                        "helper",
                        "note"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "title": {
                  "$ref": "#/components/schemas/Line"
                },
                "body": {
                  "$ref": "#/components/schemas/Line"
                }
              },
              "required": [
                "kind",
                "body"
              ]
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "suggested": {
                  "$ref": "#/components/schemas/Line"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "preselected": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "steps": {
            "$ref": "#/components/schemas/PresentationSteps"
          },
          "below": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Line"
            }
          },
          "box": {
            "type": "object",
            "properties": {
              "mode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "hidden",
                      "on_demand",
                      "open"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "placeholder": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "mode"
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresentationAction"
            }
          },
          "settled": {
            "$ref": "#/components/schemas/Line"
          },
          "fallbackAhead": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "line": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "label",
              "line"
            ]
          },
          "context": {
            "type": "object",
            "properties": {
              "why": {
                "$ref": "#/components/schemas/Line"
              },
              "didSoFar": {
                "$ref": "#/components/schemas/Line"
              },
              "tried": {
                "$ref": "#/components/schemas/Line"
              }
            }
          },
          "route": {
            "type": "object",
            "properties": {
              "first": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "who": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "asker",
                          "webhook",
                          "person",
                          "helper",
                          "their_assistant"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "who"
                ]
              },
              "hidden": {
                "type": "boolean"
              },
              "current": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "who": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "asker",
                          "webhook",
                          "person",
                          "helper",
                          "their_assistant"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "who"
                ]
              },
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "state": {
                "$ref": "#/components/schemas/Line"
              },
              "spoken": {
                "$ref": "#/components/schemas/Line"
              },
              "tone": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "quiet",
                      "stalled",
                      "you"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "time": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "line": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "detail": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "quote": {
                      "type": "string"
                    },
                    "quoted": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "who": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "asker",
                            "webhook",
                            "person",
                            "helper",
                            "their_assistant",
                            "you"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "source": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "claude-code",
                            "codex",
                            "cursor",
                            "gemini-cli",
                            "opencode",
                            "pi",
                            "antigravity",
                            "grok",
                            "muse",
                            "chatgpt",
                            "claude",
                            "dots",
                            "other",
                            "webhook",
                            "teammate"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "when": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "past",
                            "now",
                            "next"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "time": {
                            "$ref": "#/components/schemas/Line"
                          },
                          "line": {
                            "$ref": "#/components/schemas/Line"
                          },
                          "detail": {
                            "$ref": "#/components/schemas/Line"
                          },
                          "quote": {
                            "type": "string"
                          },
                          "quoted": {
                            "$ref": "#/components/schemas/Line"
                          },
                          "who": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "asker",
                                  "webhook",
                                  "person",
                                  "helper",
                                  "their_assistant",
                                  "you"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "source": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "claude-code",
                                  "codex",
                                  "cursor",
                                  "gemini-cli",
                                  "opencode",
                                  "pi",
                                  "antigravity",
                                  "grok",
                                  "muse",
                                  "chatgpt",
                                  "claude",
                                  "dots",
                                  "other",
                                  "webhook",
                                  "teammate"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "when": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "past",
                                  "now",
                                  "next"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          }
                        },
                        "required": [
                          "line",
                          "who",
                          "when"
                        ]
                      }
                    }
                  },
                  "required": [
                    "line",
                    "who",
                    "when"
                  ]
                }
              }
            },
            "required": [
              "first",
              "hidden",
              "current",
              "label",
              "tone"
            ]
          },
          "row": {
            "type": "object",
            "properties": {
              "title": {
                "$ref": "#/components/schemas/Line"
              },
              "meta": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Line"
                }
              },
              "turn": {
                "$ref": "#/components/schemas/Line"
              },
              "motion": {
                "$ref": "#/components/schemas/Line"
              },
              "last": {
                "type": "object",
                "properties": {
                  "who": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "words": {
                    "$ref": "#/components/schemas/Line"
                  }
                },
                "required": [
                  "who",
                  "words"
                ]
              },
              "area": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^prj_[A-Za-z0-9_-]+$"
                  },
                  "label": {
                    "$ref": "#/components/schemas/Line"
                  }
                },
                "required": [
                  "id",
                  "label"
                ]
              },
              "lane": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "new",
                      "motion",
                      "later",
                      "done"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "section": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "yours",
                      "theirs"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "unread": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "title",
              "meta"
            ]
          },
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          },
          "reply": {
            "$ref": "#/components/schemas/Reply"
          },
          "ask": {
            "$ref": "#/components/schemas/AskFace"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailFace"
            }
          },
          "talk": {
            "$ref": "#/components/schemas/CardTalk"
          },
          "helper": {
            "$ref": "#/components/schemas/HelperBox"
          },
          "seen": {
            "type": "object",
            "properties": {
              "upTo": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "upTo"
            ]
          },
          "fallback": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "path": {
                "type": "string"
              }
            },
            "required": [
              "line",
              "path"
            ]
          }
        },
        "required": [
          "v",
          "layout",
          "head",
          "above",
          "below",
          "box",
          "actions",
          "row",
          "fallback"
        ]
      },
      "PresentationAction": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "answer",
                  "answer.option",
                  "answer.approve",
                  "answer.decline",
                  "answer.done",
                  "answer.got_it",
                  "answer.allow",
                  "answer.deny",
                  "answer.send_words",
                  "answer.send_changes",
                  "answer.ask_keep_open",
                  "didnt_work",
                  "handle",
                  "skip",
                  "later",
                  "back",
                  "delegate",
                  "take_back",
                  "reply",
                  "details",
                  "undo",
                  "open_web"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "label": {
            "$ref": "#/components/schemas/Line"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "send",
                  "check",
                  "x",
                  "clock",
                  "forward",
                  "reply",
                  "info",
                  "undo",
                  "back",
                  "open",
                  "hand"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "place": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "primary",
                  "secondary",
                  "link",
                  "overflow",
                  "dock"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "style": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "primary",
                  "secondary",
                  "quiet",
                  "ghost",
                  "danger"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "confirm": {
            "type": "object",
            "properties": {
              "kind": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "hold",
                      "tap"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "prompt": {
                "$ref": "#/components/schemas/Line"
              },
              "yes": {
                "$ref": "#/components/schemas/Line"
              },
              "proof": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes_key"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "prompt",
              "yes",
              "proof"
            ]
          },
          "sends": {
            "type": "object",
            "properties": {
              "approved": {
                "type": "boolean"
              },
              "choiceIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "theyDecide": {
                "type": "boolean",
                "const": true
              },
              "handled": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "self",
                      "leave"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            }
          },
          "needs": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "choice",
                  "words"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "disabledLabel": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "id",
          "label",
          "icon",
          "place",
          "style"
        ]
      },
      "PresentationSteps": {
        "type": "object",
        "properties": {
          "count": {
            "$ref": "#/components/schemas/Line"
          },
          "fold": {
            "type": "object",
            "properties": {
              "through": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "agent": {
                "$ref": "#/components/schemas/Line"
              },
              "show": {
                "$ref": "#/components/schemas/Line"
              },
              "hide": {
                "$ref": "#/components/schemas/Line"
              },
              "showLabel": {
                "$ref": "#/components/schemas/Line"
              },
              "hideLabel": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "through",
              "line",
              "show",
              "hide",
              "showLabel",
              "hideLabel"
            ]
          },
          "change": {
            "type": "object",
            "properties": {
              "before": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "failed": {
                "$ref": "#/components/schemas/Line"
              },
              "head": {
                "$ref": "#/components/schemas/Line"
              },
              "note": {
                "$ref": "#/components/schemas/Line"
              },
              "removed": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "before",
              "at"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "n": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "state": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "done",
                        "next",
                        "todo",
                        "failed"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "mark": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "new",
                        "changed"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "by": {
                  "type": "object",
                  "properties": {
                    "how": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "saw",
                            "told"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "line": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "label": {
                      "$ref": "#/components/schemas/Line"
                    }
                  },
                  "required": [
                    "how",
                    "at",
                    "line",
                    "label"
                  ]
                },
                "changedAfter": {
                  "$ref": "#/components/schemas/Line"
                },
                "runs": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Run"
                  }
                }
              },
              "required": [
                "id",
                "n",
                "state"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Conversation": {
        "type": "object",
        "properties": {
          "shown": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "earlier": {
            "$ref": "#/components/schemas/Line"
          },
          "newBefore": {
            "type": "string"
          },
          "fold": {
            "type": "object",
            "properties": {
              "head": {
                "type": "object",
                "properties": {
                  "who": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "time": {
                    "$ref": "#/components/schemas/Line"
                  }
                }
              },
              "day": {
                "$ref": "#/components/schemas/Line"
              },
              "hidesNew": {
                "type": "boolean",
                "const": true
              }
            }
          },
          "left": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "leftLine": {
            "$ref": "#/components/schemas/Line"
          },
          "live": {
            "$ref": "#/components/schemas/ConversationLive"
          },
          "before": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "card",
                            "asked",
                            "line"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "cardId": {
                      "type": "string",
                      "pattern": "^req_[A-Za-z0-9_-]+$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "question": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "line": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "message",
                            "handed",
                            "handed_back",
                            "taken_back",
                            "back",
                            "reopened"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "messageId": {
                      "type": "string"
                    },
                    "time": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "mark": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "answered",
                                "fallback",
                                "withdrawn",
                                "later",
                                "delegated",
                                "you",
                                "said",
                                "handed",
                                "back"
                              ]
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "tone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "ok",
                                "quiet"
                              ]
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "tone"
                      ]
                    },
                    "outcome": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "route": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "who": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "asker",
                                    "webhook",
                                    "person",
                                    "helper",
                                    "their_assistant"
                                  ]
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "who"
                          ]
                        },
                        "hidden": {
                          "type": "boolean"
                        },
                        "current": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "who": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "asker",
                                    "webhook",
                                    "person",
                                    "helper",
                                    "their_assistant"
                                  ]
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "who"
                          ]
                        },
                        "label": {
                          "$ref": "#/components/schemas/Line"
                        },
                        "state": {
                          "$ref": "#/components/schemas/Line"
                        },
                        "spoken": {
                          "$ref": "#/components/schemas/Line"
                        },
                        "tone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "quiet",
                                "stalled",
                                "you"
                              ]
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "first",
                        "hidden",
                        "current",
                        "label",
                        "tone"
                      ]
                    },
                    "note": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "withdrawn": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "state": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "talked": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "said": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "style": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "you",
                            "agent",
                            "event",
                            "note"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "who": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "words": {
                      "type": "object",
                      "properties": {
                        "line": {
                          "$ref": "#/components/schemas/Line"
                        },
                        "runs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Run"
                          }
                        }
                      },
                      "required": [
                        "line"
                      ]
                    },
                    "doc": {
                      "$ref": "#/components/schemas/Doc"
                    }
                  },
                  "required": [
                    "kind",
                    "cardId",
                    "at"
                  ]
                }
              },
              "more": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  }
                },
                "required": [
                  "count",
                  "line"
                ]
              },
              "next": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              }
            },
            "required": [
              "items"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationItem"
            }
          }
        },
        "required": [
          "shown",
          "items"
        ]
      },
      "ConversationItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "side": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "you",
                  "assistant",
                  "note"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "head": {
            "type": "object",
            "properties": {
              "who": {
                "$ref": "#/components/schemas/Line"
              },
              "time": {
                "$ref": "#/components/schemas/Line"
              }
            }
          },
          "day": {
            "$ref": "#/components/schemas/Line"
          },
          "words": {
            "$ref": "#/components/schemas/Line"
          },
          "attachmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "via": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "voice",
                  "text"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "label": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "id",
          "side",
          "at"
        ]
      },
      "ConversationLive": {
        "type": "object",
        "properties": {
          "original": {
            "type": "object",
            "properties": {
              "open": {
                "type": "boolean"
              },
              "show": {
                "$ref": "#/components/schemas/Line"
              },
              "hide": {
                "$ref": "#/components/schemas/Line"
              },
              "progress": {
                "$ref": "#/components/schemas/Line"
              },
              "chips": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "line": {
                      "$ref": "#/components/schemas/Line"
                    }
                  },
                  "required": [
                    "ref",
                    "kind",
                    "line"
                  ]
                }
              }
            },
            "required": [
              "open",
              "show",
              "hide"
            ]
          },
          "reAsk": {
            "type": "object",
            "properties": {
              "under": {
                "type": "string"
              },
              "placeholder": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "under",
              "placeholder"
            ]
          },
          "chose": {
            "type": "object",
            "properties": {
              "under": {
                "type": "string"
              },
              "line": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "under",
              "line"
            ]
          },
          "openAt": {
            "type": "string"
          }
        },
        "required": [
          "original"
        ]
      },
      "Reply": {
        "type": "object",
        "properties": {
          "head": {
            "$ref": "#/components/schemas/Line"
          },
          "label": {
            "$ref": "#/components/schemas/Line"
          },
          "time": {
            "$ref": "#/components/schemas/Line"
          },
          "quote": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "words": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "label"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "time": {
                  "$ref": "#/components/schemas/Line"
                },
                "words": {
                  "$ref": "#/components/schemas/Line"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "preview": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "words": {
                "$ref": "#/components/schemas/Line"
              },
              "time": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "id",
              "at",
              "words"
            ]
          },
          "replyTo": {
            "$ref": "#/components/schemas/Line"
          },
          "earlier": {
            "$ref": "#/components/schemas/Line"
          },
          "earlierLabel": {
            "$ref": "#/components/schemas/Line"
          },
          "earlierRegion": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "head",
          "label",
          "quote",
          "messages",
          "earlierLabel",
          "earlierRegion"
        ]
      },
      "AskFace": {
        "type": "object",
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/Line"
          },
          "changed": {
            "$ref": "#/components/schemas/Line"
          },
          "context": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "title": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "label",
              "title"
            ]
          },
          "title": {
            "$ref": "#/components/schemas/Line"
          },
          "summary": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "required": [
              "line"
            ]
          },
          "why": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "required": [
              "line"
            ]
          },
          "goesTo": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "tag",
          "title",
          "summary"
        ]
      },
      "EmailFace": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "email"
          },
          "heading": {
            "$ref": "#/components/schemas/Line"
          },
          "label": {
            "$ref": "#/components/schemas/Line"
          },
          "subject": {
            "$ref": "#/components/schemas/Line"
          },
          "from": {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/components/schemas/Line"
              },
              "address": {
                "$ref": "#/components/schemas/Line"
              },
              "initial": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "initial"
            ]
          },
          "to": {
            "$ref": "#/components/schemas/Line"
          },
          "date": {
            "$ref": "#/components/schemas/Line"
          },
          "body": {
            "$ref": "#/components/schemas/Doc"
          },
          "fold": {
            "type": "object",
            "properties": {
              "folded": {
                "type": "boolean"
              },
              "show": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "folded",
              "show"
            ]
          },
          "images": {
            "type": "object",
            "properties": {
              "hidden": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "line": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "hidden",
              "line"
            ]
          },
          "truncated": {
            "$ref": "#/components/schemas/Line"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/Line"
                },
                "size": {
                  "$ref": "#/components/schemas/Line"
                },
                "attachmentId": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        },
        "required": [
          "kind",
          "heading",
          "label",
          "subject",
          "from",
          "body",
          "fold"
        ]
      },
      "CardTalk": {
        "type": "object",
        "properties": {
          "label": {
            "$ref": "#/components/schemas/Line"
          },
          "talked": {
            "$ref": "#/components/schemas/Line"
          },
          "shown": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "left": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "messages": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "helper",
                        "asker",
                        "you",
                        "teammate"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "who": {
                  "$ref": "#/components/schemas/Line"
                },
                "time": {
                  "$ref": "#/components/schemas/Line"
                },
                "words": {
                  "type": "object",
                  "properties": {
                    "line": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Run"
                      }
                    }
                  },
                  "required": [
                    "line"
                  ]
                },
                "stuck": {
                  "type": "object",
                  "properties": {
                    "who": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "found": {
                      "type": "object",
                      "properties": {
                        "line": {
                          "$ref": "#/components/schemas/Line"
                        },
                        "runs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Run"
                          }
                        }
                      },
                      "required": [
                        "line"
                      ]
                    },
                    "needs": {
                      "$ref": "#/components/schemas/Line"
                    },
                    "label": {
                      "$ref": "#/components/schemas/Line"
                    }
                  },
                  "required": [
                    "who",
                    "needs",
                    "label"
                  ]
                }
              },
              "required": [
                "id",
                "from",
                "at",
                "who",
                "time",
                "words"
              ]
            }
          },
          "waiting": {
            "$ref": "#/components/schemas/Line"
          },
          "checkIn": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              }
            },
            "required": [
              "line"
            ]
          }
        },
        "required": [
          "label",
          "talked",
          "shown",
          "messages"
        ]
      },
      "HelperBox": {
        "type": "object",
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/Line"
          },
          "reply": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "required": [
              "line"
            ]
          },
          "needs": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "words": {
                "type": "object",
                "properties": {
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Run"
                    }
                  }
                },
                "required": [
                  "line"
                ]
              }
            },
            "required": [
              "label",
              "words"
            ]
          },
          "said": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "words": {
                "type": "object",
                "properties": {
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Run"
                    }
                  }
                },
                "required": [
                  "line"
                ]
              }
            },
            "required": [
              "label",
              "words"
            ]
          },
          "hadSaid": {
            "type": "object",
            "properties": {
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "words": {
                "type": "object",
                "properties": {
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Run"
                    }
                  }
                },
                "required": [
                  "line"
                ]
              }
            },
            "required": [
              "label",
              "words"
            ]
          }
        },
        "required": [
          "tag"
        ]
      },
      "NewReplyRow": {
        "type": "object",
        "properties": {
          "cardId": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9_-]+$"
          },
          "areaId": {
            "type": "string",
            "pattern": "^prj_[A-Za-z0-9_-]+$"
          },
          "report": {
            "type": "boolean",
            "const": true
          },
          "head": {
            "$ref": "#/components/schemas/Line"
          },
          "time": {
            "$ref": "#/components/schemas/Line"
          },
          "preview": {
            "$ref": "#/components/schemas/Line"
          },
          "about": {
            "$ref": "#/components/schemas/Line"
          },
          "name": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "cardId",
          "areaId",
          "head",
          "time",
          "preview",
          "about",
          "name"
        ]
      },
      "Line": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*$"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LineArg"
            }
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "text"
        ]
      },
      "LineArg": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "format": "date-time"
              },
              "as": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "clock",
                      "duration",
                      "ago",
                      "until",
                      "day",
                      "date",
                      "since",
                      "stamp"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "zone": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              }
            },
            "required": [
              "time",
              "as"
            ]
          },
          {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*$"
              }
            },
            "required": [
              "key"
            ]
          }
        ]
      },
      "Toast": {
        "type": "object",
        "properties": {
          "title": {
            "$ref": "#/components/schemas/Line"
          },
          "detail": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "title"
        ]
      },
      "CardList": {
        "type": "object",
        "properties": {
          "cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "counts": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "waiting": {
                "type": "integer",
                "minimum": 0
              },
              "later": {
                "type": "integer",
                "minimum": 0
              },
              "delegated": {
                "type": "integer",
                "minimum": 0
              },
              "elsewhere": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pending",
              "waiting",
              "later",
              "delegated"
            ]
          },
          "next": {
            "type": "string"
          }
        },
        "required": [
          "cards",
          "counts"
        ]
      },
      "Snapshot": {
        "type": "object",
        "properties": {
          "stack": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^req_[A-Za-z0-9-]+$"
            }
          },
          "lanes": {
            "type": "object",
            "properties": {
              "new": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^req_[A-Za-z0-9-]+$"
                }
              },
              "yours": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^req_[A-Za-z0-9-]+$"
                }
              },
              "theirs": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^req_[A-Za-z0-9-]+$"
                }
              },
              "threads": {
                "type": "object",
                "properties": {
                  "new": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/LaneThread"
                    }
                  },
                  "yours": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/LaneThread"
                    }
                  },
                  "theirs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/LaneThread"
                    }
                  },
                  "later": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/LaneThread"
                    }
                  }
                },
                "required": [
                  "new",
                  "yours",
                  "theirs"
                ]
              },
              "opens": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "motion",
                      "new"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "new",
              "yours",
              "theirs"
            ]
          },
          "pending": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "later": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "delegated": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "done": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "motion": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "counts": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "waiting": {
                "type": "integer",
                "minimum": 0
              },
              "later": {
                "type": "integer",
                "minimum": 0
              },
              "delegated": {
                "type": "integer",
                "minimum": 0
              },
              "done": {
                "type": "integer",
                "minimum": 0
              },
              "elsewhere": {
                "type": "integer",
                "minimum": 0
              },
              "new": {
                "type": "integer",
                "minimum": 0
              },
              "yours": {
                "type": "integer",
                "minimum": 0
              },
              "theirs": {
                "type": "integer",
                "minimum": 0
              },
              "newThreads": {
                "type": "integer",
                "minimum": 0
              },
              "yoursThreads": {
                "type": "integer",
                "minimum": 0
              },
              "theirsThreads": {
                "type": "integer",
                "minimum": 0
              },
              "laterThreads": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pending",
              "waiting",
              "later",
              "delegated",
              "done"
            ]
          },
          "areas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Area"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AreaGroup"
            }
          },
          "notify": {
            "$ref": "#/components/schemas/NotifySettings"
          },
          "newReplies": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewReplyRow"
            }
          },
          "newRepliesLine": {
            "$ref": "#/components/schemas/Line"
          },
          "newRepliesLabel": {
            "$ref": "#/components/schemas/Line"
          },
          "newRepliesRegion": {
            "$ref": "#/components/schemas/Line"
          },
          "newRepliesUnread": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "pending",
          "later",
          "delegated",
          "done",
          "counts",
          "areas",
          "groups"
        ]
      },
      "LaneThread": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "cards": {
            "type": "integer",
            "minimum": 1
          },
          "more": {
            "type": "integer",
            "minimum": 0
          },
          "questions": {
            "$ref": "#/components/schemas/Line"
          },
          "back": {
            "$ref": "#/components/schemas/Line"
          }
        },
        "required": [
          "id",
          "cards",
          "more"
        ]
      },
      "Area": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_[A-Za-z0-9-]+$"
          },
          "name": {
            "type": "string"
          },
          "tint": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "peri",
                  "sage",
                  "peach",
                  "sun",
                  "lilac",
                  "sky",
                  "mint",
                  "rose"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "icon": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "pattern": "^agr_[A-Za-z0-9-]+$"
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "pinnedAt": {
            "type": "string",
            "format": "date-time"
          },
          "hiddenAt": {
            "type": "string",
            "format": "date-time"
          },
          "notify": {
            "type": "object",
            "properties": {
              "mode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "waiting",
                      "muted"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "stillWhenStuck": {
                "type": "boolean"
              }
            },
            "required": [
              "mode",
              "stillWhenStuck"
            ]
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "getting_started"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "archived": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "tint",
          "archived"
        ]
      },
      "AreaGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^agr_[A-Za-z0-9-]+$"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "name",
          "position"
        ]
      },
      "CardResponse": {
        "type": "object",
        "properties": {
          "card": {
            "$ref": "#/components/schemas/Card"
          }
        },
        "required": [
          "card"
        ]
      },
      "ThreadPage": {
        "type": "object",
        "properties": {
          "thread": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^req_[A-Za-z0-9-]+$"
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ThreadItem"
                }
              },
              "more": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "line": {
                    "$ref": "#/components/schemas/Line"
                  }
                },
                "required": [
                  "count",
                  "line"
                ]
              },
              "next": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              }
            },
            "required": [
              "id",
              "items"
            ]
          }
        },
        "required": [
          "thread"
        ]
      },
      "ThreadItem": {
        "type": "object",
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "card",
                  "asked",
                  "line"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "cardId": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9_-]+$"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "question": {
            "$ref": "#/components/schemas/Line"
          },
          "line": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "message",
                  "handed",
                  "handed_back",
                  "taken_back",
                  "back",
                  "reopened"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "messageId": {
            "type": "string"
          },
          "time": {
            "$ref": "#/components/schemas/Line"
          },
          "mark": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "answered",
                      "fallback",
                      "withdrawn",
                      "later",
                      "delegated",
                      "you",
                      "said",
                      "handed",
                      "back"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "tone": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "ok",
                      "quiet"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tone"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/Line"
          },
          "route": {
            "type": "object",
            "properties": {
              "first": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "who": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "asker",
                          "webhook",
                          "person",
                          "helper",
                          "their_assistant"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "who"
                ]
              },
              "hidden": {
                "type": "boolean"
              },
              "current": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "who": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "asker",
                          "webhook",
                          "person",
                          "helper",
                          "their_assistant"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "who"
                ]
              },
              "label": {
                "$ref": "#/components/schemas/Line"
              },
              "state": {
                "$ref": "#/components/schemas/Line"
              },
              "spoken": {
                "$ref": "#/components/schemas/Line"
              },
              "tone": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "quiet",
                      "stalled",
                      "you"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "first",
              "hidden",
              "current",
              "label",
              "tone"
            ]
          },
          "note": {
            "$ref": "#/components/schemas/Line"
          },
          "withdrawn": {
            "$ref": "#/components/schemas/Line"
          },
          "state": {
            "$ref": "#/components/schemas/Line"
          },
          "talked": {
            "$ref": "#/components/schemas/Line"
          },
          "said": {
            "$ref": "#/components/schemas/Line"
          },
          "style": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "you",
                  "agent",
                  "event",
                  "note"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "who": {
            "$ref": "#/components/schemas/Line"
          },
          "words": {
            "type": "object",
            "properties": {
              "line": {
                "$ref": "#/components/schemas/Line"
              },
              "runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "required": [
              "line"
            ]
          },
          "doc": {
            "$ref": "#/components/schemas/Doc"
          }
        },
        "required": [
          "kind",
          "cardId",
          "at"
        ]
      },
      "AnswerResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "askId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "answered"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "undoUntil": {
            "type": "string",
            "format": "date-time"
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "status",
          "version",
          "undoUntil"
        ]
      },
      "CardBack": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "status": {
            "type": "string",
            "const": "pending"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          },
          "others": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^req_[A-Za-z0-9-]+$"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "id",
                "version"
              ]
            }
          }
        },
        "required": [
          "id",
          "status",
          "version"
        ]
      },
      "UndoResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "snoozed",
                  "delegated",
                  "answered",
                  "resolved",
                  "expired",
                  "cancelled"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "status",
          "version"
        ]
      },
      "FinishResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "how": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "filed",
                  "closed"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "answered",
                  "resolved",
                  "expired",
                  "cancelled"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "undoUntil": {
            "type": "string",
            "format": "date-time"
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "how",
          "status",
          "version",
          "undoUntil"
        ]
      },
      "MessageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "messageId": {
            "type": "string",
            "pattern": "^msg_[A-Za-z0-9-]+$"
          },
          "turn": {
            "type": "string",
            "const": "agent"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "messageId",
          "turn",
          "version"
        ]
      },
      "LaterResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "status": {
            "type": "string",
            "const": "snoozed"
          },
          "until": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "status",
          "until",
          "version"
        ]
      },
      "DelegateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "status": {
            "type": "string",
            "const": "delegated"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "hears": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "instant",
                  "every-15-min",
                  "hourly",
                  "while-working",
                  "by-hand"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "undoUntil": {
            "type": "string",
            "format": "date-time"
          },
          "toast": {
            "$ref": "#/components/schemas/Toast"
          }
        },
        "required": [
          "id",
          "status",
          "version",
          "undoUntil"
        ]
      },
      "SeenResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "seen": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "seen"
        ]
      },
      "HoldResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "undoUntil": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "undoUntil"
        ]
      },
      "YesKeyResponse": {
        "type": "object",
        "properties": {
          "registeredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "registeredAt"
        ]
      },
      "StepsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "progress": {
            "$ref": "#/components/schemas/StepProgress"
          }
        },
        "required": [
          "id",
          "progress"
        ]
      },
      "WebHandoff": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "expiresAt",
          "path"
        ]
      },
      "TimeZone": {
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "changed": {
            "type": "boolean"
          }
        },
        "required": [
          "timeZone",
          "changed"
        ]
      },
      "ChangeList": {
        "type": "object",
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Change"
            }
          },
          "cursor": {
            "type": "string"
          },
          "more": {
            "type": "boolean"
          }
        },
        "required": [
          "changes",
          "cursor",
          "more"
        ]
      },
      "Change": {
        "type": "object",
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "card.created",
                  "card.answered",
                  "card.changed",
                  "card.closed"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "cardId": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "type",
          "cardId",
          "at"
        ]
      },
      "AssistantList": {
        "type": "object",
        "properties": {
          "assistants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Assistant"
            }
          }
        },
        "required": [
          "assistants"
        ]
      },
      "Assistant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^con_[A-Za-z0-9-]+$"
          },
          "app": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "claude-code",
                  "codex",
                  "cursor",
                  "gemini-cli",
                  "opencode",
                  "pi",
                  "antigravity",
                  "grok",
                  "muse",
                  "chatgpt",
                  "claude",
                  "dots",
                  "other",
                  "webhook"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "appName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "machine": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^mch_[A-Za-z0-9-]+$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "hears": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "instant",
                  "every-15-min",
                  "hourly",
                  "while-working",
                  "by-hand"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^agt_[A-Za-z0-9-]+$"
                },
                "name": {
                  "type": "string"
                },
                "shownName": {
                  "type": "string"
                },
                "about": {
                  "type": "string"
                },
                "state": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "live",
                        "recent",
                        "quiet"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "liveAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "closedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "openCards": {
                  "type": "integer",
                  "minimum": 0
                },
                "liveSessions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "appSessionId": {
                        "type": "string"
                      },
                      "cwd": {
                        "type": "string"
                      },
                      "areaId": {
                        "type": "string",
                        "pattern": "^prj_[A-Za-z0-9-]+$"
                      },
                      "liveAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "terminal": {
                        "type": "object",
                        "properties": {
                          "app": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "herdr",
                                  "tmux"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "paneId": {
                            "type": "string"
                          },
                          "server": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "app",
                          "paneId"
                        ]
                      },
                      "show": {
                        "type": "object",
                        "properties": {
                          "app": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "herdr",
                                  "tmux"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "where": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "app",
                          "where"
                        ]
                      }
                    },
                    "required": [
                      "appSessionId",
                      "liveAt"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "state",
                "openCards",
                "liveSessions"
              ]
            }
          }
        },
        "required": [
          "id",
          "app",
          "appName",
          "name",
          "agents"
        ]
      },
      "RenameAgentResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "pattern": "^agt_[A-Za-z0-9-]+$"
          },
          "shownName": {
            "type": "string"
          },
          "changed": {
            "type": "boolean"
          }
        },
        "required": [
          "agentId",
          "changed"
        ]
      },
      "ShowList": {
        "type": "object",
        "properties": {
          "shows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Show"
            }
          }
        },
        "required": [
          "shows"
        ]
      },
      "Show": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^shw_[A-Za-z0-9-]+$"
          },
          "card": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^req_[A-Za-z0-9-]+$"
              }
            },
            "required": [
              "id"
            ]
          },
          "agent": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^agt_[A-Za-z0-9-]+$"
              },
              "name": {
                "type": "string"
              },
              "app": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "claude-code",
                      "codex",
                      "cursor",
                      "gemini-cli",
                      "opencode",
                      "pi",
                      "antigravity",
                      "grok",
                      "muse",
                      "chatgpt",
                      "claude",
                      "dots",
                      "other",
                      "webhook"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "app"
            ]
          },
          "places": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShowPlace"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "card",
          "agent",
          "places",
          "expiresAt"
        ]
      },
      "ShowPlace": {
        "type": "object",
        "properties": {
          "app": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "herdr",
                  "tmux"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "paneId": {
            "type": "string"
          },
          "server": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "required": [
          "app",
          "paneId",
          "sessionId"
        ]
      },
      "ShowAnswer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^shw_[A-Za-z0-9-]+$"
          },
          "result": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "shown",
                  "not_found"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "answeredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "result",
          "answeredAt"
        ]
      },
      "FocusResponse": {
        "type": "object",
        "properties": {
          "held": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^req_[A-Za-z0-9-]+$"
            }
          },
          "idleSeconds": {
            "type": "integer"
          },
          "everySeconds": {
            "type": "integer"
          }
        },
        "required": [
          "held",
          "idleSeconds",
          "everySeconds"
        ]
      },
      "FocusPlace": {
        "type": "object",
        "properties": {
          "app": {
            "type": "string",
            "const": "herdr"
          },
          "paneId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9]{1,16}:[A-Za-z0-9]{1,16}$",
            "description": "The focused Herdr pane: \"w2:p1\"."
          },
          "server": {
            "type": "string",
            "pattern": "^[0-9a-f]{16}$",
            "description": "Which Herdr server: sha256(hostname + HERDR_SOCKET_PATH), its first 16 hex characters."
          }
        },
        "required": [
          "app",
          "paneId",
          "server"
        ]
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "invalid",
                  "app_not_available",
                  "high_stakes",
                  "yes_required",
                  "area_change",
                  "not_your_answer",
                  "forbidden",
                  "no_machine",
                  "not_found",
                  "method_not_allowed",
                  "version_conflict",
                  "not_waiting",
                  "hold_over",
                  "delegated",
                  "conflict",
                  "already_answered",
                  "expired",
                  "idempotency_in_progress",
                  "idempotency_mismatch",
                  "rate_limited",
                  "server_error",
                  "not_available",
                  "client_outdated",
                  "push_not_set_up",
                  "unavailable"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          },
          "why": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "disabled",
                  "unverified",
                  "not_registered",
                  "off"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "currentVersion": {
            "type": "integer"
          },
          "cardStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "delegated",
                  "answered",
                  "resolved",
                  "snoozed",
                  "expired",
                  "cancelled"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "retryAfterSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "scope": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "read",
                  "write",
                  "answers",
                  "wait",
                  "workspace"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "minimum": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail"
        ]
      },
      "ClientConfig": {
        "type": "object",
        "properties": {
          "client": {
            "type": "object",
            "properties": {
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "ios",
                      "web"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "version": {
                "type": "string"
              },
              "build": {
                "type": "integer"
              }
            },
            "required": [
              "name",
              "version"
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ok",
                  "update_recommended",
                  "update_required"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "minimum": {
            "type": "string"
          },
          "recommended": {
            "type": "string"
          },
          "switches": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "catalog": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string"
              }
            },
            "required": [
              "version"
            ]
          },
          "presentation": {
            "type": "object",
            "properties": {
              "v": {
                "type": "integer"
              }
            },
            "required": [
              "v"
            ]
          }
        },
        "required": [
          "status",
          "switches",
          "catalog",
          "presentation"
        ]
      },
      "NotifySettings": {
        "type": "object",
        "properties": {
          "mute": {
            "type": "object",
            "properties": {
              "choice": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "1h",
                      "2h",
                      "tomorrow",
                      "forever"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "until": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "choice"
            ]
          },
          "stillWhenStuck": {
            "type": "boolean"
          },
          "showQuestion": {
            "type": "boolean"
          },
          "newCards": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "stuck",
                  "soon",
                  "all"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "apns": {
            "type": "object",
            "properties": {
              "ready": {
                "type": "boolean"
              }
            },
            "required": [
              "ready"
            ]
          }
        },
        "required": [
          "stillWhenStuck",
          "showQuestion",
          "newCards",
          "apns"
        ]
      },
      "PushDevice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^psh_[0-9a-f]{20}$"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "webpush",
                  "apns"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "environment": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "sandbox",
                  "production"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "off": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "removed",
                  "replaced",
                  "gone",
                  "signed_out"
                ]
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "addedAt"
        ]
      },
      "PushDeviceResponse": {
        "type": "object",
        "properties": {
          "device": {
            "$ref": "#/components/schemas/PushDevice"
          },
          "ready": {
            "type": "boolean"
          },
          "firstDevice": {
            "type": "boolean"
          }
        },
        "required": [
          "device",
          "ready",
          "firstDevice"
        ]
      },
      "PushDeviceRemoved": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^psh_[0-9a-f]{20}$"
          },
          "removed": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "removed"
        ]
      },
      "PushTestResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^psh_[0-9a-f]{20}$"
          },
          "sent": {
            "type": "boolean"
          },
          "gone": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "sent",
          "gone"
        ]
      },
      "PushNotificationWords": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "gone": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "title",
          "body",
          "url"
        ]
      },
      "ListCardsQuery": {
        "type": "object",
        "properties": {
          "status": {
            "default": "pending",
            "type": "string",
            "enum": [
              "pending",
              "snoozed",
              "delegated",
              "done"
            ]
          },
          "area": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^prj_[A-Za-z0-9-]+$"
            }
          },
          "assistant": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^con_[A-Za-z0-9-]+$"
            }
          },
          "agent": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^agt_[A-Za-z0-9-]+$"
            }
          },
          "app": {
            "minItems": 1,
            "maxItems": 14,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "claude-code",
                "codex",
                "cursor",
                "gemini-cli",
                "opencode",
                "pi",
                "antigravity",
                "grok",
                "muse",
                "chatgpt",
                "claude",
                "dots",
                "other",
                "webhook"
              ]
            }
          },
          "machine": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^mch_[A-Za-z0-9-]+$"
            }
          },
          "threadId": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9-]+$"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "whole": {
            "default": 1,
            "type": "integer",
            "minimum": 0,
            "maximum": 3
          },
          "after": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "additionalProperties": false
      },
      "ThreadQuery": {
        "type": "object",
        "properties": {
          "after": {
            "type": "string",
            "pattern": "^(req_[A-Za-z0-9_-]{1,64})(?:~(\\d{4}-\\d\\d-\\d\\dT[\\d:.]+Z)~(card|asked|message|handed|handed_back|taken_back|back|reopened)~([A-Za-z0-9_-]{1,100}))?$"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "after"
        ],
        "additionalProperties": false
      },
      "AnswerRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "choiceIds": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approved": {
            "type": "boolean"
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "note": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4000
              },
              "via": {
                "default": "text",
                "type": "string",
                "enum": [
                  "text",
                  "voice"
                ]
              }
            },
            "required": [
              "text"
            ],
            "additionalProperties": false
          },
          "theyDecide": {
            "type": "boolean",
            "const": true
          },
          "answers": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,40}$"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "choiceIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "approved": {
                  "type": "boolean"
                },
                "text": {
                  "type": "string",
                  "maxLength": 4000
                },
                "note": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 4000
                    },
                    "via": {
                      "type": "string",
                      "enum": [
                        "voice",
                        "text"
                      ]
                    },
                    "audioSeconds": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "text",
                    "via"
                  ],
                  "additionalProperties": false
                },
                "theyDecide": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "failed": {
            "type": "boolean",
            "const": true
          },
          "failedStep": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "done": {
            "type": "boolean"
          },
          "askId": {
            "type": "string",
            "pattern": "^ask_[A-Za-z0-9-]+$"
          },
          "handled": {
            "type": "string",
            "enum": [
              "self",
              "leave"
            ]
          },
          "notSent": {
            "type": "boolean",
            "const": true
          },
          "notNeeded": {
            "type": "boolean",
            "const": true
          },
          "holdSeconds": {
            "type": "integer",
            "minimum": 5,
            "maximum": 20
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "UndoRequest": {
        "type": "object",
        "properties": {
          "askId": {
            "type": "string",
            "pattern": "^ask_[A-Za-z0-9-]+$"
          }
        },
        "additionalProperties": false
      },
      "FinishRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "MessageRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "via": {
            "default": "text",
            "type": "string",
            "enum": [
              "text",
              "voice"
            ]
          }
        },
        "required": [
          "body"
        ],
        "additionalProperties": false
      },
      "LaterRequest": {
        "type": "object",
        "properties": {
          "until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "string",
                "enum": [
                  "1h",
                  "tonight",
                  "tomorrow"
                ]
              }
            ],
            "description": "A time, or a preset: in an hour, tonight (6:00 PM) or tomorrow morning (8:00 AM), in timeZone."
          },
          "timeZone": {
            "description": "The person’s IANA time zone, e.g. \"America/Chicago\", for the presets. Default UTC.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "until"
        ],
        "additionalProperties": false
      },
      "BackRequest": {
        "type": "object",
        "properties": {
          "thread": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DelegateRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "object",
            "properties": {
              "assistantId": {
                "type": "string",
                "pattern": "^con_[A-Za-z0-9-]+$"
              },
              "agentId": {
                "type": "string",
                "pattern": "^agt_[A-Za-z0-9-]+$"
              }
            },
            "required": [
              "assistantId"
            ],
            "additionalProperties": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "freely",
              "loop"
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400
          }
        },
        "required": [
          "to",
          "mode"
        ],
        "additionalProperties": false
      },
      "TakeBackRequest": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "SeenRequest": {
        "type": "object",
        "properties": {
          "upTo": {
            "description": "The newest thing on the card the screen drew: the `presentation.seen.upTo` the whole card it drew came with (its newest message, or when it came or last changed). Absent: up to now.",
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "HoldRequest": {
        "type": "object",
        "properties": {
          "seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60,
            "description": "From now: a minute ahead while the Undo is paused (asked again as it stays paused), or the time it has left once it resumes."
          }
        },
        "required": [
          "seconds"
        ],
        "additionalProperties": false
      },
      "YesKeyRequest": {
        "type": "object",
        "properties": {
          "proof": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "proof"
        ],
        "additionalProperties": false
      },
      "StepsRequest": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string",
            "pattern": "^s[1-9][0-9]{0,4}$"
          },
          "done": {
            "type": "boolean"
          },
          "through": {
            "type": "boolean"
          }
        },
        "required": [
          "step",
          "done"
        ],
        "additionalProperties": false
      },
      "WebHandoffRequest": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "TimeZoneRequest": {
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "timeZone"
        ],
        "additionalProperties": false
      },
      "ChangesQuery": {
        "type": "object",
        "properties": {
          "after": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "wait": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "additionalProperties": false
      },
      "ShowsQuery": {
        "type": "object",
        "properties": {
          "places": {
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "herdr",
                "tmux"
              ]
            }
          },
          "wait": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          }
        },
        "required": [
          "places"
        ],
        "additionalProperties": false
      },
      "ShowAnswerRequest": {
        "type": "object",
        "properties": {
          "result": {
            "type": "string",
            "enum": [
              "shown",
              "not_found"
            ]
          }
        },
        "required": [
          "result"
        ],
        "additionalProperties": false
      },
      "PresenceRequest": {
        "type": "object",
        "properties": {
          "here": {
            "type": "boolean"
          }
        },
        "required": [
          "here"
        ],
        "additionalProperties": false
      },
      "FocusRequest": {
        "type": "object",
        "properties": {
          "place": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "const": "herdr"
                  },
                  "paneId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,16}:[A-Za-z0-9]{1,16}$",
                    "description": "The focused Herdr pane: \"w2:p1\"."
                  },
                  "server": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{16}$",
                    "description": "Which Herdr server: sha256(hostname + HERDR_SOCKET_PATH), its first 16 hex characters."
                  }
                },
                "required": [
                  "app",
                  "paneId",
                  "server"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "activeAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "place",
          "activeAt"
        ],
        "additionalProperties": false
      },
      "PushDeviceRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "apns"
            ]
          },
          "token": {
            "type": "string",
            "pattern": "^[0-9A-Fa-f]{64,200}$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "bundle": {
            "type": "string",
            "minLength": 1,
            "maxLength": 155
          },
          "turnOn": {
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "token",
          "environment",
          "bundle"
        ],
        "additionalProperties": false
      },
      "PushDeviceRemoveQuery": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "enum": [
              "removed",
              "signed_out"
            ]
          }
        },
        "additionalProperties": false
      },
      "PushTestRequest": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "PushSettingsRequest": {
        "type": "object",
        "properties": {
          "mute": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "1h",
                  "2h",
                  "tomorrow",
                  "forever"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "timeZone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "stillWhenStuck": {
            "type": "boolean"
          },
          "showQuestion": {
            "type": "boolean"
          },
          "newCards": {
            "type": "string",
            "enum": [
              "stuck",
              "soon",
              "all"
            ]
          }
        },
        "additionalProperties": false
      },
      "PushNotificationQuery": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 40
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "RenameAgentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "description": "The name you see it called, 1 to 40 characters; null goes back to its own."
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 at Pending You, for the resource `<origin>/v1`. Public apps’ tokens are DPoP-bound (`x-pendingyou-dpop`): send them as `Authorization: DPoP <token>` with a proof.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://staging.pendingyou.com/oauth/authorize",
            "tokenUrl": "https://staging.pendingyou.com/oauth/token",
            "refreshUrl": "https://staging.pendingyou.com/oauth/token",
            "scopes": {
              "cards:read": "See the cards the assistants on the signed-in computer ask the person.",
              "cards:read:all": "See every card, from all the person’s computers and assistants.",
              "cards:answer": "Answer cards when the person presses something, and take an answer back in its 5 seconds.",
              "cards:reply": "Write to the assistant that asked, on its card.",
              "cards:later": "Put cards in Later and bring them back.",
              "cards:delegate": "Hand a card to another of the person’s assistants, and take it back.",
              "assistants:read": "See which assistants are running, and in which terminal.",
              "assistants:show": "Bring the assistant that asked to the front on this computer when you press Show. It learns which card and assistant.",
              "presence:desk": "Keep the person’s phone quiet while they’re using the app.",
              "cards:high_stakes": "Pending You’s own apps only: act on high-stakes cards, each time with the person’s yes signed on the device.",
              "cards:manage": "Pending You’s own apps only: say the person opened a card with a new reply, keep an answer back while its Undo is paused, and read the thread above a card.",
              "notify:manage": "Pending You’s own apps only: send the person’s notifications to this device, and see and change their notification settings.",
              "assistants:manage": "Pending You’s own apps only: rename the person’s assistants, the names they see them called.",
              "account:manage": "Pending You’s own apps only: open a page of Pending You on the web, signed in.",
              "presence:focus": "Pending You’s own apps only: say which assistant’s pane the person is in, so its cards wait until they leave it (30 minutes at most). It learns which pane they’re in."
            }
          },
          "x-pendingyou-device": {
            "description": "RFC 8628 for terminals and plugins: POST the form to `deviceAuthorizationUrl` with the app (`app` for Pending You’s own apps, else `client_id`), `scope`, `resource`, `machine` and `machine_attestation` (the computer’s key vouching for this sign-in and the grant’s DPoP key, `pendingyou machine attest`). The person allows it on their phone or at `verification_uri`; poll `tokenUrl` with `grant_type` below, a DPoP proof each time.",
            "deviceAuthorizationUrl": "https://staging.pendingyou.com/oauth/device",
            "tokenUrl": "https://staging.pendingyou.com/oauth/token",
            "refreshUrl": "https://staging.pendingyou.com/oauth/token",
            "grantType": "urn:ietf:params:oauth:grant-type:device_code",
            "resource": "https://staging.pendingyou.com/v1",
            "scopes": {
              "cards:read": "See the cards the assistants on the signed-in computer ask the person.",
              "cards:read:all": "See every card, from all the person’s computers and assistants.",
              "cards:answer": "Answer cards when the person presses something, and take an answer back in its 5 seconds.",
              "cards:reply": "Write to the assistant that asked, on its card.",
              "cards:later": "Put cards in Later and bring them back.",
              "cards:delegate": "Hand a card to another of the person’s assistants, and take it back.",
              "assistants:read": "See which assistants are running, and in which terminal.",
              "assistants:show": "Bring the assistant that asked to the front on this computer when you press Show. It learns which card and assistant.",
              "presence:desk": "Keep the person’s phone quiet while they’re using the app.",
              "cards:high_stakes": "Pending You’s own apps only: act on high-stakes cards, each time with the person’s yes signed on the device.",
              "cards:manage": "Pending You’s own apps only: say the person opened a card with a new reply, keep an answer back while its Undo is paused, and read the thread above a card.",
              "notify:manage": "Pending You’s own apps only: send the person’s notifications to this device, and see and change their notification settings.",
              "assistants:manage": "Pending You’s own apps only: rename the person’s assistants, the names they see them called.",
              "account:manage": "Pending You’s own apps only: open a page of Pending You on the web, signed in.",
              "presence:focus": "Pending You’s own apps only: say which assistant’s pane the person is in, so its cards wait until they leave it (30 minutes at most). It learns which pane they’re in."
            }
          }
        }
      }
    },
    "parameters": {
      "CardId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The card (`req_…`).",
        "schema": {
          "type": "string",
          "pattern": "^req_[A-Za-z0-9-]{1,64}$"
        }
      },
      "ShowId": {
        "name": "showId",
        "in": "path",
        "required": true,
        "description": "The show request (`shw_…`).",
        "schema": {
          "type": "string",
          "pattern": "^shw_[0-9a-f]{20}$"
        }
      },
      "DeviceId": {
        "name": "deviceId",
        "in": "path",
        "required": true,
        "description": "One of the person’s push devices (`psh_…`).",
        "schema": {
          "type": "string",
          "pattern": "^psh_[0-9a-f]{20}$"
        }
      },
      "AgentId": {
        "name": "agentId",
        "in": "path",
        "required": true,
        "description": "One of the person’s assistants’ agents (`agt_…`, as GET /v1/assistants lists them).",
        "schema": {
          "type": "string",
          "pattern": "^agt_[A-Za-z0-9-]{1,64}$"
        }
      },
      "ThreadId": {
        "name": "threadId",
        "in": "path",
        "required": true,
        "description": "The thread (`req_…`: its first card’s id, a card’s `threadId`).",
        "schema": {
          "type": "string",
          "pattern": "^req_[A-Za-z0-9-]{1,64}$"
        }
      },
      "PendingYouVersion": {
        "name": "Pending-You-Version",
        "in": "header",
        "required": false,
        "description": "The dated behaviour to follow. Without it: the app’s registered version.",
        "schema": {
          "type": "string",
          "enum": [
            "2026-10-05"
          ]
        }
      },
      "PendingYouClient": {
        "name": "Pending-You-Client",
        "in": "header",
        "required": false,
        "description": "Pending You’s own apps only: which app and version is calling, `ios/1.4.0+120` (its version, then its build) or `web/<build>`.",
        "schema": {
          "type": "string"
        }
      },
      "PendingYouYes": {
        "name": "Pending-You-Yes",
        "in": "header",
        "required": false,
        "description": "Pending You’s own apps only, on a high-stakes card: the person’s yes, a JWS of type `pending-you-yes+jwt` by this sign-in’s yes key (POST /v1/yes-key, the key in its header), over `cardId`, `version`, `answerDigest` (the request body’s SHA-256, base64url), `iat` and `jti`.",
        "schema": {
          "type": "string"
        }
      },
      "DPoP": {
        "name": "DPoP",
        "in": "header",
        "required": false,
        "description": "The request’s DPoP proof, for a bound token (every public app’s).",
        "schema": {
          "type": "string"
        }
      },
      "IfNoneMatch": {
        "name": "If-None-Match",
        "in": "header",
        "required": false,
        "description": "The ETag you hold: 304 when nothing changed.",
        "schema": {
          "type": "string"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "8 to 200 visible characters. The same key and request within 24 hours get the first answer again.",
        "schema": {
          "type": "string",
          "pattern": "^[\\x21-\\x7E]{8,200}$"
        }
      },
      "IdempotencyKeyRequired": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "8 to 200 visible characters, a new one for each answer. The same key and request within 24 hours get the first answer again.",
        "schema": {
          "type": "string",
          "pattern": "^[\\x21-\\x7E]{8,200}$"
        }
      }
    },
    "headers": {
      "PendingYouVersion": {
        "description": "The dated behaviour this answer followed.",
        "schema": {
          "type": "string"
        }
      },
      "PendingYouClientStatus": {
        "description": "For the app `Pending-You-Client` named: `ok`, `update_recommended`, or `update_required` (its changes are refused with 426 `client_outdated` until it updates; reads still work).",
        "schema": {
          "type": "string"
        }
      },
      "DPoPNonce": {
        "description": "The current DPoP nonce: put it in your next proof.",
        "schema": {
          "type": "string"
        }
      },
      "ETag": {
        "description": "Send it as If-None-Match to hear 304.",
        "schema": {
          "type": "string"
        }
      },
      "IdempotentReplayed": {
        "description": "`true`: the first answer to this Idempotency-Key, again.",
        "schema": {
          "type": "string"
        }
      }
    }
  },
  "x-pendingyou-dpop": {
    "required": "Every sign-in by device code; every public app.",
    "algs": [
      "ES256"
    ],
    "proofHeader": "DPoP",
    "tokenType": "DPoP",
    "nonceHeader": "DPoP-Nonce",
    "claims": {
      "jti": "At least 96 random bits, once per key.",
      "htm": "The request’s method.",
      "htu": "The request’s address, without its query or fragment.",
      "iat": "When it was made, within 60 seconds of Pending You’s clock.",
      "ath": "At /v1: the access token’s SHA-256, base64url.",
      "nonce": "The last DPoP-Nonce Pending You sent: required at the token endpoint, optional at /v1."
    },
    "useDpopNonce": "Asked for a current nonce: 400 at the token endpoint, 401 at /v1, with a DPoP-Nonce header. Make the proof again with it and send the request once more."
  },
  "x-pendingyou-limits": {
    "read": "300 a minute per sign-in (every GET)",
    "write": "60 a minute per sign-in (every POST)",
    "answers": "30 a minute per sign-in (answers and words on a card)",
    "wait": "6 waits a minute per sign-in for GET /v1/changes, and 24 for GET /v1/shows, each its own (with wait, up to 25 seconds)",
    "workspace": "1,200 a minute per person, every app together"
  }
}
