Mint a directory-sync token for an organization
/api/v1/organizations/{id}/directory/tokensThe raw value is shown only once. Paste it together with the base URL into the identity provider's SCIM connector.
Authentication
Bearer Token
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
API Key
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Request body
application/json
namestring Optional Human label for the token, shown in the portal token list (e.g. the IdP it's pasted into). Optional.
Responses
application/json
data *ScimTokenCreatedResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/organizations/value/directory/tokens" \ -H "X-API-Key: $CANOPY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'
{ "data": { "id": "string", "name": "string", "token": "string", "token_preview": "string", "base_url": "string", "expires_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.