Consuming messages
Once your trigger inbox is active, you work with messages through four operations: lease, acknowledge, release, and list. This page explains each operation, their parameters, and how to handle edge cases like quarantined messages and possible duplicates.Lease messages
Leasing claims a batch of available messages and gives your app exclusive access for a set duration. No other consumer can claim the same messages while they are leased. If you do not acknowledge before the lease expires, the messages return to the queue automatically. The Python examples on this page use aheaders variable defined once at the top of your script:
Request parameters
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
lease_seconds | integer | 300 | 3600 | How long, in seconds, to hold the lease. Messages return to the queue if not acknowledged within this window. |
lease_limit | integer | 10 | 100 | Maximum number of messages to lease in one call. |
Response fields
| Field | Description |
|---|---|
lease_id | Unique identifier for the lease batch. Required for acknowledge and release. null if no messages are available. |
leased_until | ISO 8601 timestamp when the lease expires. null if no messages are available. |
results[] | Array of leased messages. Empty if no messages are available. |
results[].id | Unique message identifier. |
results[].created_at | When the message was queued. |
results[].status | "leased" while held, transitions to "acked" after acknowledgment. |
results[].payload | The event data from the connected app. |
results[].message_attributes.lease_count | Number of times this message has been leased. Increases each time a lease expires or is released. |
results[].message_attributes.error_message | Error from the data hydration step, if one occurred. The message is still delivered. Check this field before processing. |
results[].message_attributes.possible_duplicate_data | true if Zapier detected a potential duplicate due to a deduplication key change. |
inbox_attributes.status | Current inbox status at the time of the lease call. |
inbox_attributes.paused_reason | Set if the inbox is paused. |
Empty queue
When no messages are available, the API returns HTTP 200 withlease_id: null and results: [].
Paused and drained (409)
If the inbox is paused and all buffered messages have been consumed, the API returns HTTP 409:inbox_attributes.paused_reason to determine the appropriate action. For authentication or authentication_access_revoked, the connected app account needs to be reconnected. For other reasons, go to Manage your inbox for the full list of actions.
A 409 response means the inbox is paused and empty. If messages are still available in a paused inbox, leasing continues to return them with HTTP 201 until the queue drains.
Acknowledge messages
Acknowledging permanently removes messages from the inbox. Only acknowledge after your processing succeeds.Acknowledge a full batch
Pass thelease_id to acknowledge all messages in the lease:
"status": "acked".
Acknowledge specific messages
To acknowledge a subset of the leased batch, includemessage_ids:
Expired leases
If the lease has expired when you call acknowledge, the API returns an error. Messages that have been leased and returned to the queue 5 times without acknowledgment are quarantined automatically. Check Handle quarantined messages for next steps.The Trigger Inbox API uses at-least-once delivery. Build idempotent processing and check the message
id before acting on a payload.Release messages
Releasing immediately returns leased messages to the queue without acknowledging them. Use release when your processing has failed and you want to make the messages available again without waiting for the lease to expire."status": "available" in the response.
To release specific messages within a lease, include message_ids, using the same pattern as partial acknowledgment.
Release counts as an attempt. Each release increments
lease_count toward the quarantine threshold of 5. If you expect repeated failures on a message, investigate before releasing again rather than looping.List messages
To inspect the current state of your inbox, including quarantined messages and messages with errors, use the list endpoint:next link from the response to retrieve the next page. List results include messages in all states: available, leased, acked, and quarantined.
List results do not include message payloads. Use leasing to retrieve payloads.
Handle quarantined messages
A quarantined message is no longer returned by lease calls but remains visible in list calls for inspection. To find quarantined messages, list messages and filter by status:message_attributes.error_message and your application logs from around the lease attempts. Fix the processing issue so future messages are acknowledged normally.
Quarantined messages are not automatically removed and are not redelivered. They remain visible in list calls for inspection (metadata only, not the payload).
Handle error messages and possible duplicates
Error messages
When Zapier encounters a problem fetching full event data from the connected app, it still delivers the message with a partial payload. Checkmessage_attributes.error_message before processing:
error_message is set, the payload may be incomplete. Acknowledge the message to remove it from the queue, or release it if you want to retry after addressing the underlying issue (for example, reconnecting the app account). For API-level errors and inbox lifecycle failures, go to Trigger Inbox errors.
Possible duplicates
Whenpossible_duplicate_data is true, the message may contain event data that was already delivered under a different deduplication key. This can occur after a trigger updates how it identifies unique events.
Apply your own deduplication logic when this flag is set. For example, check a unique field in the payload against your data store before writing.
Next steps
- Manage your inbox: pause, resume, update, and delete inboxes.
- Trigger Inbox API errors.
- Trigger Inbox API reference.