Create a role
Create a custom role for your organization. Permissions must come from the permission catalog. Reuse the Idempotency-Key and identical body when retrying the same creation.
Headers
- Type: stringIdempotency
- Key min length:1max length:255requiredUnique for seven days. Reuse with the same body returns the original response.
Body
required
application/json
- Type: stringnamemin length:1max length:100required
- Type: array of stringpermissionsmin length:1required
- Type: stringdescriptionmax length:500nullable
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/external/v2/roles
curl https://sales-api.artemis.solar/external/v2/roles \
--request POST \
--header 'Idempotency-Key: project-coordinator-role-1' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_SECRET_TOKEN' \
--data '{
"name": "Project coordinator",
"description": "Coordinates assigned projects",
"permissions": [
"project:view_team",
"project:edit_details"
]
}'
Custom role created
{
"data": {
"id": "da7c1b2e-39f4-4c95-a816-8e27b4d1f530",
"name": "Project coordinator",
"description": "Coordinates assigned projects",
"permissions": [
"project:view_team",
"project:edit_details"
],
"createdAt": "2026-09-05T12:00:00.000Z",
"updatedAt": "2026-09-05T12:00:00.000Z"
}
}
