Webhooks

Create new webhook

POST https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks

Path Parameters

Name
Type
Description

:campaign_uuid*

String

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

String

API Key

Request Body

Name
Type
Description

url*

String

Webhook's URL

new_referral

boolean

If you want to receive webhook notifications for new referrals

reward_unlocked

boolean

If you want to receive webhook notifications when rewards are unlocked

{
    "webhook": {
        "uuid": "webhook_ac06a45cb5",
        "url": "https://webhook.site/6819636c-fd8d-45bd-a1bf-e154cd9f2d68",
        "events": {
            "new_referral": true,
            "reward_unlocked": null
        }
    }
}

Get webhooks

GET https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks

Webhooks are returned in descending order of creation.

Path Parameters

Name
Type
Description

:campaign_uuid*

String

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

String

Api Key

Get a webhook by UUID

GET https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid

Path Parameters

Name
Type
Description

:uuid*

String

Webhook's UUID

:campaign_uuid*

String

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

String

API Key

Update a webhook

PUT https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid

Path Parameters

Name
Type
Description

:uuid*

String

Webhook's UUID

:campaign_uuid*

String

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

String

API Key

Request Body

Name
Type
Description

url

String

Webhook's URL

new_referral

boolean

If you want to receive webhook notifications for new referrals

reward_unlocked

boolean

If you want to receive webhook notifications when rewards are unlocked

Delete a webhook

DELETE https://api.sparkloop.app/v1/campaigns/:campaign_uuid/webhooks/:uuid

Path Parameters

Name
Type
Description

:uuid*

String

Webhook's UUID

:campaign_uuid*

String

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

String

API Key

Last updated

Was this helpful?