API referenceWebhook events

Ping

Sent when the subscription is created and when its URL changes, and by the test (POST /webhooks/{id}/test). It cannot be subscribed to.

Header Parameters

Sparkle-Event*string

The event delivered.

Sparkle-Signature*string

t= the Unix time the attempt was signed, then v1= the hex HMAC-SHA256 of <t>.<body>, the body exactly as received, keyed with the whole signing secret, whsec_ prefix included, as UTF-8 bytes. Compare in constant time and reject a t more than 5 minutes from your clock. Each attempt, a retry or a replay, is signed anew. While a rotated-out secret still overlaps, the header carries one v1 per secret, the new one first: accept the delivery when any matches.

Sparkle-Delivery?string

The delivery, the same on every attempt: use it to drop repeats. A replay (POST /webhooks/{id}/deliveries/{deliveryId}/replay) is a new delivery with its own ID. It is also the delivery's id in GET /webhooks/{id}/deliveries. Absent on the test (POST /webhooks/{id}/test).

User-Agent?string

Sparkle-Webhooks/1.0. Absent on the test (POST /webhooks/{id}/test).

Request Body

application/json

created_at*string

When the event happened, to the second

Formatdate-time
data*

Always empty

id*string

The event, the same on every retry and replay: use it to drop repeats

livemode*boolean

Whether the event belongs to the live environment: true when the conversation it is about is live, or the ping's subscription is

object*"event"

Always event

Value in

  • "event"
type*"webhook.ping"

The event type, which the Sparkle-Event header repeats

Value in

  • "webhook.ping"

Response Body

Example Requests

POST/webhook.ping