---
title: "Bulk update message statuses for channel"
method: POST
path: "/v1/channels/{channel_id}/messages/bulk/{action}"
tags: ["Messages", "Bulk operations"]
---

# Bulk update message statuses for channel

`POST /v1/channels/{channel_id}/messages/bulk/{action}`

Bulk update the status of messages for a specific channel. The channel is specified by the `channel_id` parameter. The action to perform is specified by the `action` parameter, where the action is a status change action (e.g. `archive`, `unarchive`).

## Path parameters

- `channel_id` string, uuid, required
- `action` 'seen' | 'unseen' | 'read' | 'unread' | 'archived' | 'unarchived' | 'interacted' | 'archive' | 'unarchive' | 'delete', required

## Request body

- BulkUpdateMessagesForChannelRequest — Updates message statuses in a specified channel. Use the `channel_id` parameter to target the channel and the `status` parameter to define what the status should be changed to (e.g. `archive`, `unarchive`). Apply to all messages or use filters to target a subset. For in-app channels, messages can be updated indefinitely via this operation. For all other channel types, messages outside the account's retention window will not be updated as part of this operation.
  - `archived` 'exclude' | 'include' | 'only' — Limits the results to messages with the given archived status.
  - `delivery_status` 'queued' | 'sent' | 'delivered' | 'delivery_attempted' | 'undelivered' | 'not_sent' | 'bounced' — Limits the results to messages with the given delivery status.
  - `engagement_status` 'seen' | 'unseen' | 'read' | 'unread' | 'archived' | 'unarchived' | 'link_clicked' | 'interacted' — Limits the results to messages with the given engagement status.
  - `has_tenant` boolean — Limits the results to messages that have a tenant or not.
  - `newer_than` string, date-time — Limits the results to messages inserted after the given date.
  - `older_than` string, date-time — Limits the results to messages inserted before the given date.
  - `recipient_ids` string[] — Limits the results to messages with the given recipient IDs.
  - `tenants` string[] — Limits the results to messages with the given tenant IDs.
  - `trigger_data` string — Limits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information.
  - `workflows` string[] — Limits the results to messages with the given workflow keys.

## Response `200`

OK

- BulkOperation — A bulk operation entity.
  - `__typename` string, required — The typename of the schema.
  - `completed_at` string, date-time, nullable — Timestamp when the bulk operation was completed.
  - `error_count` integer — The number of failed operations.
  - `error_items` object[] — A list of items that failed to be processed.
    - `collection` string, nullable — The collection this object belongs to.
    - `id` string, required — Unique identifier for the object.
  - `estimated_total_rows` integer, required — The estimated total number of rows to process.
  - `failed_at` string, date-time, nullable — Timestamp when the bulk operation failed.
  - `id` string, uuid, required — Unique identifier for the bulk operation.
  - `inserted_at` string, date-time, required — Timestamp when the resource was created.
  - `name` string, required — The name of the bulk operation.
  - `processed_rows` integer, required — The number of rows processed so far.
  - `progress_path` string, uri — The URI to the bulk operation's progress.
  - `started_at` string, date-time, nullable — Timestamp when the bulk operation was started.
  - `status` 'queued' | 'processing' | 'completed' | 'failed', required — The status of the bulk operation.
  - `success_count` integer, required — The number of successful operations.
  - `updated_at` string, date-time, required — The timestamp when the resource was last updated.

---

[API](https://skmtc.net/knocklabs/apis/knock-api.md) · [All operations](https://skmtc.net/knocklabs/apis/knock-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/knocklabs/knock-api/revisions/4b8499dddbc5/schema)
