Create Roles API
Welcome to the documentation for the Create Roles API. This API handles role creation.
Base URL
{baseURL}/v1/accounts/settings/roles | POST
Authorization
Include the following Authorization header in your HTTP requests using a Bearer token:
Authorization: Bearer YOUR_ACCESS_TOKEN
Request Payload
Field | Type | Source | Required | Description |
---|---|---|---|---|
name | string | body | ✅ Yes | Role name |
Sample Request
curl -X POST {baseURL}/v1/accounts/settings/roles \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Admin"
}'
Sample 400 Response
{
"message": "Role already exist for this account",
"success": false,
"errors": {}
}