{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instasent/json-schema/instasent-oauth-token-response-schema.json",
  "title": "OAuth token response",
  "description": "A freshly issued access and refresh token pair. Both grants return the same\nshape. Store the new `refresh_token`: the one you presented is no longer\nvalid.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instasent-oauth-api-openapi.yml#/components/schemas/OAuthTokenResponse",
  "type": "object",
  "properties": {
    "access_token": {
      "type": "string",
      "description": "Product API bearer token (`isoa_` prefix). Send it as\n`Authorization: Bearer <access_token>`.\n"
    },
    "token_type": {
      "type": "string",
      "description": "Always `Bearer`.",
      "enum": [
        "Bearer"
      ]
    },
    "expires_in": {
      "type": "integer",
      "description": "Access token lifetime in seconds (24 hours)."
    },
    "refresh_token": {
      "type": "string",
      "description": "Single-use refresh token replacing the previous one. Use it against\n`POST /oauth/token` with `grant_type=refresh_token`.\n"
    },
    "scope": {
      "type": "string",
      "description": "Space-delimited permissions granted by the user. Present on the\nauthorization code exchange when the consent carried permissions;\n**omitted on refresh**, where the granted set is unchanged for an API\nclient and re-resolved server-side for an MCP one. Read the\nauthoritative granted set from `GET /` at any time.\n"
    }
  },
  "required": [
    "access_token",
    "token_type",
    "expires_in",
    "refresh_token"
  ]
}