{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-oauth-token-request-schema.json",
  "title": "OAuthTokenRequest",
  "description": "This model is used for both the Issue and Authorize OAuth token routes",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-oauth-api-openapi.yml#/components/schemas/OAuthTokenRequest",
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string",
      "description": "OAuth client ID"
    },
    "client_secret": {
      "type": "string",
      "description": "OAuth client secret"
    },
    "redirect_uri": {
      "type": "string",
      "description": "redirect URI for the OAuth flow"
    },
    "scope": {
      "type": "string",
      "description": "scopes requested by the OAuth flow"
    },
    "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "end-user account ID"
    }
  },
  "required": [
    "client_id",
    "client_secret",
    "redirect_uri",
    "scope",
    "account_id"
  ]
}