{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/prospectapis/json-schema/prospectapis-connect-link-request-schema.json",
  "title": "ConnectLinkRequest",
  "description": "Every field is optional. A create link connects a new account; a reconnect link reconnects the account it names and keeps its account_id.",
  "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/ConnectLinkRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "create",
        "reconnect"
      ],
      "default": "create",
      "description": "create connects a new account; reconnect reconnects account_id."
    },
    "account_id": {
      "type": "string",
      "pattern": "^acc_[a-z2-7]{20}$",
      "description": "For type reconnect only: the account_id from GET /v1/accounts."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Your own reference for the account (for example your user id). Passed back in the redirect and in every account event."
    },
    "expires_on": {
      "type": "string",
      "format": "date-time",
      "description": "When the link stops working: 5 minutes to 24 hours from now. Default 1 hour."
    },
    "success_redirect_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "https URL the end user's browser is sent to once connected, with status=connected, account_id and name added to the query."
    },
    "failure_redirect_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "https URL the end user is sent to when the link can no longer succeed (expired, used, too many attempts, a restricted account), with status=failed, name and reason added."
    },
    "notify_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "https URL on a public host that receives this account's events: account.connected, account.reconnect_required and account.disconnected, signed with webhook_secret."
    }
  }
}