List denies
/api/v1/deniesOne page of the Environment's denies, newest first by default (sort_by: created or node). A deny refuses its permission_keys to its target (an identity, a machine client, or every holder of a role) at its node and everywhere beneath, whatever grants allow. Narrow with node_id (with node_mode: at, the denies made at the node, or applies, those at it or above it, everything that refuses access there), target_type, target_id and permission; q searches target names and permission keys. A person is named only to a reader who may see the Environment's people (identity.view; for an administrator env_identities.view, and production_identities.access in a production Environment); otherwise target.name and target.email are null. Requires deny.view.
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.
Query Parameters
pagenumber Optional Page number (1-based)
takenumber Optional Items per page (1-100, default 20)
qstring Optional Search term
sort_byenum Optional `created` (the default, newest first) or `node`.
orderenum Optional Sort direction
node_idstring · uuid Optional Only denies at this node, or that apply here (`node_mode`).
node_modeenum Optional With `node_id`: `at` (the default) the denies made at the node; `applies` the denies at it or any node above it, everything that refuses access there.
target_typeenum Optional target_idstring · uuid Optional Only denies targeting this identity, machine client or role.
permissionstring Optional Only denies refusing this permission key.
Responses
application/json
items *DenyResponseDto[]pagination *PageMetaDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Pagination
This endpoint returns a paginated collection. Use the query parameters below to page through results.
pagenumberPage number (1-indexed). Defaults to 1.
takenumberItems per page (1 to 100). Defaults to 20.
Each response includes an items array alongside a pagination object with item_count, page_count, has_previous_page, and has_next_page fields.
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/denies?page=0&take=0&q=value&sort_by=created&order=asc&node_id=value&node_mode=at&target_type=identity&target_id=value&permission=value" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "items": [ { "id": "00000000-0000-0000-0000-000000000000", "target": { "type": "identity", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "email": "string" }, "permission_keys": [ "documents.view" ], "node": { "id": "00000000-0000-0000-0000-000000000000", "name": "string", "path": [ "string" ] }, "exception_roles": [ { "id": "00000000-0000-0000-0000-000000000000", "name": "string" } ], "reason": "string", "created_by": { "type": "user", "id": "00000000-0000-0000-0000-000000000000", "name": "string" }, "created_at": "2026-04-20T12:00:00.000Z" } ], "pagination": { "page": 0, "take": 0, "item_count": 0, "page_count": 0, "has_previous_page": false, "has_next_page": false } }
Tell us how we can improve this guide.