Update a custom role
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/org/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"permissions": []
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>', permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles/{id}', 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}"
payload = {
"name": "<string>",
"description": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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
Update a custom role
Updates a role’s name, description, or permissions. At least one field is required.
PATCH
/
api
/
v2
/
org
/
roles
/
{id}
Update a custom role
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/org/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"permissions": []
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>', permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles/{id}', 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}"
payload = {
"name": "<string>",
"description": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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?