Outpost logoOutpost Docs

Outpost event delivery

Delivered when a subscribed event occurs for a project. Every event type uses this same request shape — switch on the x-outpost-event header, or on eventType in the body, rather than on the URL.

Subscribe by adding a webhook config to the project (POST /v1/projects/{projectId}/webhook-configs) whose subscriptions list the events you want:

  • Message events (subscriptions.messageEvents): QUEUED, PROVIDER_ACCEPTED, PROVIDER_FAILED, SENT, CARRIER_ROUTING, DELIVERED, FAILED, ATTEMPT_FAILED, BLOCKED, CARRIER_ERROR, MAX_ATTEMPTS_REACHED, ACTIVE_ATTEMPTS, PHONE_NOT_FOUND, NO_SEND_OPT_OUT, VALIDATION_FAILED
  • Phone events (subscriptions.phoneEvents): OPTED_OUT, OPTED_IN

MESSAGE-category deliveries carry a message object loaded fresh at delivery time; PHONE-category deliveries carry a phone object. Either is omitted if the source entity can no longer be loaded.

Header Parameters

User-Agent?"Outpost-Webhook/1"

Identifies the request as an Outpost webhook delivery. Always Outpost-Webhook/1; the major version tracks the payload version.

Value in

  • "Outpost-Webhook/1"
x-outpost-event?string

The event type being delivered — matches eventType in the request body. Route on this header without parsing the body.

Value in

  • "QUEUED"
  • "PROVIDER_ACCEPTED"
  • "PROVIDER_FAILED"
  • "SENT"
  • "CARRIER_ROUTING"
  • "DELIVERED"
  • "FAILED"
  • "ATTEMPT_FAILED"
  • "BLOCKED"
  • "CARRIER_ERROR"
  • "MAX_ATTEMPTS_REACHED"
  • "ACTIVE_ATTEMPTS"
  • "PHONE_NOT_FOUND"
  • "NO_SEND_OPT_OUT"
  • "VALIDATION_FAILED"
  • "OPTED_OUT"
  • "OPTED_IN"
x-outpost-event-id?string

ID of the Event being delivered (evt-...) — matches eventId in the body.

x-outpost-payload-version?"1"

Version of the webhook payload contract. Bumped on breaking shape changes.

Value in

  • "1"
x-outpost-project-id?string

ID of the project whose webhook config produced this delivery (proj-...).

x-outpost-webhook-config-id?string

ID of the webhook config that produced this delivery (whc-...).

x-outpost-delivery-id?string

Unique ID of this delivery attempt (whd-...). Use it to deduplicate received requests.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Example Requests

POST/outpost-event