---
title: "Export channels"
method: POST
path: "/export_channels"
tags: ["product:chat"]
---

# Export channels

`POST /export_channels`

Exports channel data to JSON file

## Request body

- ExportChannelsRequest, nullable
  - `channels` ChannelExport[], required — Export options for channels
    - `cid` string
    - `id` string — Channel ID
    - `messages_since` string, date-time — Date to export messages since
    - `messages_until` string, date-time — Date to export messages until
    - `type` string — Channel type
  - `clear_deleted_message_text` boolean — Set if deleted message text should be cleared
  - `export_users` boolean
  - `include_soft_deleted_channels` boolean — Set if you want to include deleted channels
  - `include_truncated_messages` boolean — Set if you want to include truncated messages
  - `version` string — Export version

## Response `201`

Successful response

- ExportChannelsResponse, nullable
  - `duration` string, required — Duration of the request in milliseconds
  - `task_id` string, required — ID of the task to export channels

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/8d5c27f1f6b2/schema)
