Invite an identity into a location with a role
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/workspace/invitationsInvites a person by email into a hierarchy node with a starting role, sends the invitation email and records an invite.created audit event. The invitation expires in 7 days. Requires workspace_identity.invite at the target nodeId, and roleId must be on the caller's grant ceiling; otherwise the response is 403. Returns 409 when a pending invitation for that email already exists at that node, when the email already belongs to an active member of the Environment, or when the node sits in an organization the person is not a member of. Returns the created invitation row.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
Path Parameters
accountSlugstring Required The Account's slug. An unknown one answers 404.
appSlugstring Required The Application's slug within the Account.
envSlugstring Required The Environment's slug within the Application.
Request body
application/json
emailstring Required firstNamestring Optional lastNamestring Optional nodeIdstring Required roleIdstring Required Responses
application/json
data *WorkspaceInvitationResponseDto
application/json
error *ApiErrorBodyDto
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/portal/v1/accounts/value/applications/value/environments/value/workspace/invitations" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "firstName": "string", "lastName": "string", "nodeId": "string", "roleId": "string" }'
{ "data": { "id": "string", "email": "string", "first_name": "string", "last_name": "string", "name": "string", "role_id": "string", "role_name": "string", "node_id": "string", "node_name": "string", "has_initial_assignment": false, "status": "pending", "expires_at": "2026-04-20T12:00:00.000Z", "invited_by": "string", "created_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.