> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Look up a delivery (beta)

`GET /api/v1/trigger-delivery/deliveries/{id}`

This endpoint is in beta. Its request and response may change.

Finds one trigger event by an ID your server received: the message ID from the `webhook-id` header, or the event ID, which is the payload's `dedupe_key`. Returns the event's trigger, subscription and connection, and every attempt to deliver it to each of your endpoints, oldest first. The event's payload isn't returned.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The message ID (`msg_...`, the `webhook-id` header) or the event ID (the payload's `dedupe_key`). |

**Response (200)**

| Name | Type | Description |
| --- | --- | --- |
| `attempts` | array of object | The event's delivery attempts to every endpoint in this environment, oldest first. Each names the endpoint_id and endpoint_url it was sent to. |
| `attempts.endpoint_id` | string | ID of the endpoint this attempt was made against. |
| `attempts.endpoint_url` | string | URL this attempt was sent to. |
| `attempts.id` | string | ID of this delivery attempt. |
| `attempts.msg_id` | string | ID of the trigger event message this attempt delivered. Every attempt to deliver the same event shares this ID. |
| `attempts.response` | string | Response body the endpoint returned for this attempt. A long body may be truncated. |
| `attempts.response_duration_ms` | integer | How long the endpoint took to respond to this attempt, in milliseconds. |
| `attempts.response_status_code` | integer | HTTP status code the endpoint returned for this attempt. |
| `attempts.response_truncated` | boolean | True when `response` was cut to its first 4096 bytes. Set only by [List the attempts for a delivery](https://docs.scalekit.com/agentkit/reference/triggers/list-attempts-for-a-delivery/) and [Look up a delivery](https://docs.scalekit.com/agentkit/reference/triggers/look-up-a-delivery/), which apply that cap. |
| `attempts.status` | string (enum) | Whether this attempt succeeded, is still in flight, failed, or was canceled. A failed delivery is retried, so FAIL on one attempt does not mean the event was never delivered — check the newest attempt for that message. One of: `SUCCESS`, `PENDING`, `FAIL`, `SENDING`, `CANCELED`. |
| `attempts.timestamp` | string | When this attempt was made. |
| `attempts.trigger_type` | string (enum) | Why this attempt was made: TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED for the first attempt or an automatic retry, TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL for a retry someone started by hand. One of: `TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED`, `TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL`. |
| `connection_id` | string | ID of the connection the event came from. Present even after the connection is deleted. Empty when the event carries none. |
| `connection_key_id` | string | Name of the connection the event came from, the value other AgentKit endpoints take as `connector`. Empty when the connection no longer exists. |
| `connection_provider` | string | Provider of the connection the event came from. Empty when the connection no longer exists. |
| `event_id` | string | Event ID of the event: the payload's `dedupe_key` and `correlation_id`. Empty when the event was sent without one. |
| `message_timestamp` | string | When the event was accepted for delivery. |
| `msg_id` | string | Message ID of the event, sent to each endpoint as the `webhook-id` header. |
| `subscription_id` | string | ID of the trigger subscription that sent the event. Present even after the subscription is deleted. Empty when the event carries none. |
| `trigger_mode` | string (enum) | How the trigger detects events, from the newest version of its definition: WEBHOOK or POLL. TRIGGER_MODE_UNSPECIFIED when the subscription or the definition no longer exists. One of: `WEBHOOK`, `POLL`. |
| `trigger_name` | string | Key of the trigger that fired, as the subscription was created with. Empty when the subscription no longer exists. |
| `truncated` | boolean | True when the event has more than the 50 attempts returned. The newest 50 are returned, so the earliest attempts are missing when this is true. |

**Errors**

- `400`: Invalid request - id is empty, longer than 256 characters, contains characters other than letters, digits, `.`, `_` and `-`, or is an attempt ID (`atmpt_`)
- `404`: Not found - no trigger event with this message ID or event ID exists in this environment (error_code NOT_FOUND), or Triggers isn't turned on for your environment (error_code RESOURCE_NOT_FOUND)
- `429`: Too many requests - deliveries are being read too often. Retry shortly; the request is not retried on your behalf
- `500`: Internal error - the delivery could not be looked up; retry the request

**Request**

```bash
curl -sS -X GET \
  "$SCALEKIT_ENVIRONMENT_URL/api/v1/trigger-delivery/deliveries/msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe" \
  -H "Authorization: Bearer $TOKEN"
```

**Response**

```json
{
  "msg_id": "msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe",
  "event_id": "ca_5F133400349586228019.trgs_5F141020933185734981.00Q5g00000AbCdEFGH",
  "message_timestamp": "2026-10-28T09:17:44.950Z",
  "subscription_id": "trgs_141020933185734981",
  "trigger_name": "salesforce_lead_created",
  "trigger_mode": "POLL",
  "connection_id": "conn_133400101014995480",
  "connection_key_id": "salesforce",
  "connection_provider": "SALESFORCE",
  "attempts": [
    {
      "id": "atmpt_2qGvA2bNf7KcW4xRm8TjP5sLhYd",
      "msg_id": "msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe",
      "endpoint_id": "ep_2qGv8XHk3mT5bJr9LwNc7pZeYfA",
      "endpoint_url": "https://api.example.com/scalekit/triggers",
      "status": "SUCCESS",
      "response_status_code": 200,
      "response": "{\"ok\":true}",
      "response_truncated": false,
      "response_duration_ms": 84,
      "timestamp": "2026-10-28T09:17:45.020Z",
      "trigger_type": "TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED"
    }
  ],
  "truncated": false
}
```

**Python SDK:** `scalekit_client.actions.triggers.lookup_delivery`

Look up one delivered message by its message ID or by its event ID.

```python
scalekit_client.actions.triggers.lookup_delivery(
    delivery_id: str,
) -> LookupTriggerDeliveryResponse
```

Example:

```python
result = scalekit_client.actions.triggers.lookup_delivery(
    delivery_id="msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe",
)
```

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `delivery_id` | `str` | Yes | A message ID (`msg_...`) or the event ID your endpoint received (`TriggerEvent.dedupe_key`). |

Returns `LookupTriggerDeliveryResponse`: The message, its trigger and up to 50 attempts.


Part of [Triggers](https://docs.scalekit.com/agentkit/reference/triggers/) in the [AgentKit API reference](https://docs.scalekit.com/agentkit/reference/). Authentication: https://docs.scalekit.com/agentkit/reference/authentication.md. Errors and rate limits: https://docs.scalekit.com/agentkit/reference/errors.md. Pagination: https://docs.scalekit.com/agentkit/reference/pagination.md


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
