Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create a custom role

Create a custom role that can be set on users.

POST/api/v1/{team_slug}/{app_slug}/custom-roles
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
app_slugstringrequired

App slug

team_slugstringrequired

Team slug

Request body
requiredapplication/json

custom role details

is_defaultboolean
namestringrequired
slugstringrequired
Responses
200

custom role created successfully

datainternal_pkg_webserver_v1.CustomRolerequired
Show properties
app_idstring
created_atstring
idstring
is_defaultboolean
namestring
slugstring
updated_atstring
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request (e.g. bad payload, validation error)

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
409

Conflict (e.g. already exists)

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v1/string/string/custom-roles' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "is_default": true,
  "name": "string",
  "slug": "string"
}'
Response
{
  "data": {
    "app_id": "string",
    "created_at": "string",
    "id": "string",
    "is_default": true,
    "name": "string",
    "slug": "string",
    "updated_at": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}