mcp
POST /v1/oauth/token
Exchange a code or refresh token for MCP access tokens (OAuth 2.1 token endpoint).
Authentication
This endpoint is public. It takes no credential and no organisation — it is what our own marketing site and AI answer engines read.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{ "grant_type": <string<authorization_code, refresh_token>> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
authorization_code (with the PKCE code_verifier; a code is single-use and lives two minutes) or refresh_token (rotating: each refresh returns a new pair, and presenting a used refresh token again revokes the whole connection). Access tokens (zoat_…) last one hour and are accepted only on /v1/mcp. Confidential clients authenticate with HTTP Basic or client_secret_post. Unauthenticated otherwise.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
grant_type | string<authorization_code, refresh_token> | Yes | — |
code | string | No | — |
redirect_uri | string | No | — |
code_verifier | string | No | — |
refresh_token | string | No | — |
client_id | string | No | — |
client_secret | string | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
access_token | string | Yes | zoat_… — accepted only on /v1/mcp. |
token_type | string<Bearer> | Yes | — |
expires_in | integer | Yes | — |
refresh_token | string | Yes | zort_… — single use; rotates on every refresh. |
scope | string | Yes | The granted permission keys |
Errors this endpoint can return
400 · 401 · 503