> **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 several deliveries (beta)

`POST /api/v1/trigger-delivery/deliveries:batchLookup`

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

Finds up to 25 trigger events by message ID or event ID, in any mix, and returns a result for each, in the order sent. An ID that matches nothing comes back as `BATCH_LOOKUP_OUTCOME_NOT_FOUND`. Attempts here have no response body; [look up one delivery](https://docs.scalekit.com/agentkit/reference/triggers/look-up-a-delivery/) to read it. The call only reads, so retrying is safe. Up to 60 requests a minute per environment.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | array of string | Yes | Message IDs (`msg_…`, sent to the endpoint as the `webhook-id` header) or event IDs (the payload's `dedupe_key`) of the trigger events to find, in any mix: at least 1 and at most 25, with no repeats. Each is 1 to 256 characters: letters, digits, `.`, `_` and `-`. An attempt ID (`atmpt_…`) refuses the whole request. |

**Response (200)**

| Name | Type | Description |
| --- | --- | --- |
| `found_count` | integer | How many of the requested IDs were found. |
| `results` | array of object | One result per requested ID, in the order the IDs were sent, so a client can pair them up positionally. |
| `results.delivery` | object | The event and its delivery attempts to every endpoint, oldest first, as [Look up a delivery](https://docs.scalekit.com/agentkit/reference/triggers/look-up-a-delivery/) returns them, except that no attempt carries a response body: each attempt's `response` is empty and its `response_truncated` is false. `truncated` keeps its meaning: true when the event has more than the 50 attempts returned. Present only for BATCH_LOOKUP_OUTCOME_FOUND. |
| `results.delivery.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. |
| `results.delivery.connection_id` | string | ID of the connection the event came from. Present even after the connection is deleted. Empty when the event carries none. |
| `results.delivery.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. |
| `results.delivery.connection_provider` | string | Provider of the connection the event came from. Empty when the connection no longer exists. |
| `results.delivery.event_id` | string | Event ID of the event: the payload's `dedupe_key` and `correlation_id`. Empty when the event was sent without one. |
| `results.delivery.message_timestamp` | string | When the event was accepted for delivery. |
| `results.delivery.msg_id` | string | Message ID of the event, sent to each endpoint as the `webhook-id` header. |
| `results.delivery.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. |
| `results.delivery.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`. |
| `results.delivery.trigger_name` | string | Key of the trigger that fired, as the subscription was created with. Empty when the subscription no longer exists. |
| `results.delivery.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. |
| `results.id` | string | The ID this result is about, exactly as sent. |
| `results.outcome` | string (enum) | What happened to this ID. BATCH_LOOKUP_OUTCOME_FOUND — the event was found and delivery holds it. BATCH_LOOKUP_OUTCOME_NOT_FOUND — no trigger event with this message ID or event ID exists in this environment. BATCH_LOOKUP_OUTCOME_RATE_LIMITED — the read was refused for volume; look the ID up again shortly. BATCH_LOOKUP_OUTCOME_FAILED — the lookup could not be completed; retrying may succeed. BATCH_LOOKUP_OUTCOME_NOT_ATTEMPTED — not looked up, because an earlier ID was rate limited or the request ran out of time; send it again. One of: `BATCH_LOOKUP_OUTCOME_FOUND`, `BATCH_LOOKUP_OUTCOME_NOT_FOUND`, `BATCH_LOOKUP_OUTCOME_RATE_LIMITED`, `BATCH_LOOKUP_OUTCOME_FAILED`, `BATCH_LOOKUP_OUTCOME_NOT_ATTEMPTED`. |
| `results.reason` | string | One sentence explaining the outcome. Empty for BATCH_LOOKUP_OUTCOME_FOUND. Never contains internal error detail. The wording can change: match on outcome, not on this text. |

**Errors**

- `400`: Invalid request, nothing looked up - `ids` is empty, holds more than 25 IDs or repeats one; an ID is longer than 256 characters or contains characters other than letters, digits, `.`, `_` and `-`; or an ID is an attempt ID (`atmpt_`), which [Look up a delivery](https://docs.scalekit.com/agentkit/reference/triggers/look-up-a-delivery/) refuses too. A well-formed ID that names no trigger event in this environment is not this case: it comes back as a NOT_FOUND result with a 200
- `404`: Not found - Triggers isn't turned on for your environment. An ID that names no trigger event is not this case: it is a NOT_FOUND result with a 200
- `429`: Too many requests - this environment has sent too many batch lookup requests in the last minute. Nothing was looked up; retry after a short wait. Reads refused for volume partway through a batch are not this case: they are reported per ID as RATE_LIMITED, with a 200
- `500`: Internal error - the environment's trigger deliveries could not be reached, so nothing was looked up; retry the request

**Request**

```bash
curl -sS -X POST \
  "$SCALEKIT_ENVIRONMENT_URL/api/v1/trigger-delivery/deliveries:batchLookup" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe",
      "msg_2qGvA9zZz0000000000000000"
    ]
  }'
```

**Response**

```json
{
  "results": [
    {
      "id": "msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe",
      "outcome": "BATCH_LOOKUP_OUTCOME_FOUND",
      "reason": "",
      "delivery": {
        "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": "",
            "response_truncated": false,
            "response_duration_ms": 84,
            "timestamp": "2026-10-28T09:17:45.020Z",
            "trigger_type": "TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED"
          }
        ],
        "truncated": false
      }
    },
    {
      "id": "msg_2qGvA9zZz0000000000000000",
      "outcome": "BATCH_LOOKUP_OUTCOME_NOT_FOUND",
      "reason": "no trigger delivery with this id exists in this environment"
    }
  ],
  "found_count": 1
}
```

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

Look up 1 to 25 delivered messages by message ID or event ID. Each ID gets its own outcome in `results` (`FOUND`, `NOT_FOUND`, `RATE_LIMITED`, `FAILED`, `NOT_ATTEMPTED`), and those never raise. Attempts in the results carry no response bodies.

```python
scalekit_client.actions.triggers.batch_lookup_deliveries(
    delivery_ids: Sequence[str],
) -> BatchLookupTriggerDeliveriesResponse
```

Example:

```python
result = scalekit_client.actions.triggers.batch_lookup_deliveries(
    delivery_ids=["msg_2qGvA1sKd8RtY6nWm3LpX9cBhVe", "msg_2qGvA9zZz0000000000000000"],
)
```

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `delivery_ids` | `Sequence[str]` | Yes | Message IDs (`msg_...`) or event IDs, unique. |

Returns `BatchLookupTriggerDeliveriesResponse`: Per-ID results and `found_count`.


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 |
