Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi/chat-openapi-clientside.json

Large diffs are not rendered by default.

48 changes: 40 additions & 8 deletions openapi/chat-openapi-clientside.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,17 +1411,24 @@ components:
format: date-time
title: Created at
type: string
x-stream-index: "001.007"
x-stream-index: "001.009"
message_id_map:
additionalProperties:
type: string
description: Maps the ID of each message the request copied, the newest
page, to its ID in the fork. A fork message ID is a UUIDv5 of the fork
CID and the source message ID; the fork message IDs endpoint maps any
others
page, to its ID in the fork; short when the request copied less than a
page (see `status`). A fork message ID is a UUIDv5 of the fork CID and
the source message ID; the fork message IDs endpoint maps any others
title: Message ID map
type: object
x-stream-index: "002"
oldest_source_message_id:
description: ID, in the source channel, of the oldest message a truncated
fork copied. The fork holds no older source message; replies of the oldest
copied messages may also have been left out
title: Oldest source message ID
type: string
x-stream-index: "001.007"
source_channel_cid:
description: CID of the channel the fork was copied from
title: Source channel CID
Expand All @@ -1436,14 +1443,23 @@ components:
description: '`completed` once every message is copied. `backfilling` while
a background task copies the history older than the newest page; the fork
is usable meanwhile, and the newest messages, which an agent reads, are
already there'
normally already there. The request reads at most 1,000 source messages:
when those are mostly deleted, shadowed or replies shown in the channel,
it copies fewer, at least the message the fork is made at, and the task
copies the rest'
title: Status
type: string
x-stream-index: "001.004"
task_id:
description: ID of the task copying the older history of a backfilling fork
title: Task ID
type: string
x-stream-index: "001.008"
truncated:
description: 'True, once completed, when the source held more than 10,000
messages up to the fork point: the fork holds the newest 10,000 of them'
title: Truncated
type: boolean
x-stream-index: "001.006"
required:
- channel_cid
Expand Down Expand Up @@ -1473,6 +1489,13 @@ components:
format: date-time
title: Created at
type: string
x-stream-index: "009"
oldest_source_message_id:
description: ID, in the source channel, of the oldest message a truncated
fork copied. The fork holds no older source message; replies of the oldest
copied messages may also have been left out
title: Oldest source message ID
type: string
x-stream-index: "007"
source_channel_cid:
description: CID of the channel the fork was copied from
Expand All @@ -1488,14 +1511,23 @@ components:
description: '`completed` once every message is copied. `backfilling` while
a background task copies the history older than the newest page; the fork
is usable meanwhile, and the newest messages, which an agent reads, are
already there'
normally already there. The request reads at most 1,000 source messages:
when those are mostly deleted, shadowed or replies shown in the channel,
it copies fewer, at least the message the fork is made at, and the task
copies the rest'
title: Status
type: string
x-stream-index: "004"
task_id:
description: ID of the task copying the older history of a backfilling fork
title: Task ID
type: string
x-stream-index: "008"
truncated:
description: 'True, once completed, when the source held more than 10,000
messages up to the fork point: the fork holds the newest 10,000 of them'
title: Truncated
type: boolean
x-stream-index: "006"
required:
- channel_cid
Expand Down Expand Up @@ -18844,7 +18876,7 @@ components:
type: apiKey
info:
title: Stream API
version: v239.97.5
version: v240.0.0
x-stream-breaking-changes:
go:
- CHA-3441 (2026-10-08)
Expand Down Expand Up @@ -19756,7 +19788,7 @@ paths:
/channels/{type}/{id}/fork:
post:
description: |
Forks an agent channel at one of its messages: creates a new agent channel holding a copy of the messages a client sees up to it, itself included, with their replies up to it. The source channel is not changed. Reactions, pins, polls, read state, mutes, reminders, moderation flags and edit history are not copied. Fork only at a message the agent has finished writing. The request copies the newest 100 messages and their replies, so the fork is usable when it returns; older history is copied by a background task (`fork.status` is `backfilling`, `fork.task_id` names the task) and `channel.forked` is sent once every message is copied. A retry with the same channel ID and message returns the fork. Only available for the `agent` channel type.
Forks an agent channel at one of its messages: creates a new agent channel holding a copy of the messages a client sees up to it, itself included, with their replies up to it. The source channel is not changed. Reactions, pins, polls, read state, mutes, reminders, moderation flags and edit history are not copied. Fork only at a message the agent has finished writing. The request copies the newest 100 messages and their replies, so the fork is usable when it returns (fewer when the newest 1,000 messages are mostly deleted or hidden); older history is copied by a background task (`fork.status` is `backfilling`, `fork.task_id` names the task) and `channel.forked` is sent once every message is copied. A retry with the same channel ID and message returns the fork. Only available for the `agent` channel type.

