curl -X POST 'https://api.example.com/memberships' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"subjectId": "sub_123",
"scopeId": "scope_456"
}'
{
"id": "mem_789",
"subjectId": "sub_123",
"scopeId": "scope_456"
}
Add a subject to a scope by creating a membership
curl -X POST 'https://api.example.com/memberships' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"subjectId": "sub_123",
"scopeId": "scope_456"
}'
{
"id": "mem_789",
"subjectId": "sub_123",
"scopeId": "scope_456"
}
curl -X POST 'https://api.example.com/memberships' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"subjectId": "sub_123",
"scopeId": "scope_456"
}'
{
"id": "mem_789",
"subjectId": "sub_123",
"scopeId": "scope_456"
}
Was this page helpful?