{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/prospectapis/json-schema/prospectapis-connected-account-schema.json",
  "title": "ConnectedAccount",
  "description": "What is connected. Never includes the session itself.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/prospectapis-connected-account-api-openapi.yml#/components/schemas/ConnectedAccount",
  "type": "object",
  "required": [
    "connected"
  ],
  "properties": {
    "connected": {
      "type": "boolean",
      "description": "true when an account is connected."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "dead",
        "connecting"
      ],
      "description": "active; connecting while a sign-in waits for a code or a check; or dead when the session has signed out and needs connecting again. Absent when nothing is connected."
    },
    "account": {
      "type": "object",
      "description": "The connected account as the platform names it.",
      "properties": {
        "handle": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's public handle."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's display name."
        }
      }
    },
    "egress": {
      "type": "string",
      "enum": [
        "dedicated",
        "shared_fallback",
        "customer_proxy",
        "none"
      ],
      "description": "How the account reaches the platform. Every connected account acts through its own dedicated IP unless you bring your own proxy: dedicated (an IP leased to this account alone), shared_fallback (a shared IP, used only while every dedicated IP is taken), customer_proxy (your own proxy_url) or none."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_used_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When an action last ran on it."
    },
    "account_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^acc_[a-z2-7]{20}$",
      "description": "This account's id. Name it with account_id on any route that acts on a connected account; optional while the key has exactly one."
    }
  }
}