curl -X POST 'https://api.example.com/memberships/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]'
[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]
Create multiple memberships in a single request
curl -X POST 'https://api.example.com/memberships/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]'
[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]
membership_{uuidv7}.curl -X POST 'https://api.example.com/memberships/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]'
[
{
"id": "membership_jane_eng",
"subjectId": "subject_jane",
"scopeId": "scope_engineering"
},
{
"id": "membership_agent_eng",
"subjectId": "subject_agent",
"scopeId": "scope_engineering"
}
]
Was this page helpful?