Subscribe a destination to an event topic
curl --request POST \
--url https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({topic: '<string>', destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions"
payload = {
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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,
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Notification subscriptions
Subscribe a destination to an event topic
Creates a topic subscription for a destination. A trailing % subscribes to every topic with that prefix (payouts:% for all payout events). Signed-in organization members (admin or member role) can manage every destination type. Organization API keys can manage webhook destinations and their subscriptions only, and only when the key is granted this operation by name (a key granted all operations does not include it). Connected-app (OAuth) tokens are not accepted. Subscribing a webhook to a topic that can match payout events (payouts:…, payouts:%, or %) requires permission to read payouts; otherwise 403. Returns 404 if the destination does not exist, or 409 if the topic is already subscribed for that destination.
POST
/
api
/
v2
/
utilities
/
notifications
/
subscriptions
Subscribe a destination to an event topic
curl --request POST \
--url https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({topic: '<string>', destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/utilities/notifications/subscriptions"
payload = {
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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,
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Authorizations
Body
application/json
Was this page helpful?