{
  "openapi": "3.1.0",
  "info": {
    "title": "Throughline news relevance API",
    "version": "2026-11-13.1",
    "summary": "Which news articles are relevant to which Polymarket contracts, and why.",
    "description": "Read-only feed of article-to-contract matches with corrections on the same stream, plus the pairing routes a program uses to ask one signed-in person for a key. Derived from the service source (d8d2f2c) on 2026-11-12. No availability, latency or coverage commitment. Examples are illustrative. Human docs: https://throughline.markets/api - agent setup: https://throughline.markets/agents.md",
    "contact": {
      "email": "access@throughline.markets",
      "url": "https://throughline.markets/api"
    }
  },
  "servers": [
    {
      "url": "https://api.throughline.markets"
    }
  ],
  "externalDocs": {
    "description": "API guide",
    "url": "https://throughline.markets/api"
  },
  "tags": [
    {
      "name": "entry",
      "description": "Public, no authentication."
    },
    {
      "name": "feed",
      "description": "Read with an API key."
    },
    {
      "name": "pairing",
      "description": "Ask a signed-in person for access. No credential; the device code is the secret."
    },
    {
      "name": "account",
      "description": "Used by the account page with a browser sign-in session. Operations that list agentToken also accept a connection's management credential holding the named scope. Feed API keys cannot call these."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getApiRoot",
        "summary": "Public pointers to the account page and documentation",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. Not charged; no key needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRoot"
                }
              }
            }
          }
        },
        "tags": [
          "entry"
        ]
      }
    },
    "/v1/news": {
      "get": {
        "operationId": "listNews",
        "summary": "Read changes forward from a cursor",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Read changes after this cursor. 0 (the default) replays from the start of retained history; otherwise send the next_cursor from your last response. The exact word latest returns a successful empty page whose next_cursor is the current head of the whole feed, also when a market filter applies; it counts as one news response. Send latest once, save the number before polling and reuse it after a restart; repeating latest skips changes.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9]+|latest)$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Changes per page. The installed default and maximum are 20.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "description": "Restrict to one exact condition ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsPage"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses allowed in this UTC day."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses left in this UTC day."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix seconds when the allowance resets."
              },
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): invalid_request, invalid_path, invalid_query, invalid_pagination, invalid_limit, invalid_cursor, invalid_stream, conflicting_market, invalid_market_id, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): unauthorized, missing_or_malformed_key, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): method_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): ambiguous_record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_quota_exceeded, account_data_limit, coverage_quota_exceeded, usage_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "feed"
        ]
      }
    },
    "/v1/markets/{condition_id}/news": {
      "get": {
        "operationId": "listMarketNews",
        "summary": "The same feed restricted to one contract",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "condition_id",
            "in": "path",
            "required": true,
            "description": "Exact condition ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Read changes after this cursor. 0 (the default) replays from the start of retained history; otherwise send the next_cursor from your last response. The exact word latest returns a successful empty page whose next_cursor is the current head of the whole feed, also when a market filter applies; it counts as one news response. Send latest once, save the number before polling and reuse it after a restart; repeating latest skips changes.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9]+|latest)$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Changes per page. The installed default and maximum are 20.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "description": "Optional; must equal the path condition ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsPage"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses allowed in this UTC day."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses left in this UTC day."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix seconds when the allowance resets."
              },
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): invalid_request, invalid_path, invalid_query, invalid_pagination, invalid_limit, invalid_cursor, invalid_stream, conflicting_market, invalid_market_id, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): unauthorized, missing_or_malformed_key, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): method_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): ambiguous_record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_quota_exceeded, account_data_limit, coverage_quota_exceeded, usage_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "feed"
        ]
      }
    },
    "/v1/news/{record_id}": {
      "get": {
        "operationId": "getNewsRecord",
        "summary": "Current head of one match, including a withdrawal",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "description": "64 lowercase hex characters.",
            "schema": {
              "$ref": "#/components/schemas/RecordId"
            }
          },
          {
            "name": "stream_id",
            "in": "query",
            "required": false,
            "description": "Needed only when two streams share the record ID.",
            "schema": {
              "$ref": "#/components/schemas/StreamId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Change"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses allowed in this UTC day."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "News responses left in this UTC day."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix seconds when the allowance resets."
              },
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): invalid_request, invalid_path, invalid_query, invalid_pagination, invalid_limit, invalid_cursor, invalid_stream, conflicting_market, invalid_market_id, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): unauthorized, missing_or_malformed_key, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): method_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): ambiguous_record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_quota_exceeded, account_data_limit, coverage_quota_exceeded, usage_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "feed"
        ]
      }
    },
    "/v1/coverage": {
      "get": {
        "operationId": "getCoverage",
        "summary": "Supplied coverage facts with unknowns explicit",
        "description": "Counted against a separate allowance, not the news allowance.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coverage"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): invalid_request, invalid_path, invalid_query, invalid_pagination, invalid_limit, invalid_cursor, invalid_stream, conflicting_market, invalid_market_id, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): unauthorized, missing_or_malformed_key, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): method_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): ambiguous_record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_quota_exceeded, account_data_limit, coverage_quota_exceeded, usage_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "feed"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Plan and usage for the key's account",
        "description": "Not counted against the news allowance; it has its own separate allowance and sends no X-RateLimit headers. No query string and no body.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReport"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): invalid_request, invalid_path, invalid_query, invalid_pagination, invalid_limit, invalid_cursor, invalid_stream, conflicting_market, invalid_market_id, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): unauthorized, missing_or_malformed_key, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): method_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): ambiguous_record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): account_quota_exceeded, account_data_limit, coverage_quota_exceeded, usage_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the feed routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "feed"
        ]
      }
    },
    "/auth/v1/pairings": {
      "post": {
        "operationId": "createPairing",
        "summary": "Ask a person for access",
        "description": "The program generates its own secrets and sends only their hashes. Nothing is active until a signed-in person approves. Show the person verification_uri_complete and user_code; keep device_code private.",
        "security": [],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PairingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairingCreated"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): invalid_request, invalid_content_length, invalid_body, invalid_key_name, invalid_scopes, invalid_credential_hash, authorization_pending, access_denied, expired_token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): pairing_capacity, burst_limited, burst_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): service_busy, service_unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "pairing"
        ]
      }
    },
    "/auth/v1/token": {
      "post": {
        "operationId": "pollPairing",
        "summary": "Collect the receipt for a pairing",
        "description": "Poll no more often than interval seconds. 400 authorization_pending means keep waiting; 400 access_denied is a definitive refusal; 400 expired_token means the code is unknown or its window ended and is not proof that the pairing was never approved. 200 is the receipt and carries no secret.",
        "security": [],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PairingPoll"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairingDelivered"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): invalid_request, invalid_content_length, invalid_body, invalid_key_name, invalid_scopes, invalid_credential_hash, authorization_pending, access_denied, expired_token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): pairing_capacity, burst_limited, burst_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the pairing routes (not every code applies to every operation): service_busy, service_unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "pairing"
        ]
      }
    },
    "/account/v1/pairings/{user_code}": {
      "get": {
        "operationId": "viewPairing",
        "summary": "Show a pairing request to the signed-in person",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [
          {
            "name": "user_code",
            "in": "path",
            "required": true,
            "description": "The code shown by the program, as in the approval link.",
            "schema": {
              "type": "string",
              "pattern": "^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairingView"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      },
      "post": {
        "operationId": "decidePairing",
        "summary": "Approve or deny a pairing",
        "description": "Browser sign-in session only. Approval activates the hashes the program sent and returns the same receipt the program collects.",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [
          {
            "name": "user_code",
            "in": "path",
            "required": true,
            "description": "The code shown by the program, as in the approval link.",
            "schema": {
              "type": "string",
              "pattern": "^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PairingDecision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairingDecided"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List agent connections, newest first",
        "description": "Browser sign-in session only. Includes revoked connections. Never includes a secret.",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page: a connection ID on the same account.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/connections/{connection_id}": {
      "delete": {
        "operationId": "revokeConnection",
        "summary": "Revoke a connection and every key it holds",
        "description": "Browser sign-in session only. Revokes the management credential and all keys issued through the connection. Repeating it is safe.",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "description": "The connection ID.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionRevoked"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/me": {
      "get": {
        "operationId": "getAccount",
        "summary": "Account plan, pricing and usage",
        "description": "A management credential (account:read) gets the same object without billing and billing_active.",
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": [
              "account:read"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/trial": {
      "post": {
        "operationId": "startTrial",
        "summary": "Start the seven-day trial (wire plan: evaluation)",
        "description": "Browser sign-in session only; a management credential gets 403 scope_forbidden. A person may also start the trial while approving a pairing.",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/keys": {
      "get": {
        "operationId": "listKeys",
        "summary": "List API keys (never the secrets)",
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": [
              "keys:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page: a key ID. With order=newest it must be a key on the same account, otherwise 400 invalid_cursor.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Omit for ID order, where next_cursor is the last ID on the page and the listing ends with an empty page. newest lists by creation time then ID, both descending, and ends with a null next_cursor.",
            "schema": {
              "type": "string",
              "enum": [
                "newest"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyList"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      },
      "post": {
        "operationId": "createKey",
        "summary": "Create an API key; the secret is returned once",
        "description": "With a management credential (keys:write) the new key counts against the account's shared key slots.",
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": [
              "keys:write"
            ]
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name",
                      "id",
                      "key_hash"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{32}$"
                      },
                      "key_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    },
                    "description": "keys:write agent only. Persist a generated secret locally before POST. Exact same ID/name/hash/issuing connection is safely replayable; never returns the secret."
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/KeyCreated"
                    },
                    {
                      "$ref": "#/components/schemas/KeyCreationReceipt"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/keys/{key_id}": {
      "delete": {
        "operationId": "revokeKey",
        "summary": "Revoke an API key",
        "description": "keys:write is account-wide: a management credential holding it can revoke any key on the account.",
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": [
              "keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "description": "32 lowercase hex characters.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyRevoked"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/billing/read": {
      "get": {
        "operationId": "readBilling",
        "summary": "Billing state from the service's own records",
        "description": "Read-only. Checkout, the billing portal and the provider-checked /account/v1/billing/status need the person's browser session.",
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": [
              "billing:read"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRead"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/billing/status": {
      "get": {
        "operationId": "getBillingStatus",
        "summary": "Billing state for the account",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatus"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): invalid_request, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_subscription_exists, billing_checkout_needs_recovery, billing_checkout_needs_refresh, billing_customer_unavailable, billing_attempt_unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_provider_unavailable, billing_payment_conflict, service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/billing/checkout": {
      "post": {
        "operationId": "startCheckout",
        "summary": "Get a hosted checkout link for Builder",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRedirect"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): invalid_request, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_subscription_exists, billing_checkout_needs_recovery, billing_checkout_needs_refresh, billing_customer_unavailable, billing_attempt_unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_provider_unavailable, billing_payment_conflict, service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/billing/portal": {
      "post": {
        "operationId": "openBillingPortal",
        "summary": "Get a hosted billing-portal link",
        "security": [
          {
            "accountSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRedirect"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "description": "Identifies this request."
              }
            }
          },
          "400": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): invalid_request, invalid_content_length, unexpected_body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): account_unavailable, origin_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_subscription_exists, billing_checkout_needs_recovery, billing_checkout_needs_refresh, billing_customer_unavailable, billing_attempt_unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_quota_exceeded, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the billing routes (not every code applies to every operation): billing_provider_unavailable, billing_payment_conflict, service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        },
        "tags": [
          "account"
        ]
      }
    },
    "/account/v1/connection": {
      "get": {
        "operationId": "getOwnConnection",
        "summary": "Inspect this management credential\u2019s own connection and lifetime",
        "tags": [
          "account"
        ],
        "security": [
          {
            "agentToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. Does not spend news allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnConnection"
                }
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnectOwnConnection",
        "summary": "Revoke this connection and every feed key it issued",
        "tags": [
          "account"
        ],
        "security": [
          {
            "agentToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success. Does not spend news allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionRevoked"
                }
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        }
      }
    },
    "/account/v1/audit": {
      "get": {
        "operationId": "readAccessAudit",
        "summary": "Retained successful access mutations; agents see only their own actor records",
        "tags": [
          "account"
        ],
        "security": [
          {
            "accountSession": []
          },
          {
            "agentToken": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,18}$"
            },
            "description": "Exclusive last next_cursor; newest first,20 per page. Retention is not a full-history guarantee."
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Does not spend news allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessAudit"
                }
              }
            }
          },
          "400": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): invalid_request, invalid_query, invalid_cursor, invalid_content_length, unexpected_body, invalid_body, invalid_key_name, invalid_scopes, access_denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): unauthorized, invalid_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm=\"throughline\""
              }
            }
          },
          "403": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): account_unavailable, origin_forbidden, verified_identity_required, scope_forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): active_key_limit, connection_capacity, consent_conflict, key_creation_conflict, credential_conflict, trial_unavailable, builder_already_active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "411": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): content_length_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "414": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): request_target_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): json_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): management_quota_exceeded, agent_quota_exceeded, approval_limited, burst_limited, burst_capacity, server_capacity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error codes shared by the account routes (not every code applies to every operation): service_busy, service_unavailable, response_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer <API key>. Keep the key in the THROUGHLINE_API_KEY environment variable."
      },
      "accountSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "Short-lived browser sign-in session issued to the account page. Not an API key."
      },
      "agentToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A connection's management credential (tl_agent_...), active only after a person approves a pairing that asked for more than news:read. Limited to the approved scopes; the name listed on an operation is the scope it needs. Never send it with an Origin header."
      }
    },
    "schemas": {
      "Text": {
        "type": "string",
        "minLength": 1,
        "description": "Non-blank text without control characters."
      },
      "Clock": {
        "type": "string",
        "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d{1,6})?(Z|[+-]\\d\\d:\\d\\d)$",
        "description": "RFC 3339 timestamp with seconds, optional fraction and an explicit Z or numeric offset."
      },
      "Url": {
        "type": "string",
        "pattern": "^https?://",
        "description": "Public http(s) URL. Metadata only; the API never fetches it."
      },
      "StreamId": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_-]{1,64}$"
      },
      "RecordId": {
        "type": "string",
        "pattern": "^[0-9a-f]{64}$",
        "description": "sha256 of the canonical JSON array [\"ThroughlineLinkV1\", report_id, venue, condition_id]."
      },
      "Envelope": {
        "description": "One change to one match. Identity is the (stream_id, record_id) pair.",
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "schema",
              "stream_id",
              "sequence",
              "operation",
              "record_id",
              "record"
            ],
            "properties": {
              "schema": {
                "const": "ThroughlinePublicationV3"
              },
              "stream_id": {
                "$ref": "#/components/schemas/StreamId"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9223372036854775807
              },
              "operation": {
                "const": "upsert"
              },
              "record_id": {
                "$ref": "#/components/schemas/RecordId"
              },
              "record": {
                "$ref": "#/components/schemas/Record"
              }
            },
            "description": "Complete replacement of the match."
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "schema",
              "stream_id",
              "sequence",
              "operation",
              "record_id",
              "record"
            ],
            "properties": {
              "schema": {
                "const": "ThroughlinePublicationV3"
              },
              "stream_id": {
                "$ref": "#/components/schemas/StreamId"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9223372036854775807
              },
              "operation": {
                "const": "withdraw"
              },
              "record_id": {
                "$ref": "#/components/schemas/RecordId"
              },
              "record": {
                "type": "null"
              }
            },
            "description": "The match is withdrawn; record is null."
          }
        ]
      },
      "Record": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "report_id",
          "source_revision_id",
          "source_revision_kind",
          "publisher",
          "title",
          "url",
          "language",
          "published_at",
          "received_at",
          "source_clock_status",
          "captured_content",
          "publisher_completeness",
          "market",
          "relevance",
          "analysis",
          "evidence"
        ],
        "properties": {
          "report_id": {
            "$ref": "#/components/schemas/Text"
          },
          "source_revision_id": {
            "$ref": "#/components/schemas/Text"
          },
          "source_revision_kind": {
            "enum": [
              "captured_feed_revision"
            ]
          },
          "publisher": {
            "$ref": "#/components/schemas/Text"
          },
          "title": {
            "$ref": "#/components/schemas/Text"
          },
          "url": {
            "$ref": "#/components/schemas/Url"
          },
          "language": {
            "$ref": "#/components/schemas/Text"
          },
          "published_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the source says it published. Null exactly when source_clock_status is missing."
          },
          "received_at": {
            "$ref": "#/components/schemas/Clock",
            "description": "When the article revision was received."
          },
          "source_clock_status": {
            "enum": [
              "reported",
              "unreliable",
              "missing"
            ]
          },
          "captured_content": {
            "enum": [
              "headline_only",
              "summary",
              "body"
            ],
            "description": "What text the assessment had: headline only, a summary, or the article body."
          },
          "publisher_completeness": {
            "enum": [
              "unknown"
            ],
            "description": "Whether the publisher's output was captured completely. Always unknown."
          },
          "market": {
            "$ref": "#/components/schemas/Market"
          },
          "relevance": {
            "$ref": "#/components/schemas/Relevance"
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Analysis"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null until, and unless, a closer reading is published."
          },
          "evidence": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "description": "Exactly one entry: the record's own article revision."
          }
        },
        "description": "One article matched to one contract.",
        "allOf": [
          {
            "if": {
              "properties": {
                "source_clock_status": {
                  "const": "missing"
                }
              }
            },
            "then": {
              "properties": {
                "published_at": {
                  "type": "null"
                }
              }
            },
            "else": {
              "properties": {
                "published_at": {
                  "$ref": "#/components/schemas/Clock"
                }
              }
            }
          }
        ]
      },
      "Market": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "venue",
          "condition_id",
          "title",
          "url",
          "rules_sha256",
          "deadline_at"
        ],
        "properties": {
          "venue": {
            "$ref": "#/components/schemas/Text"
          },
          "condition_id": {
            "$ref": "#/components/schemas/Text",
            "description": "The venue's exact condition ID. Not a slug, event ID or token ID."
          },
          "title": {
            "$ref": "#/components/schemas/Text"
          },
          "url": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Url"
              },
              {
                "type": "null"
              }
            ]
          },
          "rules_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "sha256 of the rule text the match was made against."
          },
          "deadline_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "The contract the article was matched to."
      },
      "Relevance": {
        "description": "The first-pass (preliminary) assessment. Always present.",
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "stage",
              "assessed_at",
              "verdict",
              "novelty",
              "why_relevant",
              "explanation_kind"
            ],
            "properties": {
              "stage": {
                "const": "scout"
              },
              "assessed_at": {
                "$ref": "#/components/schemas/Clock"
              },
              "verdict": {
                "enum": [
                  "relevant",
                  "uncertain"
                ]
              },
              "novelty": {
                "enum": [
                  "new",
                  "update",
                  "repeat",
                  "uncertain"
                ]
              },
              "why_relevant": {
                "type": "null"
              },
              "explanation_kind": {
                "const": "unavailable"
              }
            },
            "description": "No publishable explanation was produced; why_relevant is null."
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "stage",
              "assessed_at",
              "verdict",
              "novelty",
              "why_relevant",
              "explanation_kind"
            ],
            "properties": {
              "stage": {
                "const": "scout"
              },
              "assessed_at": {
                "$ref": "#/components/schemas/Clock"
              },
              "verdict": {
                "enum": [
                  "relevant",
                  "uncertain"
                ]
              },
              "novelty": {
                "enum": [
                  "new",
                  "update",
                  "repeat",
                  "uncertain"
                ]
              },
              "why_relevant": {
                "$ref": "#/components/schemas/Text"
              },
              "explanation_kind": {
                "const": "public_explanation"
              }
            },
            "description": "A public explanation is present."
          }
        ]
      },
      "Analysis": {
        "description": "The closer reading (assessed). Price-blind.",
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "stage",
              "assessed_at",
              "report_status",
              "impact",
              "why_relevant",
              "explanation_kind"
            ],
            "properties": {
              "stage": {
                "const": "analyst"
              },
              "assessed_at": {
                "$ref": "#/components/schemas/Clock"
              },
              "report_status": {
                "enum": [
                  null,
                  "reported",
                  "unverified",
                  "contradicted",
                  "repeat"
                ]
              },
              "impact": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4,
                "description": "A model's reading of how much the story bears on the contract. Not a probability and not calibrated confidence."
              },
              "why_relevant": {
                "type": "null"
              },
              "explanation_kind": {
                "const": "unavailable"
              }
            },
            "description": "No publishable explanation was produced; why_relevant is null."
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "stage",
              "assessed_at",
              "report_status",
              "impact",
              "why_relevant",
              "explanation_kind"
            ],
            "properties": {
              "stage": {
                "const": "analyst"
              },
              "assessed_at": {
                "$ref": "#/components/schemas/Clock"
              },
              "report_status": {
                "enum": [
                  null,
                  "reported",
                  "unverified",
                  "contradicted",
                  "repeat"
                ]
              },
              "impact": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4,
                "description": "A model's reading of how much the story bears on the contract. Not a probability and not calibrated confidence."
              },
              "why_relevant": {
                "$ref": "#/components/schemas/Text"
              },
              "explanation_kind": {
                "const": "public_explanation"
              }
            },
            "description": "A public explanation is present."
          }
        ]
      },
      "Evidence": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "report_id",
          "source_revision_id",
          "url"
        ],
        "properties": {
          "report_id": {
            "$ref": "#/components/schemas/Text"
          },
          "source_revision_id": {
            "$ref": "#/components/schemas/Text"
          },
          "url": {
            "$ref": "#/components/schemas/Url"
          }
        }
      },
      "Change": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "cursor",
          "envelope"
        ],
        "properties": {
          "cursor": {
            "type": "integer",
            "minimum": 1
          },
          "envelope": {
            "$ref": "#/components/schemas/Envelope"
          }
        },
        "description": "One feed item, and the response of GET /v1/news/{record_id}."
      },
      "NewsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Change"
            }
          },
          "next_cursor": {
            "type": "integer",
            "minimum": 0
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "description": "A page of changes, oldest first. A market-filtered page may be empty while has_more is true."
      },
      "Coverage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "declared_scope",
          "publisher_availability",
          "screened_coverage",
          "screened_coverage_status",
          "meaning",
          "source_policy"
        ],
        "properties": {
          "schema": {
            "const": "ThroughlineCoverageV1"
          },
          "declared_scope": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Text"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "publisher_availability": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "publisher",
                    "status",
                    "as_of"
                  ],
                  "properties": {
                    "publisher": {
                      "$ref": "#/components/schemas/Text"
                    },
                    "status": {
                      "enum": [
                        "available",
                        "delayed",
                        "unavailable",
                        "unknown"
                      ]
                    },
                    "as_of": {
                      "$ref": "#/components/schemas/Clock"
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "screened_coverage": {
            "type": "null"
          },
          "screened_coverage_status": {
            "const": "unknown"
          },
          "meaning": {
            "type": "string"
          },
          "source_policy": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "start",
              "historical_backfill",
              "match_evidence",
              "unsupported_evidence",
              "source_loss_before_public_commit",
              "dynamic_source_status",
              "research_archive"
            ],
            "properties": {
              "start": {
                "const": "activation"
              },
              "historical_backfill": {
                "const": false
              },
              "match_evidence": {
                "const": "primary_article_alone"
              },
              "unsupported_evidence": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "source_loss_before_public_commit": {
                "const": "possible"
              },
              "dynamic_source_status": {
                "const": "unknown"
              },
              "research_archive": {
                "const": false
              }
            }
          }
        },
        "description": "Supplied coverage facts. Screening status is unknown and is reported as unknown."
      },
      "Usage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "window_seconds",
          "reset_at",
          "requests",
          "bytes",
          "request_limit",
          "byte_limit",
          "requests_remaining",
          "bytes_remaining"
        ],
        "properties": {
          "window_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "reset_at": {
            "type": "integer",
            "minimum": 0
          },
          "requests": {
            "type": "integer",
            "minimum": 0
          },
          "bytes": {
            "type": "integer",
            "minimum": 0
          },
          "request_limit": {
            "type": "integer",
            "minimum": 0
          },
          "byte_limit": {
            "type": "integer",
            "minimum": 0
          },
          "requests_remaining": {
            "type": "integer",
            "minimum": 0
          },
          "bytes_remaining": {
            "type": "integer",
            "minimum": 0
          }
        },
        "description": "Account usage in the current window. reset_at is Unix seconds."
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message",
          "docs_url",
          "request_id"
        ],
        "properties": {
          "error": {
            "enum": [
              "unauthorized",
              "missing_or_malformed_key",
              "invalid_key",
              "account_unavailable",
              "origin_forbidden",
              "verified_identity_required",
              "scope_forbidden",
              "not_found",
              "method_not_allowed",
              "ambiguous_record",
              "active_key_limit",
              "connection_capacity",
              "consent_conflict",
              "key_creation_conflict",
              "credential_conflict",
              "trial_unavailable",
              "builder_already_active",
              "invalid_request",
              "invalid_path",
              "invalid_query",
              "invalid_pagination",
              "invalid_limit",
              "invalid_cursor",
              "invalid_stream",
              "conflicting_market",
              "invalid_market_id",
              "invalid_content_length",
              "unexpected_body",
              "invalid_body",
              "invalid_key_name",
              "invalid_scopes",
              "invalid_credential_hash",
              "authorization_pending",
              "access_denied",
              "expired_token",
              "content_length_required",
              "request_too_large",
              "request_target_too_large",
              "json_required",
              "account_quota_exceeded",
              "account_data_limit",
              "coverage_quota_exceeded",
              "usage_quota_exceeded",
              "management_quota_exceeded",
              "agent_quota_exceeded",
              "approval_limited",
              "pairing_capacity",
              "billing_quota_exceeded",
              "burst_limited",
              "burst_capacity",
              "server_capacity",
              "billing_subscription_exists",
              "billing_checkout_needs_recovery",
              "billing_checkout_needs_refresh",
              "billing_customer_unavailable",
              "billing_attempt_unknown",
              "billing_provider_unavailable",
              "billing_payment_conflict",
              "service_busy",
              "service_unavailable",
              "response_too_large",
              "internal_error"
            ]
          },
          "message": {
            "type": "string",
            "description": "The code in words, for people. Not stable; branch on error."
          },
          "docs_url": {
            "const": "https://throughline.markets/api#errors"
          },
          "request_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$",
            "description": "Also sent as the X-Request-ID header."
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "upgrade_url": {
            "type": "string",
            "description": "Only on account_quota_exceeded and account_data_limit: where the person can change plan."
          },
          "reset_at": {
            "type": "integer",
            "minimum": 0,
            "description": "Only on account_quota_exceeded and account_data_limit: Unix seconds when the allowance resets."
          },
          "status": {
            "const": "pending",
            "description": "Only on authorization_pending."
          }
        },
        "description": "Every JSON error on the customer-callable feed, account, billing and pairing routes. error is the stable code. Further fields may be added; ignore fields you do not know. Three further codes (invalid_webhook, invalid_stripe_event, billing_event_conflict; each 400) are returned only to provider webhook deliveries and are deliberately not in this enum."
      },
      "KeyList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "name",
                "created_at",
                "revoked_at"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "name": {
                  "type": "string"
                },
                "created_at": {
                  "type": "number",
                  "description": "Server Unix seconds; may include fractional seconds."
                },
                "revoked_at": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Server Unix seconds when revoked; may include fractional seconds."
                },
                "last_used_at": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Server Unix seconds of this key's most recent successful news request. Null when it has made none, or none since last-use recording began. Coverage, usage and failed requests do not move it."
                }
              }
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Without order: the last ID on the page, or the cursor you sent when the page is empty. With order=newest: null on the last page."
          }
        }
      },
      "KeyCreated": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "created_at",
          "key"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "number",
            "description": "Server Unix seconds; may include fractional seconds."
          },
          "key": {
            "type": "string",
            "pattern": "^tl_live_[A-Za-z0-9_-]{43}$",
            "description": "Shown once. Store it privately."
          }
        }
      },
      "KeyRevoked": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "revoked"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "revoked": {
            "const": true
          }
        }
      },
      "Account": {
        "type": "object",
        "description": "Account state: plan, trial, pricing and usage. billing, billing_active and activation are present for a browser session and omitted for a management credential.",
        "required": [
          "id",
          "plan",
          "usage"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "plan": {
            "type": "string",
            "description": "free, evaluation (the seven-day trial) or builder."
          },
          "billing_active": {
            "type": "boolean"
          },
          "billing": {
            "type": "object"
          },
          "trial": {
            "type": "object"
          },
          "builder_ends_at": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server Unix seconds when the current Builder grant ends."
          },
          "pricing": {
            "type": "object"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "activation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Activation"
              },
              {
                "type": "null"
              }
            ],
            "description": "One aggregate for the account. Null when the server is not recording it. Present for a browser session and omitted for a management credential."
          }
        }
      },
      "Activation": {
        "type": "object",
        "additionalProperties": false,
        "description": "Server clocks and in-place counters only. No request history, addresses, URLs, bodies or credentials are kept. Time before the account existed is not measured.",
        "required": [
          "entry_path",
          "signup_at",
          "first_key_at",
          "first_news_at",
          "last_news_at",
          "news_requests",
          "failed_requests",
          "quota_stops",
          "complete_since_signup"
        ],
        "properties": {
          "entry_path": {
            "enum": [
              "portal",
              "pairing",
              "unknown"
            ],
            "description": "How the account obtained its first key: the account page, an approved agent connection, or unknown (no key yet, or the first key predates recording)."
          },
          "signup_at": {
            "type": "number",
            "description": "Server Unix seconds when the account was created."
          },
          "first_key_at": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server Unix seconds when the account's first key was issued."
          },
          "first_news_at": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server Unix seconds of the first successful news request observed since recording began. It is the account's first success only when complete_since_signup is true."
          },
          "last_news_at": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server Unix seconds of the most recent successful news request."
          },
          "news_requests": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9223372036854775807,
            "description": "Successful news requests since recording began. Stops at the maximum."
          },
          "failed_requests": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9223372036854775807,
            "description": "News or coverage requests from a valid key that were rejected or failed without being charged. Requests with a missing, invalid or revoked key are not counted."
          },
          "quota_stops": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9223372036854775807,
            "description": "News requests refused because the account's request or data allowance was used up."
          },
          "complete_since_signup": {
            "type": "boolean",
            "description": "True when the account was created after recording began, so its clocks and counters cover its whole life. False for an older account: earlier requests were never counted and first_news_at is not its first success."
          }
        }
      },
      "BillingStatus": {
        "type": "object",
        "description": "Billing state used by the account page. Its fields are not frozen; do not build on them."
      },
      "BillingRedirect": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url",
          "test_mode"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "test_mode": {
            "type": "boolean"
          }
        }
      },
      "ApiRoot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "account",
          "docs",
          "agents"
        ],
        "properties": {
          "name": {
            "const": "Throughline API"
          },
          "account": {
            "const": "/account"
          },
          "docs": {
            "const": "https://throughline.markets/api"
          },
          "agents": {
            "const": "https://throughline.markets/agents.md"
          }
        },
        "description": "Public pointers. No authentication."
      },
      "UsageReport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "plan",
          "usage"
        ],
        "properties": {
          "plan": {
            "type": "string",
            "description": "free, evaluation (the seven-day trial) or builder; older accounts may show another label."
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "description": "GET /v1/usage: the account's plan and usage in the current window."
      },
      "PairingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "scopes",
          "feed_key_hash",
          "management_token_hash"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Shown to the person on the approval screen. Printable ASCII."
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "items": {
              "enum": [
                "news:read",
                "account:read",
                "keys:read",
                "keys:write",
                "billing:read"
              ]
            },
            "description": "Distinct scopes; news:read is always required."
          },
          "feed_key_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256, lower-case hexadecimal, of a feed key the program generated and keeps private."
          },
          "management_token_hash": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "SHA-256 of a management credential the program generated; null exactly when scopes is only news:read. Must differ from feed_key_hash."
          }
        }
      },
      "PairingCreated": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pairing_id",
          "device_code",
          "user_code",
          "expires_in",
          "interval",
          "verification_uri",
          "verification_uri_complete"
        ],
        "properties": {
          "pairing_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$",
            "description": "Becomes the connection ID and the first key ID if approved."
          },
          "device_code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "description": "Secret. Used only to poll. Never show it."
          },
          "user_code": {
            "type": "string",
            "pattern": "^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$",
            "description": "Shown to the person so they can check it matches."
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1,
            "description": "Seconds the person has to decide."
          },
          "interval": {
            "type": "integer",
            "minimum": 1,
            "description": "Minimum seconds between polls."
          },
          "verification_uri": {
            "type": "string"
          },
          "verification_uri_complete": {
            "type": "string",
            "description": "The link the person opens. The code is in the fragment, which browsers do not send to servers."
          }
        }
      },
      "PairingPoll": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "device_code"
        ],
        "properties": {
          "device_code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          }
        }
      },
      "PairingDelivered": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "key",
          "connection"
        ],
        "description": "The receipt for an approved pairing. It carries no secret: the program already holds the key it generated.",
        "properties": {
          "status": {
            "const": "delivered"
          },
          "key": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "created_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              "name": {
                "type": "string"
              },
              "created_at": {
                "type": "number",
                "description": "Server Unix seconds; may include fractional seconds."
              }
            }
          },
          "connection": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "scopes",
              "created_at",
              "expires_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              "name": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "minItems": 1,
                "maxItems": 5,
                "items": {
                  "enum": [
                    "news:read",
                    "account:read",
                    "keys:read",
                    "keys:write",
                    "billing:read"
                  ]
                }
              },
              "created_at": {
                "type": "number",
                "description": "Server Unix seconds; may include fractional seconds."
              },
              "expires_at": {
                "type": "number",
                "description": "Server Unix seconds when the management credential stops working. Feed keys do not expire with it."
              }
            }
          }
        }
      },
      "PairingView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "user_code",
          "scopes",
          "expires_at",
          "status"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "user_code": {
            "type": "string",
            "pattern": "^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$"
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "items": {
              "enum": [
                "news:read",
                "account:read",
                "keys:read",
                "keys:write",
                "billing:read"
              ]
            },
            "description": "The scopes the program asked for."
          },
          "expires_at": {
            "type": "number",
            "description": "Server Unix seconds; may include fractional seconds."
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PairingDecision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "decision",
          "scopes",
          "start_trial"
        ],
        "properties": {
          "decision": {
            "enum": [
              "approve",
              "deny"
            ]
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "items": {
              "enum": [
                "news:read",
                "account:read",
                "keys:read",
                "keys:write",
                "billing:read"
              ]
            },
            "description": "The scopes the person grants: a subset of the requested ones, always with news:read."
          },
          "start_trial": {
            "type": "boolean",
            "description": "true also starts the seven-day trial as part of approval."
          }
        }
      },
      "PairingDecided": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PairingDelivered"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "const": "denied"
              }
            }
          }
        ]
      },
      "ConnectionList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "name",
                "created_at",
                "expires_at",
                "last_used_at",
                "first_news_at",
                "revoked_at",
                "scopes",
                "feed_keys_expire",
                "keys"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{32}$"
                },
                "name": {
                  "type": "string"
                },
                "created_at": {
                  "type": "number",
                  "description": "Server Unix seconds; may include fractional seconds."
                },
                "expires_at": {
                  "type": "number",
                  "description": "Server Unix seconds when the management credential stops working."
                },
                "last_used_at": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Server Unix seconds, or null."
                },
                "first_news_at": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Server Unix seconds, or null."
                },
                "revoked_at": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Server Unix seconds, or null."
                },
                "scopes": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 5,
                  "items": {
                    "enum": [
                      "news:read",
                      "account:read",
                      "keys:read",
                      "keys:write",
                      "billing:read"
                    ]
                  }
                },
                "feed_keys_expire": {
                  "const": false,
                  "description": "Feed keys held by a connection do not expire on their own."
                },
                "keys": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "name",
                      "revoked_at"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{32}$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "revoked_at": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Server Unix seconds, or null."
                      }
                    }
                  }
                }
              }
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "null on the last page."
          }
        }
      },
      "ConnectionRevoked": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "revoked"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          },
          "revoked": {
            "const": true
          }
        }
      },
      "BillingRead": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "configured",
          "live",
          "status",
          "paid_through",
          "cancel_at_period_end"
        ],
        "description": "Billing state from the service's own records. It does not ask the payment provider and cannot start, change or cancel payment.",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "live": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "paid_through": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server Unix seconds, or null."
          },
          "cancel_at_period_end": {
            "type": "boolean"
          }
        }
      },
      "OwnConnection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "account_id",
          "connection"
        ],
        "properties": {
          "account_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "connection": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "created_at",
              "expires_at",
              "last_used_at",
              "first_news_at",
              "revoked_at",
              "scopes",
              "feed_keys_expire",
              "keys"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              "name": {
                "type": "string"
              },
              "created_at": {
                "type": "number",
                "description": "Server Unix seconds; may include fractional seconds."
              },
              "expires_at": {
                "type": "number",
                "description": "Server Unix seconds when the management credential stops working."
              },
              "last_used_at": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Server Unix seconds, or null."
              },
              "first_news_at": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Server Unix seconds, or null."
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Server Unix seconds, or null."
              },
              "scopes": {
                "type": "array",
                "minItems": 1,
                "maxItems": 5,
                "items": {
                  "enum": [
                    "news:read",
                    "account:read",
                    "keys:read",
                    "keys:write",
                    "billing:read"
                  ]
                }
              },
              "feed_keys_expire": {
                "const": false,
                "description": "Feed keys held by a connection do not expire on their own."
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "name",
                    "revoked_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{32}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Server Unix seconds, or null."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "AccessAudit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor",
          "retention"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "actor",
                "action",
                "target",
                "at",
                "result",
                "request_id"
              ],
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "actor": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "target": {
                  "type": "string"
                },
                "at": {
                  "type": "number"
                },
                "result": {
                  "const": "success"
                },
                "request_id": {
                  "type": "string"
                }
              }
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,18}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "retention": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "days",
              "rows_per_actor_class"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1
              },
              "rows_per_actor_class": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        }
      },
      "KeyCreationReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "number",
            "description": "Server Unix seconds; may include fractional seconds."
          }
        }
      }
    }
  }
}
