v30

latestOpenAPI 3.0.0raw.githubusercontent.com2026-04-22116135580.0 KB
Messages
Bulk operations

Bulk update message statuses for channel

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).

post/v1/channels/{channel_id}/messages/bulk/{action}

Path parameters

channel_idstring uuid required

The ID of the channel to update messages for.

action'seen' | 'unseen' | 'read' | 'unread' | 'archived' | 'unarchived' | 'interacted' | 'archive' | 'unarchive' | 'delete' required

The target status to be applied to the messages.

Request body

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_tenantboolean

Limits the results to messages that have a tenant or not.

newer_thanstring date-time

Limits the results to messages inserted after the given date.

older_thanstring date-time

Limits the results to messages inserted before the given date.

recipient_idsstring[]

Limits the results to messages with the given recipient IDs.

tenantsstring[]

Limits the results to messages with the given tenant IDs.

trigger_datastring

Limits the results to only messages that were generated with the given data. See trigger data filtering for more information.

workflowsstring[]

Limits the results to messages with the given workflow keys.

Example request

{
  "archived": "include",
  "delivery_status": "delivered",
  "engagement_status": "seen",
  "has_tenant": true,
  "newer_than": "2024-01-01T00:00:00Z",
  "older_than": "2024-01-01T00:00:00Z",
  "recipient_ids": [
    "recipient1",
    "recipient2"
  ],
  "tenants": [
    "tenant1",
    "tenant2"
  ],
  "trigger_data": "{\"key\":\"value\"}",
  "workflows": [
    "workflow1",
    "workflow2"
  ]
}

Response

OK

__typenamestring required

The typename of the schema.

completed_atstring date-time nullable

Timestamp when the bulk operation was completed.

error_countinteger

The number of failed operations.

estimated_total_rowsinteger required

The estimated total number of rows to process.

failed_atstring date-time nullable

Timestamp when the bulk operation failed.

idstring uuid required

Unique identifier for the bulk operation.

inserted_atstring date-time required

Timestamp when the resource was created.

namestring required

The name of the bulk operation.

processed_rowsinteger required

The number of rows processed so far.

progress_pathstring uri

The URI to the bulk operation's progress.

started_atstring date-time nullable

Timestamp when the bulk operation was started.

status'queued' | 'processing' | 'completed' | 'failed' required

The status of the bulk operation.

success_countinteger required

The number of successful operations.

updated_atstring date-time required

The timestamp when the resource was last updated.

Example response

{
  "__typename": "BulkOperation",
  "completed_at": null,
  "error_count": 0,
  "error_items": [],
  "estimated_total_rows": 1000,
  "failed_at": null,
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "inserted_at": "2024-05-22T12:00:00Z",
  "name": "Bulk operation name",
  "processed_rows": 0,
  "progress_path": "https://api.switchboard.com/v1/bulk_operations/123e4567-e89b-12d3-a456-426614174000",
  "started_at": null,
  "status": "processing",
  "success_count": 0,
  "updated_at": "2024-05-22T12:00:00Z"
}