webhook

Send a test delivery

Sends a test event to the webhook, even if it is inactive.

The test is attempted once and never retried. Its body has synthetic: true and an empty data.

post/webhook/{webhook}/delivery

Request

  • Base URL: http://localhost:3030
  • URL: http://localhost:3030/webhook/{webhook}/delivery
  • Auth: HTTP bearer

Path parameters

webhookstring required

The webhook's id, whk_....

Request body

event_type'permit.created' | 'case.created' required

The event type to send. Need not be one the webhook subscribes to.

synthetictrue

Always true. Marks the delivery and its body as a test.

Response

The webhook delivery.

object'webhook_delivery' required

The object's type. Always webhook_delivery.

idstring required

Unique identifier for the object. Also sent as the webhook-id header. A delivery can arrive more than once, so deduplicate on it.

seqinteger required

The delivery's position in the webhook's log. Use as since.

event_type'permit.created' | 'case.created' required

The event type.

syntheticboolean required

Whether this is a test delivery.

subjectstring required

The id of the object the event is about.

bodyobject required

The JSON body, as signed.

body_sha256string required

The SHA-256 hash of the body, in hex.

state'pending' | 'delivered' | 'failed' | 'dead_lettered' required

One of pending, delivered, failed or dead_lettered. failed has retries remaining.

attempt_countinteger required

Attempts made so far.

next_attempt_atstring date-time nullable required

Time of the next attempt. Null unless state is pending or failed.

delivered_atstring date-time nullable required

Time at which the delivery succeeded. Null until it does.

dead_lettered_atstring date-time nullable required

Time at which retries stopped. Null unless state is dead_lettered.

response_statusinteger nullable required

The last attempt's HTTP status. Null when it got no response.

response_body_headstring nullable required

The first kilobyte of the last attempt's response body. Null when it got no response.

errorstring nullable required

The last attempt's connection error. Null when it got a response.

created_atstring date-time required

Time at which the object was created.

Example response

{
  "id": "whd_01h455vb4pex5vsknk084sn02q",
  "subject": "whk_01h455vb4pex5vsknk084sn02q",
  "body_sha256": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b",
  "response_body_head": "{\"received\": true}",
  "error": "Connection timed out after 10 seconds.",
  "attempt": [
    {
      "signature": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
      "response_body_head": "{\"received\": true}",
      "error": "Connection timed out after 10 seconds."
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.