Create new webhook
POST
https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks
Path Parameters
Request Body
{
"webhook": {
"uuid": "webhook_ac06a45cb5",
"url": "https://webhook.site/6819636c-fd8d-45bd-a1bf-e154cd9f2d68",
"events": {
"new_referral": true,
"reward_unlocked": null
}
}
}
{
"error": "Url must start with https://"
}
Get webhooks
GET
https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks
Webhooks are returned in descending order of creation.
Path Parameters
{
"webhooks": [
{
"uuid": "webhook_6f06b5421a",
"url": "https://webhook.site/9a470b66-2d72-413e-b42d-c59c61cd4be6",
"events": {
"new_referral": false,
"reward_unlocked": true
}
},
{
"uuid": "webhook_e4a23cc058",
"url": "https://webhook.site/9a470b66-2d72-413e-b42d-c59c61cd4be6",
"events": {
"new_referral": true,
"reward_unlocked": false
}
}
]
}
{
"error": "Campaign MF9a7d8983d1c not found!"
}
Get a webhook by UUID
GET
https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid
Path Parameters
{
"webhook": {
"uuid": "webhook_ac06a45cb5",
"url": "https://webhook.site/6819636c-fd8d-45bd-a1bf-e154cd9f2d68",
"events": {
"new_referral": true,
"reward_unlocked": null
}
}
}
{
"error": "Webhook uuid blank!"
}
{
"error": "Webhook webhook_ABC not found!"
}
Update a webhook
PUT
https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid
Path Parameters
Request Body
{
"webhook": {
"uuid": "webhook_ac06a45cb5",
"url": "https://webhook.site/6819636c-fd8d-45bd-a1bf-e154cd9f2d68",
"events": {
"new_referral": true,
"reward_unlocked": null
}
}
}
{
"error": "Url must start with https://"
}
Delete a webhook
DELETE
https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid
Path Parameters
{
"message": "Successfully deleted webhook webhook_abc"
}
{
"error": "Webhook uuid blank!"
}
{
"error": "Webhook webhook_ABC not found!"
}