---
title: "Query Channel Outbox Events"
method: POST
path: "/channels/outbox/events/query"
tags: ["Channels"]
---

# Query Channel Outbox Events

`POST /channels/outbox/events/query`

## Request body

- ChannelOutboxEventQueryRequest
  - `event` ChannelOutboxEventQuery
    - `thread_id` string, uuid, nullable
    - `turn_id` string, nullable
    - `key` string, uuid, nullable
    - `state` 'created' | 'sent' | 'failed' | 'abandoned' | 'held' — Where one outbound message is in its life. CREATED, not PENDING: the row is inserted before the post is attempted.
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Response `200`

Successful Response

- ChannelOutboxEventsResponse
  - `count` integer
  - `events` ChannelOutboxEvent[]
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `id` string, uuid, nullable
    - `connection_id` string, uuid, required
    - `thread_id` string, uuid, nullable
    - `space_id` string, uuid, nullable
    - `turn_id` string, required
    - `key` string, uuid, required
    - `state` 'created' | 'sent' | 'failed' | 'abandoned' | 'held', required — Where one outbound message is in its life. CREATED, not PENDING: the row is inserted before the post is attempted.
    - `status` Status
      - `timestamp` string, date-time
      - `type` string, nullable
      - `code` string, nullable
      - `message` string, nullable
      - `stacktrace` string, nullable
    - `data` ChannelOutboxEventData, required
      - `external_locator` object, nullable
      - `processed` object, nullable
    - `flags` ChannelOutboxEventFlags — Empty today, same reason as the inbox event flags.

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-25** `ec21cdc5486c` — 2 breaking, 1 warning, 2 info
  - the response property `events/items/thread_id` became optional for the status `200`
  - response property `events/items/thread_id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - added the new `held` enum value to the `events/items/state` response property for the response status `200`
  - added the new `held` enum value to the request property `event/anyOf[subschema #1: ChannelOutboxEventQuery]/state/anyOf[subschema #1: ChannelDeliveryState]/`
  - …1 more
- **2026-09-24** `a28f1d059149` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/channels/outbox/events/query/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agenta-ai/apis/agenta-api/revisions/72f2feba8ccb?raw)
