curl -X POST 'https://api.example.com/roles' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}'
{
"id": "role_456",
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}
Create a new role within a scope
curl -X POST 'https://api.example.com/roles' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}'
{
"id": "role_456",
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}
curl -X POST 'https://api.example.com/roles' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}'
{
"id": "role_456",
"name": "Editor",
"description": "Can edit and publish content",
"scopeId": "scope_123"
}
Was this page helpful?