> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# Retrieve a delivery

GET https://api.jelliu.co/api/webhooks/deliveries/{deliveryId}

Returns one delivery with all of its attempts, the event envelope sent to the endpoint (`event`,
rebuilt from the stored event: same fields and values, although key order may differ from the
signed bytes), and the request headers of the last attempt. `request_headers` lists only
`webhook-id`, `webhook-timestamp` and the `x-jelliu-*` headers; the signature and custom headers
are never returned.

Error codes in `last_error` and `attempts[].error` are stable, machine-readable codes:
`timeout`, `url_not_allowed`, `connection_error` (optionally `connection_error:<errno>`, for
example `connection_error:ECONNREFUSED`), `http_<status>`, `signing_secret_unreadable`,
`custom_headers_unreadable`, `custom_headers_invalid`, `attempt_abandoned`, and for canceled
deliveries `endpoint_deleted`, `endpoint_disabled`, `event_missing` or `subscription_inactive`.

**Idempotency.** A read with no side effects. Safe to retry.

**Access**

* **Required scope:** `read` or `write`. Any workspace role can call it.
* **Rate limit:** General API — 120 requests/min per workspace on Starter or with no active plan, 200 on Growth, 300 on Business, 600 on Enterprise. See [Rate limits](/rate-limits).
* **Plan:** Available on every plan and also without an active subscription. See [Billing and usage](/platform/billing-and-usage#without-an-active-subscription).

Reference: https://developer.jelliu.co/api-reference/webhooks/get-webhooks-deliveries-by-delivery-id

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Path parameters

- `deliveryId` (string, required) — Id of a webhook delivery (`dlv_` plus 26 characters), as returned in `id` by `GET /api/webhooks/{webhookId}/deliveries` and sent in the `x-jelliu-delivery-id` header. A delivery of another workspace, an unknown id or a value that is not a delivery id answers `404`.

## Response

### 200

The delivery.

- `data` (WebhookDeliveryDetail, required) — A delivery with its attempts, the event envelope and the request headers.

## Errors

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (ErrorResponseError, required) — The error object. Always has `code` and `message`.

### 403 Forbidden Error

Authenticated, but not allowed: the key's scope does not cover the method, the route is restricted to workspace admins/owners and the key is not `full`, or the workspace is suspended (`TENANT_SUSPENDED`). See [Authentication](/authentication#scopes).

- `error` (ErrorResponseError, required) — The error object. Always has `code` and `message`.

### 404 Not Found Error

No delivery with this id in the workspace (or older than 30 days), or `deliveryId` is not a delivery id.

- `error` (ErrorResponseError, required) — The error object. Always has `code` and `message`.

### 429 Too Many Requests Error

Rate limit exceeded for the current 60-second window (`RATE_LIMIT_EXCEEDED`). Wait `Retry-After` seconds, then retry. The `message` differs per limiter; the code does not. See [Rate limits](/rate-limits).

- `error` (ErrorResponseError, required) — The error object. Always has `code` and `message`.

## Types

### WebhookDeliveryDetail

A delivery with its attempts, the event envelope and the request headers.

- `id` (string, required) — The delivery id, sent as `x-jelliu-delivery-id`. Use it with `GET /api/webhooks/deliveries/{deliveryId}`.
- `event_id` (string, required) — The event id (the `webhook-id` header).
- `event_type` (string, required, nullable) — `null` only if the event is no longer stored.
- `status` (enum, required) — `pending` (awaiting its first attempt or a retry), `delivering` (an attempt is in flight), `succeeded` (a `2xx` response), `failed` (a non-retryable response, or all attempts used), `canceled` (not sent: the endpoint was deleted or disabled, the workspace has no active subscription, or the event expired).
  - Allowed values: `pending`, `delivering`, `succeeded`, `failed`, `canceled`
- `attempt_count` (integer, required) — Attempts made so far (up to 12 automatic ones; a manual retry adds one).
- `next_attempt_at` (datetime, required, nullable) — When the next attempt is due, while `pending`.
- `last_attempt_at` (datetime, required, nullable)
- `last_status_code` (integer, required, nullable) — HTTP status of the last attempt; `null` when there was no HTTP response.
- `last_error` (string, required, nullable) — Machine-readable code of the last failure or cancellation reason, `null` on success: `timeout`, `url_not_allowed`, `connection_error[:<errno>]`, `http_<status>`, `signing_secret_unreadable`, `custom_headers_unreadable`, `custom_headers_invalid`, `attempt_abandoned`, `endpoint_deleted`, `endpoint_disabled`, `event_missing`, `subscription_inactive`.
- `last_duration_ms` (integer, required, nullable) — Duration of the last attempt in milliseconds.
- `manual` (boolean, required) — `true` for tests, manual retries and replays. Manual deliveries never count toward the endpoint's health.
- `created_at` (datetime, required)
- `webhook_id` (string, required) — The endpoint this delivery belongs to.
- `last_response_snippet` (string, required, nullable) — The first 1 KB of the endpoint's last response body (control characters removed).
- `attempts` (list of WebhookDeliveryDetailAttemptsItems, required) — Every attempt, oldest first.
- `event` (WebhookEventEnvelope, required, nullable) — The event envelope sent to the endpoint, `null` if the event is no longer stored.
- `request_headers` (map from string to string, required) — `webhook-id`, `webhook-timestamp` (of the last attempt; absent before the first) and the `x-jelliu-*` headers. The signature and custom headers are never included.

### ErrorResponseError

The error object. Always has `code` and `message`.

- `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `PAYLOAD_TOO_LARGE`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
- `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
- `details` (ErrorResponseErrorDetails, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields); * for a rejected multipart upload (file in an unexpected field, too many files), a list with the upload error `code` (for example `LIMIT_UNEXPECTED_FILE`) and the `field` name. Absent when the value was rejected outside the route's own validation: a malformed id, number or date the database could not read, or a JSON body that does not parse.
- `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps), `tier` alone (feature gates), or `tier` = `none` with `kind` = `subscription_required` when the workspace has no active subscription. See [Errors](/errors).

### WebhookDeliveryDetailAttemptsItems

- `attempt` (integer, required) — The attempt number (the `x-jelliu-attempt` header it was sent with).
- `at` (datetime, required)
- `status_code` (integer, required, nullable)
- `duration_ms` (integer, required, nullable)
- `error` (string, required, nullable) — Machine code
- `response_snippet` (string, required, nullable) — The first 1 KB of the response body.

### WebhookEventEnvelope

The JSON body of every delivery. It is not returned by the management endpoints (except inside `WebhookDeliveryDetail.event`); it documents the payload the receiver gets. Verify the signature over the raw bytes before parsing. See the [Webhooks guide](/webhooks#verifying-signatures).

- `id` (string, required) — The event id, `evt_` followed by a ULID (sortable by time). Equal to the `webhook-id` header, and identical across attempts, replays and every endpoint that receives the event. Use it for deduplication.
- `type` (enum, required) — An outbound webhook event type from the catalog, or `"*"`. `"*"` covers every type that is not opt-in only (opt-in-only types: `audit.log_recorded`, `security.event_recorded`, `agent_action.recorded`, `contact.created`, `contact.updated`, `message.received`, `message.sent`, `message.status_updated`), which must be listed explicitly. Types are added over time: `GET /api/webhooks/event-types` returns every subscribable type; any other name is rejected with `400`. `webhook.test` is sent only by `POST /api/webhooks/{webhookId}/test` and cannot be subscribed to.
  - Allowed values: `*`, `call.started`, `call.answered`, `call.completed`, `call.failed`, `call.transferred`, `call.analysis_updated`, `conversation.created`, `conversation.handoff_requested`, `conversation.handoff_resolved`, `conversation.closed`, `conversation.analysis_updated`, `message.received`, `message.sent`, `message.status_updated`, `contact.created`, `contact.updated`, `contact.opted_out`, `contact.converted`, `contact.erased`, `campaign.created`, `campaign.started`, `campaign.paused`, `campaign.resumed`, `campaign.completed`, `campaign.deleted`, `campaign_contact.failed`, `campaign_contact.exhausted`, `agent.created`, `agent.updated`, `agent.deleted`, `agent.paused`, `agent.resumed`, `agent.version_published`, `approval.requested`, `approval.approved`, `approval.rejected`, `approval.executed`, `approval.execution_failed`, `approval.expired`, `agent_action.recorded`, `appointment.booked`, `payment.link_created`, `payment.link_failed`, `payment.confirmed`, `payment.expired`, `receipt.received`, `receipt.verified`, `receipt.rejected`, `knowledge.document_ready`, `knowledge.document_failed`, `knowledge.document_deleted`, `lesson.learned`, `lesson.retired`, `lesson.reverted`, `whatsapp_template.status_updated`, `whatsapp_sender.status_updated`, `integration.connected`, `integration.disconnected`, `integration.expired`, `phone_number.provisioned`, `phone_number.connected`, `phone_number.deactivated`, `usage.threshold_reached`, `usage.overage_started`, `execution_budget.warning`, `execution_budget.exhausted`, `subscription.updated`, `crm_sync.completed`, `crm_sync.failed`, `audit.log_recorded`
- `api_version` (string, required) — Version of the envelope and payload schemas; currently `2026-09-27`.
- `created_at` (datetime, required) — When the event occurred (ISO 8601, UTC, milliseconds). Unlike `webhook-timestamp`, it is unchanged across attempts.
- `tenant_id` (string, required) — The workspace the event belongs to.
- `data` (map from string to any, required) — Event-specific fields, in snake_case. See the event catalog in the [Webhooks guide](/webhooks#event-catalog) and each type's `example` in `GET /api/webhooks/event-types`. A field that was not produced is `null` (for example, `sentiment_score` for an unscored call; `0` is a valid neutral score). New fields may be added at any time; ignore unrecognized fields.

### ErrorResponseErrorDetails

Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields); * for a rejected multipart upload (file in an unexpected field, too many files), a list with the upload error `code` (for example `LIMIT_UNEXPECTED_FILE`) and the `field` name. Absent when the value was rejected outside the route's own validation: a malformed id, number or date the database could not read, or a JSON body that does not parse.

- Field map: Field map
- Issue list: list of ErrorResponseErrorDetailsOneOf1Items

### Field map

- `formErrors` (list of string, optional)
- `fieldErrors` (map from string to list of string, optional)

### ErrorResponseErrorDetailsOneOf1Items

- `path` (ErrorResponseErrorDetailsOneOf1ItemsPath, optional) — Dot-separated string, or an array of keys.
- `message` (string, optional)
- `code` (string, optional) — Zod issue code, for example `invalid_type`.

### ErrorResponseErrorDetailsOneOf1ItemsPath

Dot-separated string, or an array of keys.

- string
- list of ErrorResponseErrorDetailsOneOf1ItemsPathOneOf1Items

### ErrorResponseErrorDetailsOneOf1ItemsPathOneOf1Items

- string
- integer

## Examples

**Response**

```json
{
  "data": {
    "id": "dlv_01K6B2W7M4P1R8T5V2X9Z6B3D0",
    "event_id": "evt_01K6B2W7M1N8P5R2T9V6X3Z0B7",
    "event_type": "call.failed",
    "status": "succeeded",
    "attempt_count": 3,
    "next_attempt_at": null,
    "last_attempt_at": "2026-09-27T20:58:15.311Z",
    "last_status_code": 200,
    "last_error": null,
    "last_duration_ms": 141,
    "manual": false,
    "created_at": "2026-09-27T20:45:39.870Z",
    "webhook_id": "5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d",
    "last_response_snippet": "ok",
    "attempts": [
      {
        "attempt": 1,
        "at": "2026-09-27T20:45:40.012Z",
        "status_code": null,
        "duration_ms": 10001,
        "error": "timeout",
        "response_snippet": null
      },
      {
        "attempt": 2,
        "at": "2026-09-27T20:46:10.004Z",
        "status_code": 503,
        "duration_ms": 96,
        "error": "http_503",
        "response_snippet": "Service Unavailable"
      },
      {
        "attempt": 3,
        "at": "2026-09-27T20:58:15.311Z",
        "status_code": 200,
        "duration_ms": 141,
        "error": null,
        "response_snippet": "ok"
      }
    ],
    "event": {
      "id": "evt_01K6B2W7M1N8P5R2T9V6X3Z0B7",
      "type": "call.failed",
      "api_version": "2026-09-27",
      "created_at": "2026-09-27T20:45:39.500Z",
      "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "data": {
        "agent_id": "3c59dc04-8f1a-4e2b-9d6c-7a1b2c3d4e5f",
        "call_id": "1679091c-5a88-4faf-8b3a-6c5d4e3f2a10",
        "campaign_id": "a87ff679-a2f3-4e71-8c9e-1b2c3d4e5f60",
        "contact_id": "e4da3b7f-bbce-4345-9d77-2f1e0c9b8a70",
        "duration": 0,
        "outcome": "no_answer",
        "phone_number": "+573001234567",
        "reason": "no_answer"
      }
    },
    "request_headers": {
      "webhook-id": "evt_01K6B2W7M1N8P5R2T9V6X3Z0B7",
      "webhook-timestamp": "1759006695",
      "x-jelliu-attempt": "3",
      "x-jelliu-delivery-id": "dlv_01K6B2W7M4P1R8T5V2X9Z6B3D0",
      "x-jelliu-event-type": "call.failed"
    }
  }
}
```

**SDK Code**

```python Webhooks_getWebhooksDeliveriesByDeliveryId_example
import requests

url = "https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Webhooks_getWebhooksDeliveriesByDeliveryId_example
const url = 'https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Webhooks_getWebhooksDeliveriesByDeliveryId_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Webhooks_getWebhooksDeliveriesByDeliveryId_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Webhooks_getWebhooksDeliveriesByDeliveryId_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Webhooks_getWebhooksDeliveriesByDeliveryId_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Webhooks_getWebhooksDeliveriesByDeliveryId_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Webhooks_getWebhooksDeliveriesByDeliveryId_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/webhooks/deliveries/dlv_01K6B3X0R2A5C8E1G4J7K0M3N6")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```