Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

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 to read it. The call only reads, so retrying is safe. Up to 60 requests a minute per environment.

Authorization

Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.

Body

idsarray of stringrequired
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

found_countinteger
How many of the requested IDs were found.
resultsarray of object
One result per requested ID, in the order the IDs were sent, so a client can pair them up positionally.
Show 4 child attributes
deliveryobject
The event and its delivery attempts to every endpoint, oldest first, as 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.
Show 11 child attributes
attemptsarray 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.
connection_idstring
ID of the connection the event came from. Present even after the connection is deleted. Empty when the event carries none.
connection_key_idstring
Name of the connection the event came from, the value other AgentKit endpoints take as connector. Empty when the connection no longer exists.
connection_providerstring
Provider of the connection the event came from. Empty when the connection no longer exists.
event_idstring
Event ID of the event: the payload's dedupe_key and correlation_id. Empty when the event was sent without one.
message_timestampstring
When the event was accepted for delivery.
msg_idstring
Message ID of the event, sent to each endpoint as the webhook-id header.
subscription_idstring
ID of the trigger subscription that sent the event. Present even after the subscription is deleted. Empty when the event carries none.
trigger_modestring (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.
WEBHOOKPOLL
trigger_namestring
Key of the trigger that fired, as the subscription was created with. Empty when the subscription no longer exists.
truncatedboolean
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.
idstring
The ID this result is about, exactly as sent.
outcomestring (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.
BATCH_LOOKUP_OUTCOME_FOUNDBATCH_LOOKUP_OUTCOME_NOT_FOUNDBATCH_LOOKUP_OUTCOME_RATE_LIMITEDBATCH_LOOKUP_OUTCOME_FAILEDBATCH_LOOKUP_OUTCOME_NOT_ATTEMPTED
reasonstring
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

Every error has the same body: code, message and details. See Errors and rate limits.

400Invalid 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 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
404Not 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
429Too 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
500Internal error - the environment's trigger deliveries could not be reached, so nothing was looked up; retry the request