Add a webhook endpoint
POST /webhook-endpoints
Scope: webhooks:manage. The key’s connection must hold it; see the reference’s introduction.
Example
Section titled “Example”Replace the CAPITALS, and set PASSKAAR_KEY to a key from the portal.
curl -X POST "https://api.passkaar.com/integrations/v1/webhook-endpoints" \ -H "Authorization: Bearer $PASSKAAR_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/passkaar-webhooks", "events": [ "award.created", "award.reversed" ]}'Parameters
Section titled “Parameters”| Name | In | Type | Required | What it is |
|---|---|---|---|---|
Idempotency-Key |
header | string | Any 1–255 visible ASCII characters, a UUID by preference. A retry with the same key within 24 hours answers the first result. reference is what guards a resend after that. |
Request body
Section titled “Request body”| Field | Type | Required | What it is |
|---|---|---|---|
url |
string (uri) | yes | 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 |
yes | The events to send. The feed at GET /events carries every event either way. |
description |
string |
Answers
Section titled “Answers”Made; the secret is shown this once.
| 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. |
secret |
string | yes | Shown once. Store it on your server. |
Errors
Section titled “Errors”Every error is a Problem Details answer with a stable code.
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 409 | request_in_progress |
| 422 | idempotency_key_reused |
| 422 | webhook_url_not_allowed |
| 429 | rate_limited |
| 500 | internal_error |
| 503 | unavailable |