Upsert notification preferences in bulk
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/utilities/notifications/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"preferences": [
{
"topic": "<string>",
"channel": "<string>",
"enabled": true
}
]
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({preferences: [{topic: '<string>', channel: '<string>', enabled: true}]})
};
fetch('https://beta.creatorcore.co/api/v2/utilities/notifications/preferences', 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/preferences"
payload = { "preferences": [
{
"topic": "<string>",
"channel": "<string>",
"enabled": True
}
] }
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,
"preferences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"channel": "<string>",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}Notification preferences
Upsert notification preferences in bulk
Upserts preferences by (topic, channel): existing rows are updated and missing rows are created. Returns only the affected rows, in input order.
PATCH
/
api
/
v2
/
utilities
/
notifications
/
preferences
Upsert notification preferences in bulk
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/utilities/notifications/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"preferences": [
{
"topic": "<string>",
"channel": "<string>",
"enabled": true
}
]
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({preferences: [{topic: '<string>', channel: '<string>', enabled: true}]})
};
fetch('https://beta.creatorcore.co/api/v2/utilities/notifications/preferences', 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/preferences"
payload = { "preferences": [
{
"topic": "<string>",
"channel": "<string>",
"enabled": True
}
] }
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,
"preferences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"channel": "<string>",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}Authorizations
Was this page helpful?