Create a custom role
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"name": "<string>",
"permissions": []
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles', 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"
payload = {
"name": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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
Create a custom role
Creates a custom role with a permission set.
POST
/
api
/
v2
/
org
/
roles
Create a custom role
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"name": "<string>",
"permissions": []
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', permissions: []})
};
fetch('https://beta.creatorcore.co/api/v2/org/roles', 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"
payload = {
"name": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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?