Delete a webhook

DELETE
/webhook

Removes a URL (exact match) from an advanced campaign: every registration of that URL on the campaign is removed. With ALL_CAMPAIGNS, the URL is removed from all your advanced campaigns, whatever their status, and it is no longer added to new campaigns. Removing a URL that is not registered is not an error.

The fields go in the JSON body of the DELETE request: make sure your HTTP client sends a body with DELETE.

Pitfall. Always send type: advanced. Without it, the route works on legacy email campaigns: a campaign id answers 404, and ALL_CAMPAIGNS answers success: true while the URL stays on your advanced campaigns.

Errors. 400 INVALID_PARAMETERS when campaignId or hookUrl is missing. 400 without code when campaignId is not a valid id. 404 CAMPAIGN_NOT_FOUND when the campaign does not exist on your account.

Authorization

apiKey
Authorization<token>

Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/webhook" \  -H "Authorization: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "hookUrl": "https://hooks.acme.com/emelia/9f2c4e1a7b",    "campaignId": "6651f0c2a1b2c3d4e5f60718",    "type": "advanced"  }'
{  "success": true}