One webhook a source received, with its headers, body, and deliveries.

One webhook a source received, kept as it arrived, with every delivery it made. Events are kept for 30 days. In a list, each event is a shorter summary.

{
  "id": "01m3my2b42vahrbx8zt4fw84wc",
  "sourceId": "01m3m5gpkrvj4qdxwkde3vt4w9",
  "receivedAt": "2026-09-28T14:08:19.322803Z",
  "method": "POST",
  "path": "/",
  "query": "",
  "headers": [
    { "name": "Content-Type", "value": "application/json" },
    { "name": "X-Provider", "value": "mpesa" }
  ],
  "body": "{\"reference\":\"DSM-10482\",\"amount\":45000,\"msisdn\":\"255754123456\",\"status\":\"COMPLETED\"}",
  "bodyEncoding": "text",
  "ip": "196.41.60.12",
  "status": "routed",
  "deliveryList": [
    {
      "id": "01m3my2b448ze30bp4dhxfa4wd",
      "eventId": "01m3my2b42vahrbx8zt4fw84wc",
      "destinationId": "01m3m5gpbttxs7xnhk0jgyt4wa",
      "connectionId": "01m3m5hezf7epksb7f8qbww4wb",
      "trigger": "event",
      "status": "delivered",
      "attempts": 1,
      "dueAt": null,
      "firstAttemptAt": "2026-09-28T14:08:24.410092Z",
      "finishedAt": "2026-09-28T14:08:24.612337Z",
      "lastStatusCode": 200,
      "lastError": "",
      "lastErrorClass": "",
      "createdAt": "2026-09-28T14:08:19.322803Z"
    }
  ]
}

The type is HookEvent.

Fields

idstringRequired

The event’s ID, 26 lowercase letters and digits. Every delivery of the event sends it as the webhook-id header.

sourceIdstringRequired

The ID of the source that received it.

receivedAtstringRequired

When it arrived, as an ISO 8601 date and time.

methodstringRequired

The method it was sent with, such as POST.

pathstringRequired

The part of the URL after the source’s address, such as / or /stk/callback.

querystringRequired

The query string, without the ?, or an empty string.

headers{ name, value }[]Required

The headers it was sent with.

bodystringRequired

The body, up to 5 MB. Text when bodyEncoding is text, and base64 when it is base64.

bodyEncodingstringRequired

text when the body is UTF-8 text, or base64 when it holds other bytes.

ipstringRequired

The address it was sent from.

statusstringRequired

routed when at least one connection took it, or filtered when none did.

deliveryListDelivery[]Required

Every delivery it made, oldest first, including those sent again.

In a list

space.hooks.events.list() gives each event as an EventSummary, without its query, headers, body, or deliveries.

{
  "id": "01m3my2b42vahrbx8zt4fw84wc",
  "sourceId": "01m3m5gpkrvj4qdxwkde3vt4w9",
  "receivedAt": "2026-09-28T14:08:19.322803Z",
  "method": "POST",
  "path": "/",
  "status": "routed",
  "bodySize": 88,
  "deliveries": { "delivered": 1, "failed": 0, "waiting": 0 }
}
idstringRequired

The event’s ID.

sourceIdstringRequired

The ID of the source that received it.

receivedAtstringRequired

When it arrived, as an ISO 8601 date and time.

methodstringRequired

The method it was sent with.

pathstringRequired

The part of the URL after the source’s address.

statusstringRequired

routed or filtered.

bodySizeintegerRequired

The size of the body, in bytes.

deliveries.deliveredintegerRequired

How many of its deliveries were delivered.

deliveries.failedintegerRequired

How many failed.

deliveries.waitingintegerRequired

How many are pending, sending, or retrying.

Returned by

Last updated