{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instasent/json-schema/instasent-oauth-authorization-server-metadata-schema.json",
  "title": "Authorization server metadata",
  "description": "RFC 8414 metadata. Served identically at\n`/.well-known/oauth-authorization-server` and\n`/.well-known/openid-configuration`.\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/OAuthAuthorizationServerMetadata",
  "type": "object",
  "properties": {
    "issuer": {
      "type": "string",
      "format": "uri",
      "description": "Issuer identifier, derived from the request host."
    },
    "authorization_endpoint": {
      "type": "string",
      "format": "uri",
      "description": "Where to send the user's browser to start the flow. It is on this API\nhost, the same origin as `issuer`, and redirects to the dashboard's\nconsent screen, which is where the user actually authenticates.\n"
    },
    "token_endpoint": {
      "type": "string",
      "format": "uri",
      "description": "Where to exchange the code and rotate refresh tokens."
    },
    "registration_endpoint": {
      "type": "string",
      "format": "uri",
      "description": "Dynamic Client Registration endpoint."
    },
    "scopes_supported": {
      "type": "array",
      "description": "Every product permission that can appear in a grant.",
      "items": {
        "type": "string"
      }
    },
    "response_types_supported": {
      "type": "array",
      "description": "Only the authorization code response type is supported.",
      "items": {
        "type": "string",
        "enum": [
          "code"
        ]
      }
    },
    "grant_types_supported": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "authorization_code",
          "refresh_token"
        ]
      }
    },
    "code_challenge_methods_supported": {
      "type": "array",
      "description": "PKCE is mandatory and only `S256` is accepted.",
      "items": {
        "type": "string",
        "enum": [
          "S256"
        ]
      }
    },
    "token_endpoint_auth_methods_supported": {
      "type": "array",
      "description": "Clients are public; there is no client secret.",
      "items": {
        "type": "string",
        "enum": [
          "none"
        ]
      }
    }
  },
  "required": [
    "issuer",
    "authorization_endpoint",
    "token_endpoint",
    "registration_endpoint",
    "scopes_supported",
    "response_types_supported",
    "grant_types_supported",
    "code_challenge_methods_supported",
    "token_endpoint_auth_methods_supported"
  ]
}