Skip to main content
POST
Get Permissions
Use this API to get a user’s permissions for various resources like organizations, folders, documents, etc.
  • Returns permissions per user and resource. Temporary permissions include an expiresAt (Unix seconds) value.
  • See the Access Control overview for concepts and detailed guidance.

Endpoint

POST https://api.velt.dev/v2/auth/permissions/get

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

data
object
required

Example Request

Response

Error responses include an errorCode field with structured error codes from the UserPermissionAccessRoleResult enum. This helps you handle permission resolution failures programmatically.

Response Schema

The response returns a nested structure with permissions per user and resource type. Each resource permission can include:

Success Response

Success Response with Context Access Info

When using Access Context for feature-level permissions, the response includes a context object with accessFields showing which context values the user has access to:
The accessFields array contains strings in the format "fieldName:value" representing each context field and value combination the user has access to.

Permission Denied

Error Response Examples

When a resource does not exist, is denied, or encounters an error, the response includes both an error message and an errorCode: Resource Not Found:

API Failure Response