GET /permissions
Get all permissions for the current account
Retrieves a list of all available permissions in the system for the current account. Optionally returns detailed permission information grouped by category when the detailed parameter is provided.
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
x-account-id
header string Account ID for the request
Optional Parameters
Click here to view an exhaustive list of all available parameters
detailed
query string When present (with any value or no value), returns permissions grouped by category with detailed descriptions. When omitted, returns a simple list of permission objects or permission names.
accountId
query string (Super Admin only) ID of the account to retrieve permissions for. If omitted, returns all system permissions.
Try it out
Output:
Responses
Description
Permissions retrieved successfully
nullDescription
Unauthorized - not authenticated
{ "error": "string", "status": 0, "message": "string"}Description
Forbidden - user does not have required permissions
{ "error": "string", "status": 0, "message": "string"}Description
Internal server error
{ "error": "string", "status": 0, "message": "string"}References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/Permission
type: objectproperties: id: type: integer description: Unique identifier for the permission permission: type: string description: Permission name/code description: type: string description: Human-readable description of what the permission allows category: type: string description: Category or group the permission belongs to|export interface Permission { /** Unique identifier for the permission */ id?: number; /** Permission name/code */ permission?: string; /** Human-readable description of what the permission allows */ description?: string; /** Category or group the permission belongs to */ category?: string;}#/components/schemas/PermissionChartPermission
type: objectdescription: Detailed permission information within a categoryproperties: name: type: string description: Display name for the permission example: View CRM Data description: type: string description: Detailed explanation of what this permission allows example: Access customer profiles, leads, and contact history. View customer interactions and relationship data. permission: type: string description: Permission code/key used in the system example: readCRM|export interface PermissionChartPermission { /** Display name for the permission */ name?: string; /** Detailed explanation of what this permission allows */ description?: string; /** Permission code/key used in the system */ permission?: string;}#/components/schemas/PermissionChartItem
type: objectdescription: Grouped permission category with detailed permission informationproperties: name: type: string description: Name of the permission category (e.g., "CRM", "Applications") example: CRM description: type: string description: Description of what this permission category controls example: Manage customer relationship data and lead information permissions: type: array description: List of permissions in this category items: $ref: "#/components/schemas/PermissionChartPermission"|export interface PermissionChartItem { /** Name of the permission category (e.g., "CRM", "Applications") */ name?: string; /** Description of what this permission category controls */ description?: string; /** List of permissions in this category */ permissions?: PermissionChartPermission[];}#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status code message: type: string description: Detailed error messagedescription: Error response objectrequired: - error|export interface Error { /** Error message */ error: string; /** HTTP status code */ status?: number; /** Detailed error message */ message?: string;}Route Source Code
Check out the source code for this route entrypoint here: /permissions/route.ts
Or the swagger.yaml spec this documentation was generated from:
/permissions/swagger.yaml