Skip to main content
POST
/
api
/
v1
/
auth
/
exchange
Exchange external JWT for MLM tokens
curl --request POST \
  --url https://app.mlm-platform.com/api/v1/auth/exchange \
  --header 'Content-Type: application/json' \
  --header 'x-tenant-api-key: <api-key>' \
  --data '
{
  "externalJwt": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "provider": "open-ears"
}
'
{
  "accessToken": "<string>",
  "refreshToken": "<string>",
  "tokenType": "Bearer",
  "expiresIn": 123,
  "scope": "<string>",
  "mlmUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isNewUser": true
}

Authorizations

x-tenant-api-key
string
header
required

Tenant API key for authentication

Body

application/json
externalJwt
string
required

JWT from external provider

provider
string
required

Provider ID (e.g., 'open-ears')

token
string

Deprecated alias for externalJwt

Response

Token exchange successful

accessToken
string
refreshToken
string
tokenType
enum<string>
Available options:
Bearer
expiresIn
integer
scope
string
mlmUserId
string<uuid>
isNewUser
boolean