partner

POST /v1/partner/webhooks

Subscribe an endpoint to your customers' events.

Све partner крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу partner.domains; кључ без ње се одбија уз 403, а не 404.

Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

curl -X POST https://api.zinndigital.com/v1/partner/webhooks \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "endpoint": <string> }'

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли

Детаљи

Returns the signing secret ONCE — store it before you close the response. The subscription starts unverified and receives only a signed verification POST; answer it 2xx and it becomes active. Every POST carries X-Zinn-Signature (sha256= HMAC over "<X-Zinn-Timestamp>.<raw body>"), X-Zinn-Delivery and X-Zinn-Event. Re-subscribing an endpoint you already have re-keys and re-verifies it. Requires partner.domains.

Тело захтева

НазивТипОбавезноШта је ово
endpointstringДаAn https:// URL we can reach from the public internet. Judged again when the socket opens, so an address that resolves to a private range is refused at delivery time as well as…
eventsstring[]НеOmit or leave empty for every event type we publish.

Одговор

НазивТипОбавезноШта је ово
idstringДа—
endpointstringДа—
eventsstring[]ДаThe event types this endpoint receives. An empty list means every type we publish, including ones added later.
statusstring<active, unverified, suspended>Даunverified until your endpoint answers 2xx to our signed verification POST — until then it receives nothing else. suspended after 20 consecutive failures.
verified_atstringДа—
consecutive_failuresintegerДа—
last_delivery_atstringДа—
last_failure_atstringДа—
last_delivery_errorstringДаWhy the last delivery failed, as your endpoint answered it — empty once a delivery succeeds. This is the field to read when status is suspended: the count tells you the…
signing_secretstringНеThe HMAC key for X-Zinn-Signature. Returned ONCE, on creation, and never again — we keep only what is needed to sign. Lost it? Subscribe the same endpoint again and you get a…

Грешке које ова крајња тачка може вратити

401 · 403 · 422 · 429