{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dottedsign-com/json-schema/dottedsign-com-credential-request-schema.json",
  "title": "CredentialRequest",
  "description": "Credential request body.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dottedsign-com-oauth-api-openapi.yml#/components/schemas/CredentialRequest",
  "type": "object",
  "required": [
    "grant_type"
  ],
  "properties": {
    "grant_type": {
      "type": "string",
      "description": "OAuth Grant type.",
      "enum": [
        "authorization_code",
        "client_credentials",
        "refresh_token",
        "urn:ietf:params:oauth:grant-type:jwt-bearer"
      ]
    },
    "client_id": {
      "type": "string",
      "description": "Client ID. Used when `grant_type` is `client_credentials`, `authorization_code` or `refresh_token`."
    },
    "client_secret": {
      "type": "string",
      "description": "Client secret. Used when `grant_type` is `client_credentials`, `authorization_code` or `refresh_token`."
    },
    "code": {
      "type": "string",
      "description": "Authorization code. Used when `grant_type` is `authorization_code`."
    },
    "redirect_uri": {
      "type": "string",
      "description": "Redirect URI. Used when `grant_type` is `authorization_code`."
    },
    "scope": {
      "type": "string",
      "description": "OAuth Scope (separated by a space). See API scopes for more details. Used when `grant_type` is `client_credentials`."
    },
    "refresh_token": {
      "type": "string",
      "description": "Refresh token. Used when `grant_type` is `refresh_token`."
    },
    "assertion": {
      "type": "string",
      "description": "Assertion. Used when `grant_type` is `urn:ietf:params:oauth:grant-type:jwt-bearer`."
    }
  }
}