{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/citi/main/json-schema/citi-o-auth-token-schema.json",
  "title": "oAuthTokenRequest",
  "description": "The request body for the V1 authentication service to retrieve an OAuth token.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-authenticationservices-api-openapi.yml#/components/schemas/oAuthToken",
  "properties": {
    "grantType": {
      "type": "string",
      "description": "You must always pass 'client_credentials' in this field because Citi only provides credentials-based authentication for API users."
    },
    "merchantId": {
      "type": "string"
    },
    "scope": {
      "type": "string",
      "description": "This is the version scope of the authentication call. Note that this value will be the same for ALL versions of the Authentication API and should be `/authenticationservices/v1`."
    },
    "sourceApplication": {
      "type": "string",
      "description": "This represents the route of the authentication call within CitiConnect API.",
      "enum": [
        "CCF"
      ]
    },
    "userDetails": {
      "$ref": "#/$defs/UserDetailsType"
    }
  },
  "required": [
    "grantType",
    "scope"
  ],
  "$defs": {
    "UserDetailsType": {
      "title": "UserDetailsType",
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        },
        "userIdType": {
          "type": "string",
          "enum": [
            "SAFEWORD"
          ]
        }
      }
    }
  }
}