1. Docs
  2. API Reference
  3. Invite an identity at the Account tier

Invite an identity at the Account tier

POST/portal/v1/accounts/{accountSlug}/identity-invites

Creates 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

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability identities.manageIdentities

Manage 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

  • dataAccountIdentityInviteResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Returned object

Request
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"
  }'
Response
{
  "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"
  }
}
Related endpoints
GETList invites
GETGet invite summary
POSTResend an invite
DELETERevoke an invite
Was this page helpful?

Tell us how we can improve this guide.