Sends events:
- channel.created
Expand Down
2 changes: 1 addition & 1 deletion openapi/chat-openapi.json

Large diffs are not rendered by default.

186 changes: 178 additions & 8 deletions openapi/chat-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2970,17 +2970,24 @@ components:
format: date-time
title: Created at
type: string
x-stream-index: "001.007"
x-stream-index: "001.009"
message_id_map:
additionalProperties:
type: string
description: Maps the ID of each message the request copied, the newest
page, to its ID in the fork. A fork message ID is a UUIDv5 of the fork
CID and the source message ID; the fork message IDs endpoint maps any
others
page, to its ID in the fork; short when the request copied less than a
page (see `status`). A fork message ID is a UUIDv5 of the fork CID and
the source message ID; the fork message IDs endpoint maps any others
title: Message ID map
type: object
x-stream-index: "002"
oldest_source_message_id:
description: ID, in the source channel, of the oldest message a truncated
fork copied. The fork holds no older source message; replies of the oldest
copied messages may also have been left out
title: Oldest source message ID
type: string
x-stream-index: "001.007"
source_channel_cid:
description: CID of the channel the fork was copied from
title: Source channel CID
Expand All @@ -2995,14 +3002,23 @@ components:
description: '`completed` once every message is copied. `backfilling` while
a background task copies the history older than the newest page; the fork
is usable meanwhile, and the newest messages, which an agent reads, are
already there'
normally already there. The request reads at most 1,000 source messages:
when those are mostly deleted, shadowed or replies shown in the channel,
it copies fewer, at least the message the fork is made at, and the task
copies the rest'
title: Status
type: string
x-stream-index: "001.004"
task_id:
description: ID of the task copying the older history of a backfilling fork
title: Task ID
type: string
x-stream-index: "001.008"
truncated:
description: 'True, once completed, when the source held more than 10,000
messages up to the fork point: the fork holds the newest 10,000 of them'
title: Truncated
type: boolean
x-stream-index: "001.006"
required:
- channel_cid
Expand Down Expand Up @@ -3032,6 +3048,13 @@ components:
format: date-time
title: Created at
type: string
x-stream-index: "009"
oldest_source_message_id:
description: ID, in the source channel, of the oldest message a truncated
fork copied. The fork holds no older source message; replies of the oldest
copied messages may also have been left out
title: Oldest source message ID
type: string
x-stream-index: "007"
source_channel_cid:
description: CID of the channel the fork was copied from
Expand All @@ -3047,14 +3070,23 @@ components:
description: '`completed` once every message is copied. `backfilling` while
a background task copies the history older than the newest page; the fork
is usable meanwhile, and the newest messages, which an agent reads, are
already there'
normally already there. The request reads at most 1,000 source messages:
when those are mostly deleted, shadowed or replies shown in the channel,
it copies fewer, at least the message the fork is made at, and the task
copies the rest'
title: Status
type: string
x-stream-index: "004"
task_id:
description: ID of the task copying the older history of a backfilling fork
title: Task ID
type: string
x-stream-index: "008"
truncated:
description: 'True, once completed, when the source held more than 10,000
messages up to the fork point: the fork holds the newest 10,000 of them'
title: Truncated
type: boolean
x-stream-index: "006"
required:
- channel_cid
Expand Down Expand Up @@ -16341,6 +16373,110 @@ components:
- duration
title: Channels list
type: object
QueryDeletedChannelsRequest:
nullable: true
properties:
filter_conditions:
additionalProperties: {}
description: 'Optional filter. Omit it, or pass {}, to list every soft-deleted
channel of the app; for example {"team": "tenant-a"} narrows to one tenant'
title: Filter
type: object
x-stream-filter-fields:
cid:
operators:
- $eq
- $in
type: string
created_at:
operators:
- $gt
- $gte
- $lt
- $lte
type: date
created_by_id:
operators:
- $eq
- $in
type: string
deleted_at:
operators:
- $gt
- $gte
- $lt
- $lte
type: date
team:
operators:
- $eq
- $in
type: string
type:
operators:
- $eq
- $in
type: string
x-stream-index: "001"
limit:
description: Number of channels per page, 1-100 (default 25)
format: int32
maximum: 100
minimum: 0
title: Limit
type: integer
x-stream-index: "004.001"
next:
description: Cursor for the next page, from the previous response
title: Next
type: string
x-stream-index: "004.002"
prev:
description: Cursor for the previous page, from the previous response
title: Prev
type: string
x-stream-index: "004.003"
sort:
description: Sort order. Only created_at is supported; defaults to created_at
ascending
items:
$ref: '#/components/schemas/SortParamRequest'
maxItems: 1
title: Sort
type: array
x-stream-index: "002"
x-stream-sort-combinations:
- - created_at
x-stream-sort-fields:
- created_at
title: Query Deleted Channels Request
type: object
QueryDeletedChannelsResponse:
nullable: true
properties:
channels:
description: Soft-deleted channels matching the filter, each with deleted_at
set
items:
$ref: '#/components/schemas/ChannelResponse'
title: Channels
type: array
x-stream-index: "001"
duration:
description: Duration of the request in milliseconds
title: Duration
type: string
x-stream-index: "003.001"
next:
type: string
x-stream-index: "002.001"
prev:
type: string
x-stream-index: "002.002"
required:
- channels
- duration
type: object
QueryDraftsRequest:
nullable: true
properties:
Expand Down Expand Up @@ -26427,7 +26563,7 @@ components:
type: apiKey
info:
title: Stream API
version: v239.97.5
version: v240.0.0
x-stream-breaking-changes:
go:
- CHA-3441 (2026-10-08)
Expand Down Expand Up @@ -27717,7 +27853,7 @@ paths:
/channels/{type}/{id}/fork:
post:
description: |
Forks an agent channel at one of its messages: creates a new agent channel holding a copy of the messages a client sees up to it, itself included, with their replies up to it. The source channel is not changed. Reactions, pins, polls, read state, mutes, reminders, moderation flags and edit history are not copied. Fork only at a message the agent has finished writing. The request copies the newest 100 messages and their replies, so the fork is usable when it returns; older history is copied by a background task (`fork.status` is `backfilling`, `fork.task_id` names the task) and `channel.forked` is sent once every message is copied. A retry with the same channel ID and message returns the fork. Only available for the `agent` channel type.
Forks an agent channel at one of its messages: creates a new agent channel holding a copy of the messages a client sees up to it, itself included, with their replies up to it. The source channel is not changed. Reactions, pins, polls, read state, mutes, reminders, moderation flags and edit history are not copied. Fork only at a message the agent has finished writing. The request copies the newest 100 messages and their replies, so the fork is usable when it returns (fewer when the newest 1,000 messages are mostly deleted or hidden); older history is copied by a background task (`fork.status` is `backfilling`, `fork.task_id` names the task) and `channel.forked` is sent once every message is copied. A retry with the same channel ID and message returns the fork. Only available for the `agent` channel type.

Sends events:
- channel.created
Expand Down Expand Up @@ -28763,6 +28899,40 @@ paths:
summary: Deletes channels asynchronously
tags:
- product:chat
/channels/deleted:
post:
description: |
Lists soft-deleted channels, ordered by created_at. Server-side only. Without a filter it lists every soft-deleted channel of the app; filter by team to scope it to one tenant. To permanently remove the returned channels, pass their cids to Delete channels (POST /channels/delete) with hard_delete set to true; the single-channel Delete channel endpoint does not accept soft-deleted channels.
operationId: QueryDeletedChannels
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QueryDeletedChannelsRequest'
description: Query Deleted Channels Request
required: true
responses:
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/QueryDeletedChannelsResponse'
description: Successful response
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/APIError'
description: Bad request
"429":
content:
application/json:
schema:
$ref: '#/components/schemas/APIError'
description: Too many requests
summary: Query deleted channels
tags:
- product:chat
/channels/delivered:
post:
description: |
Expand Down
2 changes: 1 addition & 1 deletion openapi/clientside-api.json

Large diffs are not rendered by default.

Loading
Loading