Take a grant in the organization away
/api/v1/organizations/{id}/assignments/{assignmentId}Removes an assignment at the organization node or beneath it; the membership stays. Never bounded by the grant ceiling, but the last administrator's role at the organization node cannot be removed (409 organization.last_admin). Requires the same as creating one.
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 assignmentIdstring Required Responses
Assignment removed
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.
organization.last_adminConflictThe change would leave the organization with no active holder of <code>canopy:organization.manage</code> at its node: removing the last administrator, taking that role from them, or changing it to one without the key.
Make someone else an administrator of the organization first, then make the change.
curl -X DELETE "https://auth.canopy-io.com/api/v1/organizations/value/assignments/value" \ -H "X-API-Key: $CANOPY_API_KEY"
HTTP/1.1 204 Assignment removed (empty body)
Tell us how we can improve this guide.