{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postzen-dev/json-schema/postzen-dev-connect-start-response-schema.json",
  "title": "ConnectStartResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postzen-dev-connect-api-openapi.yml#/components/schemas/ConnectStartResponse",
  "type": "object",
  "required": [
    "authUrl",
    "state"
  ],
  "properties": {
    "authUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL to redirect the user to for platform authorization."
    },
    "state": {
      "type": "string",
      "description": "OAuth state parameter generated by PostZen."
    },
    "usage": {
      "type": "object",
      "description": "Connected-account usage once this connection completes, counting the account being connected.",
      "required": [
        "accountsConnected",
        "accountsIncluded",
        "planId",
        "upgradeUrl"
      ],
      "properties": {
        "accountsConnected": {
          "type": "number",
          "description": "Active connected accounts after this connection, including the one being connected."
        },
        "accountsIncluded": {
          "type": "number",
          "description": "Accounts included in the plan. On Free this is a hard cap; paid plans bill extra accounts."
        },
        "planId": {
          "type": "string",
          "enum": [
            "free",
            "starter",
            "pro",
            "scale"
          ]
        },
        "upgradeUrl": {
          "type": "string",
          "format": "uri",
          "description": "Dashboard billing page, where the user can move to a plan with more accounts."
        }
      }
    }
  }
}