API / delete-origin-namespace-grant-via-api

API

Delete an Origin Namespace Grant via the API

Remove the permission a user, group, or owning-team group holds directly on an owner with DELETE https://api.cursor.com/v1/origin/owners/{ownerSlug}/grants. Official reference: Origin API → Delete Namespace Grant, and Origin Grants API.

Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a Cursor user access token that carries namespace:settings:write. Availability: Early Beta per the API overview.

Per-repository grants are unaffected. Removing a permission the principal does not hold directly succeeds without change. A removal that would leave the owner without an admin fails with FailedPrecondition (HTTP 400). The response body is empty (204 No Content).

Cost: 5 points against the principal budget (ordinary write).

Path parameters

Param Required Meaning
ownerSlug yes Owner slug

Request body

Name exactly one principal:

Field Required Meaning
user one of User principal. Send id (prefixed user_).
group one of Cursor group. Send id (prefixed grp_).
teamGroup one of Built-in owning-team group. Send kind: members or admins.
curl --request DELETE \
  --url 'https://api.cursor.com/v1/origin/owners/OWNER_SLUG/grants' \
  --header 'Authorization: Bearer YOUR_ORIGIN_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "group": {
    "id": "grp_01k2ja2000e0080000000000n2"
  }
}'

Response

Successful requests return 204 No Content with no body.

For interactive or scripted user calls, prefer origin api after origin auth login (or CURSOR_API_KEY). Do not put a Cursor API key directly in the Origin Authorization header.

Base URL: https://api.cursor.com/v1/origin.