Set webhook URL
https://api.casafari.com/alerts-api/webhooksSend Authorization: Bearer $CASAFARI_TOKEN; see how to get a token.
Over MCP: no tool does this. MCP and REST compared.
Description
Sets (or replaces) the delivery URL for all your alert feeds.
Before saving, a GET request is sent to the URL — your server must respond with HTTP 200, otherwise this endpoint returns 400.
Alert deliveries themselves arrive as POST requests with a JSON array body.
The URL is stored per user: changing it here instantly affects every feed, including alerts already queued for delivery. Feeds cannot be created until the webhook is configured.
A signing secret is provisioned on the first call and returned in secret once; later calls return secret: null. Lost it? Use POST /webhooks/rotate-secret.
Request body
Content type application/json. Required. Type: object.
urlstring (uri)requiredExample request
Placeholders only: replace the token and the values with your own.
curl -X PUT "https://api.casafari.com/alerts-api/webhooks" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "<url>"
}'Responses
200 Successful Response
Type: object.
Show the response shape (2 fields)
urlstringrequiredsecretstringrequired400 Webhook URL verification failed.
Type: object.
Show the response shape (1 fields)
detailstringrequiredExample from the API description
{
"detail": "Webhook URL verification failed: Expected HTTP 200, got 404."
}422 Validation Error
Type: object.
Show the response shape (6 fields)
detailobject[]5 properties
loc(string | integer)[]requiredmsgstringrequiredtypestringrequiredinputanyctxobject