Skip to content
API Reference

Exchange Token

POST/organizations/{organization_id}/token

Exchange user token for organization-scoped M2M token

Path ParametersExpand Collapse
organization_id: string

Organization ID or label identifier

minLength1
maxLength255
Header ParametersExpand Collapse
"X-Client-Request-ID": optional string
formatuuid
ReturnsExpand Collapse
TokenResponse = object { access_token, token_type, expires_in }

OAuth2-style token response for M2M tokens

access_token: string

The M2M access token

token_type: string

Token type (always "Bearer")

expires_in: optional number

Token expiration time in seconds

Exchange Token

curl https://api.keycard.ai/organizations/$ORGANIZATION_ID/token \
    -X POST
{
  "access_token": "access_token",
  "token_type": "Bearer",
  "expires_in": 3600
}
Returns Examples
{
  "access_token": "access_token",
  "token_type": "Bearer",
  "expires_in": 3600
}