curl -X PATCH 'https://api.example.com/roles/role_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Senior Editor",
"description": "Can edit, publish, and manage content"
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/roles/role_123', {
name: 'Senior Editor',
description: 'Can edit, publish, and manage content',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "role_123",
"name": "Senior Editor",
"description": "Can edit, publish, and manage content",
"scopeId": "scope_456"
}
Roles
Update Role
Update an existing role
PATCH
/
roles
/
{id}
curl -X PATCH 'https://api.example.com/roles/role_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Senior Editor",
"description": "Can edit, publish, and manage content"
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/roles/role_123', {
name: 'Senior Editor',
description: 'Can edit, publish, and manage content',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "role_123",
"name": "Senior Editor",
"description": "Can edit, publish, and manage content",
"scopeId": "scope_456"
}
Path Parameters
string
required
The unique identifier of the role to update
Request Body
string
Updated display name for the role
string
Updated description of the role
Response
Returns the updated role object.curl -X PATCH 'https://api.example.com/roles/role_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Senior Editor",
"description": "Can edit, publish, and manage content"
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/roles/role_123', {
name: 'Senior Editor',
description: 'Can edit, publish, and manage content',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "role_123",
"name": "Senior Editor",
"description": "Can edit, publish, and manage content",
"scopeId": "scope_456"
}
Was this page helpful?
⌘I