---
title: "Find several trigger deliveries by ID"
method: POST
path: "/api/v1/trigger-delivery/deliveries:batchLookup"
tags: ["Triggers"]
---

# Find several trigger deliveries by ID

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

## Request

- Base URL: `https://$SCALEKIT_ENVIRONMENT_URL`
- URL: `https://$SCALEKIT_ENVIRONMENT_URL/api/v1/trigger-delivery/deliveries:batchLookup`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://$SCALEKIT_ENVIRONMENT_URL/oauth/token`
- TypeScript: <https://skmtc.dev/scalekit/apis/scalekit-api-reference/docs/api/v1/trigger-delivery/deliveries:batchLookup/post.ts> (a function with typed inputs; its response is checked against the schema)

Finds up to 25 trigger events by message ID or event ID, and returns each one's delivery attempts across every delivery endpoint in this environment, as LookupTriggerDelivery does for one. Use this endpoint when you hold a list of IDs from your own server, for example to check which of a day's events reached you. Pass the IDs in the body, in any mix of message IDs and event IDs. Attempts in a batch result carry no response body; look one delivery up with LookupTriggerDelivery to read the bodies. Only this environment's deliveries are searched, so an ID from another environment comes back as NOT_FOUND. When reads are refused for volume partway through, that ID comes back RATE_LIMITED and the batch stops: IDs not yet looked up come back NOT_ATTEMPTED, to be sent again shortly. The call only reads, so retrying the whole request is always safe. Returns one result per ID, in the order sent, each with its outcome (FOUND with the delivery, NOT_FOUND, RATE_LIMITED, FAILED or NOT_ATTEMPTED) and a reason, plus found_count. The event payload is never returned.

## Request body

- TriggersBatchLookupTriggerDeliveriesRequest
  - `ids` string[], required: 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`

Request processed; every ID has its own result in results, in the order sent, and found_count says how many were found

- TriggersBatchLookupTriggerDeliveriesResponse
  - `found_count` integer: How many of the requested IDs were found.
  - `results` TriggersBatchLookupTriggerDeliveryResult[]: One result per requested ID, in the order the IDs were sent, so a client can pair them up positionally.
    - `delivery` TriggersLookupTriggerDeliveryResponse
      - `attempts` TriggersTriggerDeliveryAttempt[]: 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.
        - `endpoint_id` string: ID of the endpoint this attempt was made against.
        - `endpoint_url` string: URL this attempt was sent to.
        - `id` string: ID of this delivery attempt.
        - `msg_id` string: ID of the trigger event message this attempt delivered. Every attempt to deliver the same event shares this ID.
        - `response` string: Response body the endpoint returned for this attempt. A long body may be truncated.
        - `response_duration_ms` integer: How long the endpoint took to respond to this attempt, in milliseconds.
        - `response_status_code` integer: HTTP status code the endpoint returned for this attempt.
        - `response_truncated` boolean: True when `response` was cut to its first 4096 bytes. Set only by ListTriggerDeliveryAttemptsByMessage and LookupTriggerDelivery, which apply that cap.
        - `status` 'SUCCESS' | 'PENDING' | 'FAIL' | 'SENDING' | 'CANCELED': The outcome of one delivery attempt. - SUCCESS: The endpoint accepted the delivery. - PENDING: The attempt is waiting to be sent. - FAIL: The attempt failed. Failed deliveries are retried. - SENDING: The attempt is being sent. - CANCELED: The attempt was canceled and will not be sent.
        - `timestamp` string, date-time: When this attempt was made.
        - `trigger_type` 'TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED' | 'TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL': Why a delivery attempt was made. - TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_SCHEDULED: The first attempt or an automatic retry on the delivery schedule. - TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL: A retry someone started by hand.
      - `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: Key ID of the connection the event came from. 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, date-time: 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` 'WEBHOOK' | 'POLL': How a trigger detects that something happened. - WEBHOOK: The provider posts to a Scalekit URL when the event occurs. - POLL: Scalekit walks the provider's list on a cadence.
      - `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.
    - `id` string: The ID this result is about, exactly as sent.
    - `outcome` 'BATCH_LOOKUP_OUTCOME_FOUND' | 'BATCH_LOOKUP_OUTCOME_NOT_FOUND' | 'BATCH_LOOKUP_OUTCOME_RATE_LIMITED' | 'BATCH_LOOKUP_OUTCOME_FAILED' | 'BATCH_LOOKUP_OUTCOME_NOT_ATTEMPTED': What happened to one ID in a batch lookup. - BATCH_LOOKUP_OUTCOME_FOUND: The event was found; the result's delivery holds it. - BATCH_LOOKUP_OUTCOME_NOT_FOUND: No trigger event with this message ID or event ID exists in this environment. An ID from another environment is reported exactly like a missing one. - BATCH_LOOKUP_OUTCOME_RATE_LIMITED: The read was refused for volume. The batch stops: every ID that had not started by then is NOT_ATTEMPTED, wherever it sits in the list. - 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.
    - `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.

## Other responses

- `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 LookupTriggerDelivery 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 is not enabled for the 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

## Changes

- **2026-10-30** `f47f1022d844`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalekit/apis/scalekit-api-reference/changes/api/v1/trigger-delivery/deliveries:batchLookup/post.md)

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
