Claim a domain for the organization
/api/v1/organizations/{id}/domainsClaims an email domain for the organization's end-user SSO and issues a DNS TXT challenge (an sso-domain-verification= token published under a _sso-verification subdomain; the record never names Canopy). The domain is normalized from a pasted URL or host and rejected (400) if it is malformed or a known public email provider. Idempotent: re-claiming an existing (organization, domain) returns the existing row and token. Emits an sso.domain.claimed audit row against the organization and returns 201.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
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
domainstring Required Domain to claim, e.g. `acme.com`.
Responses
application/json
data *SsoDomainResponseDto
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/domains" \ -H "X-API-Key: $CANOPY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "domain": "string" }'
{ "data": { "domain": "string", "status": "pending", "txt_record_name": "string", "txt_record_value": "string", "verified_at": "2026-04-20T12:00:00.000Z", "last_checked_at": "2026-04-20T12:00:00.000Z", "failure_reason": "string" } }
Tell us how we can improve this guide.