OriginService

POST /v1/origin/namespaces/{namespaceSlug}/grants

Sets the permission a user, group, or owning-team group holds directly on an owner, replacing any permission previously granted directly to that principal. Repeating a grant the principal already holds succeeds without change. Only the four presets are accepted; PERMISSION_CUSTOM fails with INVALID_ARGUMENT. A user must be an active member of the owning team or its organization and a group an active group of that organization, and the write must leave the owner with at least one admin; otherwise the request fails with FAILED_PRECONDITION.

Request

  • Base URL
    https://api.cursor.com
  • Auth
    HTTP bearer

Path parameters

namespaceSlugstring required

Namespace slug.

Request body

permission'PERMISSION_READ' | 'PERMISSION_CONTRIBUTOR' | 'PERMISSION_WRITE' | 'PERMISSION_ADMIN' | 'PERMISSION_CUSTOM' required

PERMISSION_READ, PERMISSION_CONTRIBUTOR, PERMISSION_WRITE, or PERMISSION_ADMIN.

Response

OK

permission'PERMISSION_READ' | 'PERMISSION_CONTRIBUTOR' | 'PERMISSION_WRITE' | 'PERMISSION_ADMIN' | 'PERMISSION_CUSTOM'

Permission the principal holds on every repository under the owner.

Changes

No recorded changes to this operation across all 1 revision of this API.