Skip to content

Change, switch off or switch back on a webhook endpoint

PATCH /webhook-endpoints/{id}

Scope: webhooks:manage. The key’s connection must hold it; see the reference’s introduction.

Replace the CAPITALS, and set PASSKAAR_KEY to a key from the portal.

Terminal window
curl -X PATCH "https://api.passkaar.com/integrations/v1/webhook-endpoints/ENDPOINT_ID" \
-H "Authorization: Bearer $PASSKAAR_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"award.created"
]
}'
Name In Type Required What it is
id path string (uuid) yes
Field Type Required What it is
url string (uri) HTTPS only. A name that resolves to a private, link-local or metadata address is refused on every attempt, and redirects are not followed.
events array of card.created, card.claimed, card.removed_from_wallet, award.created, award.reversed, reward.unlocked, redemption.created, balance.expired, refund.unresolved, customer.erased, connection.revoked, webhook.test, hold.created, hold.confirmed, hold.released, hold.expired The events to send. The feed at GET /events carries every event either way.
description string or null
enabled boolean True turns a switched-off endpoint back on.

Changed.

Field Type Required What it is
id string (uuid) yes
url string (uri) yes
events array of card.created, card.claimed, card.removed_from_wallet, award.created, award.reversed, reward.unlocked, redemption.created, balance.expired, refund.unresolved, customer.erased, connection.revoked, webhook.test, hold.created, hold.confirmed, hold.released, hold.expired yes
description string or null yes
enabled boolean yes
disabled_reason failing, owner, passkaar or null yes failing: deliveries failed for about three days and the owner was told. owner or passkaar: switched off by hand.
last_success_at string (date-time) or null yes
last_failure_at string (date-time) or null yes
created_at string (date-time) yes RFC 3339. Answers are in UTC; requests may carry any offset.

Every error is a Problem Details answer with a stable code.

Status Code
400 invalid_request
401 unauthorized
404 not_found
422 webhook_url_not_allowed
429 rate_limited
500 internal_error
503 unavailable