renza

API reference / Grants

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_typestringrequired

    Possible values: user, email, group, org

  • principalstringrequiredmax 320 chars

    User id, email, or group id.

  • resource_typestringrequired

    Possible values: deck, folder

  • resourcestringrequired
  • rolestringrequired

    Possible values: viewer, commenter, editor

Returns

  • 200The updated grant.
  • 201The new grant.

Failures use the standard error envelope with a closed set of codes.