curl -X POST 'https://api.example.com/role-assignments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"roleId": "role_456",
"membershipId": "mem_123"
}'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/role-assignments', {
roleId: 'role_456',
membershipId: 'mem_123',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "ra_789",
"roleId": "role_456",
"membershipId": "mem_123"
}
Role Assignments
Create Role Assignment
Assign a role to a membership
POST
/
role-assignments
curl -X POST 'https://api.example.com/role-assignments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"roleId": "role_456",
"membershipId": "mem_123"
}'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/role-assignments', {
roleId: 'role_456',
membershipId: 'mem_123',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "ra_789",
"roleId": "role_456",
"membershipId": "mem_123"
}
Request Body
string
required
The role ID to assign
string
required
The membership ID to assign the role to
Response
Returns the created role assignment object.curl -X POST 'https://api.example.com/role-assignments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"roleId": "role_456",
"membershipId": "mem_123"
}'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/role-assignments', {
roleId: 'role_456',
membershipId: 'mem_123',
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "ra_789",
"roleId": "role_456",
"membershipId": "mem_123"
}
Was this page helpful?
⌘I