POST/organization_permissions

Create a new organization permission

Creates a new organization permission for the given instance.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields
namestringrequired
The name of the permission.
keystringrequired
The key of the permission. Must have the format "org:feature:action" where feature and action are segments consisting of lowercase letters, digits, or underscores, for example "org:billing:manage" or "org:team:read". Cannot begin with "org:sys_" as that prefix is reserved for system permissions.
descriptionstringoptional
A description of the permission.

6 status codes
200Success
objectstringrequired
Allowed:permission
idstringrequired
namestringrequired
keystringrequired
descriptionstringrequired
typestringrequired
created_atintegerrequired
Unix timestamp of creation.
updated_atintegerrequired
Unix timestamp of last update.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
402Payment required
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned: Request was not successful. A 401 is returned: Authentication invalid. A 402 is returned: Payment required. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.