Grants
The permissions model. A grant gives a principal (user or email) a role (viewer / commenter / editor) on a deck or folder; folder grants cascade. Creating a grant upserts on (principal, resource).
Related guides: Sharing & permissions
Attributes
idstringrequiredobjectstringrequiredprincipal_typestringrequiredPossible values:
user,email,group,orgprincipalstringrequiredresource_typestringrequiredPossible values:
deck,folderresourcestringrequiredrolestringrequiredPossible values:
viewer,commenter,editorcreated_bystring | nullrequiredcreated_attimestamprequiredupdated_attimestamprequired
List grants
GET/v1/grants
Lists access grants in the active org. Filter by `resource`/`resource_type` or `principal`.
Requires an API key (bearer), scoped to the active org.
Query parameters
limitintegeroptionaldefault 201–100cursorstringoptionalorderstringoptionaldefault "created_at.desc"Possible values:
created_at.desc,created_at.ascresource_typestringoptionalPossible values:
deck,folderresourcestringoptionalprincipalstringoptional
Grant access
POST/v1/grants
Grants a principal a role on a resource (folder grants cascade to the subtree). If a grant for that principal+resource already exists, its role is updated (200); otherwise a grant is created (201).
Requires an API key (bearer), scoped to the active org. Supports idempotency keys.
Body parameters
principal_typestringrequiredPossible values:
user,email,group,orgprincipalstringrequiredmax 320 charsUser id, email, or group id.
resource_typestringrequiredPossible values:
deck,folderresourcestringrequiredrolestringrequiredPossible values:
viewer,commenter,editor
Returns
200The updated grant.201The new grant.
Failures use the standard error envelope with a closed set of codes.
Retrieve a grant
GET/v1/grants/{id}
Fetches a single access grant by id within the active org.
Requires an API key (bearer), scoped to the active org.
Path parameters
idstringrequired
Revoke a grant
DELETE/v1/grants/{id}
Revokes the grant (the principal loses any access it conferred).
Requires an API key (bearer), scoped to the active org. Supports idempotency keys.
Path parameters
idstringrequired
Returns
200The revocation confirmation.
Failures use the standard error envelope with a closed set of codes.