queues:write scope (admins and up); pushing events needs queues:write too; reading needs
queues:read.
Credits are spent per batch when it is sent, never when events are pushed. Each batch costs the
queue’s credit_cost, 1 unless you set it.
Create a queue
The response is
201 with the queue, including pending_event_count (events waiting in the
open batch) and, on GET /v1/queues/{id}, an active_batch summary.
Execution modes
The keys are exact. Anything else,
threshold or interval for instance, is refused with 400
and a message naming the accepted keys.
Aggregation
item_mapping builds one item per event from paths into the event ($.field or field), placed
under items, or under the key you name in items_key. aggregate_mapping computes values
across the batch, each entry { "strategy": …, "field": "$.path" }:
The template then receives, for example,
{ "items": [{ "service": "api", "version": "1.2" }, …], "count": 7 }. Without an
aggregation_config, the template receives { "items": [event, …] } with the events as pushed.
Tiers
Which modes and how many active queues your organization may have, and how many events it may push in 24 hours, depend on its subscription tier. Over any of these lines the API answers403
with code: "tier_limit" and a message naming the tier and the limit.
Push events
202:
batch_status is ready when a fixed_volume queue has just reached its threshold, otherwise
collecting; window_end is when the batch will close if nothing else happens. Send an
Idempotency-Key so a retried push cannot count the same events twice: the same key and body
within 24 hours replays the original response.
A paused queue (is_active: false) refuses events with 409 and code: "invalid_state".
The queue-ingest edge function that accepted events before this route is deprecated. It still
answers for existing integrations but takes no new features; move to
POST /v1/queues/{id}/events.
Watch and steer
Batch statuses are
collecting, ready, processing, sent and failed; a failed batch
carries error_message, typically insufficient_credits or no_slack_connection. Event
statuses are pending, aggregated (sent as part of a batch), expired and dropped. A failed
batch leaves its events pending; drop them with drop-pending once you have dealt with the
cause.
Executions record each attempt the evaluator made for your organization, batch and scheduled
message alike: execution_type (batch_send, scheduled_send, constraint_check,
manual_send), result (success, failed, deferred), events_processed,
processing_time_ms and error_message.
Deleting a queue is refused with 409 while events are pending; flush or drop them first. Its
batches and executions go with it.
