Grant a role at a node beneath the organization
/api/v1/organizations/{id}/assignmentsGrants role_id to identity_id at node_id, the organization node or one beneath it. The identity must be a member of the organization (409 organization.membership_required otherwise). Requires rbac.manage_assignments at the node, canopy:organization.manage at the organization, or canopy:access.manage at the node or above it, within the grant ceiling. Emits assignment.created.
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
identity_idstring Required A member of the organization
node_idstring Required The organization node, or a node beneath it; the identity must be an active member of the organization
role_idstring Required An active, assignable role of the Environment
effective_fromobject Optional When the grant starts (ISO 8601); now when omitted
effective_toobject Optional When the grant ends (ISO 8601); never when omitted
Responses
application/json
data *AssignmentResponseDto
application/json
error *ApiErrorBodyDto
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, and a correlation_id (also sent as the X-Correlation-Id header). Quote the correlation id when you contact support: it identifies the exact request in Canopy's logs.
assignment.grant_ceilingForbiddenThe caller is an identity (a customer's own administrator, acting with its session token) granting a role it may not: the role carries a permission the caller does not hold at the target node or above. Applies to creating an assignment (the organization's assignments route included), changing an assignment's role, and creating an invitation that carries a role. Console users, API keys, and the organization's own administrator inside its organization are never bounded; removing an assignment never is.
Grant a role whose every permission the caller holds at that node, read the roles the caller may grant from <code>GET /api/v1/organizations/{id}/nodes/{nodeId}/grantable-roles</code> and offer only those, or make the change with your API key.
organization.membership_requiredConflictA role was granted at a node inside an organization, or moved to one, for an identity that is not an active member of that organization.
Add the identity as a member first (<code>POST /api/v1/organizations/{org_id}/members</code>), then grant the role. A role at the organization node itself admits its holder, so it needs no step before it.
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/organizations/value/assignments" \ -H "X-API-Key: $CANOPY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "identity_id": "string", "node_id": "string", "role_id": "string", "effective_from": {}, "effective_to": {} }'
{ "data": { "id": "string", "identity_id": "string", "oauth_client_id": "string", "application_node_id": "string", "role_id": "string", "role_name": "string", "node_name": "string", "effective_from": "2026-04-20T12:00:00.000Z", "effective_to": "2026-04-20T12:00:00.000Z", "created_at": "2026-04-20T12:00:00.000Z", "updated_at": "2026-04-20T12:00:00.000Z", "version": 0 } }
Tell us how we can improve this guide.