---
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`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/surrealdb/apis/spectron/docs/api/v1/:context_id/principals/:principal_id/grants/delete.ts> (a function with typed inputs; its response is checked against the schema)

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/*` / `/*`). A leading `/` is optional (`/org/apple` denotes the same node as `org/apple`); patterns are returned in the canonical form, without it.
  - `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
- `503`: Server too busy: the per-pod in-flight request cap was exceeded. Retry per the `Retry-After` header.

## Changes

- **2026-08-24** `9f1598713067`: 1 info
  - added the non-success response with the status `503`

[Operation history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/principals/:principal_id/grants/delete.md)

---

[API](https://skmtc.dev/surrealdb/apis/spectron.md) - [All operations](https://skmtc.dev/surrealdb/apis/spectron/llms.txt) - [OpenAPI document](https://skmtc.dev/surrealdb/apis/spectron/revisions/9f1598713067?raw)
