Invite an identity at the Account tier
/portal/v1/accounts/{accountSlug}/identity-invitesCreates an Account-tier identity invite and sends the invitation email. Unlike the env-scoped invite, it carries no role_id / node_id; the required environment_id targets an Environment so acceptance creates an EnvironmentMembership there, and the email link uses that Environment's OAuth client invite_redirect_url when set. The Environment must belong to this Account (404), and a duplicate pending invite for the same email at this scope returns 409.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
identities.manageIdentitiesManage end-user identities across the account. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Request body
application/json
emailstring Required first_namestring Optional last_namestring Optional environment_idstring Optional Optional Environment ID to invite the identity into. When supplied, acceptance creates an EnvironmentMembership for that Environment and the email link uses that Environment's invite_redirect_url when configured. When omitted, acceptance creates a directory-only Identity with no membership.
Responses
application/json
data *AccountIdentityInviteResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Errors
When the request can't be completed, the response body includes a stable error code you can branch on.
account.capability_requiredForbiddenThe signed-in user's administrator roles do not grant the capability this endpoint requires.
Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.
Returned object
curl -X POST "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/identity-invites" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "first_name": "string", "last_name": "string", "environment_id": "string" }'
{ "data": { "id": "string", "email": "string", "intent": "string", "first_name": "string", "last_name": "string", "client_id": "string", "expires_at": "2026-04-20T12:00:00.000Z", "created_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.