Replace custom role permissions
curl --request PUT \
--url https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"permissions": []
}
'const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions"
payload = { "permissions": [] }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"role": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "admin",
"name": "<string>",
"description": "<string>",
"permissions": [
"view_all_campaigns"
]
}
}Members and roles
Replace custom role permissions
Fully replaces a custom role’s permission set. Default roles keep their fixed permissions and return 400; create a custom role for a different set.
PUT
/
api
/
v2
/
org
/
roles
/
{id}
/
permissions
Replace custom role permissions
curl --request PUT \
--url https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"permissions": []
}
'const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/roles/{id}/permissions"
payload = { "permissions": [] }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"role": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "admin",
"name": "<string>",
"description": "<string>",
"permissions": [
"view_all_campaigns"
]
}
}Authorizations
Body
application/json
Available options:
view_all_campaigns, view_assigned_campaigns, add_edit_campaigns, add_edit_trackers, add_edit_creators, add_edit_lists, add_edit_media_kits, add_edit_rosters, create_payouts, create_payment_requests, add_edit_creator_portals, add_edit_casting, add_edit_posts, add_edit_stories Was this page helpful?