---
title: "DELETE /api/v1/{context_id}/principals/{principal_id}/grants"
method: DELETE
path: "/api/v1/{context_id}/principals/{principal_id}/grants"
---

# DELETE /api/v1/{context_id}/principals/{principal_id}/grants

`DELETE /api/v1/{context_id}/principals/{principal_id}/grants`

Revoke a scope pattern from a principal for the given verbs (requires `grant:manage` over the pattern)

## Path parameters

- `context_id` string, required
- `principal_id` string, required

## Request body

- GrantRequestJson — Body for `POST` / `DELETE /{ctx}/principals/{id}/grants` — the scope pattern and the verbs to grant/revoke it for.
  - `path` string, required — A scope pattern: an exact node (`org/apple/product/ipad`) or a subtree (`org/apple/*` / `/*`).
  - `verbs` Verb[], required — Grant verbs to apply: any of `memory:read|memory:write|memory:forget| scope:read|scope:create|scope:delete|grant:manage`.

## Response `200`

Updated principal

- PrincipalJson — A principal in the `GET /{ctx}/principals` / `…/{id}` responses.
  - `displayName` string, required — Human-readable display name.
  - `grants` Grants, required — Per-verb scope pattern map. Keys are grant verbs in `<noun>:<verb>` form (`memory:read`, `memory:write`, `memory:forget`, `scope:read`, `scope:create`, `scope:delete`, `grant:manage`); values are arrays of scope patterns.
  - `id` string, required — Record-id key (e.g. `alpha-bot`).
  - `kind` string, required — Identity kind: `human` / `agent` / `service` / `unknown`.

## Other responses

- `400` — Invalid pattern or verb
- `401` — Unauthorized
- `403` — Caller lacks `grant:manage` over the region, or the target is the immutable `system` principal
- `404` — Principal does not exist
- `422` — Invalid context id

---

[API](https://skmtc.net/surrealdb/apis/spectron.md) · [All operations](https://skmtc.net/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/surrealdb/spectron/revisions/52b41ab517b6/schema)
