Change the role a pending invite grants
/portal/v1/accounts/{accountSlug}/user-invites/{id}Replaces the administrator role (and scope) a pending invitation will grant on acceptance, so a mistake can be corrected without revoking and resending. Requires admin_governance.manage.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
administrators.manageGovernanceInvite, deactivate, and remove administrators. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Path Parameters
idstring Required Request body
application/json
admin_role_idstring Required Administrator role the invitee holds on acceptance
scope_typeenum Required How far the granted authority reaches. Must match the role's scope.
environment_idstring Optional Environment the authority applies within — required unless scope_type is 'account'
application_node_idstring Optional Hierarchy node — required when scope_type is 'node'
Responses
application/json
data *UserInviteResponseDto
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 PATCH "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/user-invites/value" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "admin_role_id": "string", "scope_type": "account", "environment_id": "string", "application_node_id": "string" }'
{ "data": { "id": "string", "email": "string", "first_name": "string", "last_name": "string", "name": "string", "status": "pending", "expires_at": "2026-04-20T12:00:00.000Z", "invited_by": "string", "created_at": "2026-04-20T12:00:00.000Z", "is_administrator_invite": false, "admin_role_id": "string", "environment_id": "string", "scope_type": "account", "application_node_id": "string" } }
Tell us how we can improve this guide.