---
title: "Mark messages as unarchived"
method: POST
path: "/v1/messages/batch/unarchived"
tags: ["Messages"]
---

# Mark messages as unarchived

`POST /v1/messages/batch/unarchived`

## Request

- Base URL: `https://api.knock.app`
- URL: `https://api.knock.app/v1/messages/batch/unarchived`
- Auth: HTTP bearer

Marks the given messages as unarchived. This reverses the `archived` state. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later.

## Request body

- BatchMessagesStatusRequest: Request to update the status of multiple messages in batch.
  - `message_ids` string[], required: The message IDs to update the status of.

## Response `200`

OK

- Message[]: The list of messages that were updated.
  - `__typename` string, required: The typename of the schema.
  - `actors` RecipientReference[]: One or more actors that are associated with this message. Note: this is a list that can contain up to 10 actors if the message is produced from a [batch](/designing-workflows/batch-function).
    - union: A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
      - string: The ID of the user which is used as the reference for the recipient.
      - object: A reference to a recipient object.
        - `collection` string: The collection the recipient object belongs to.
        - `id` string: An identifier for the recipient object.
  - `archived_at` string, date-time, nullable: Timestamp when the message was archived.
  - `channel` object: A configured channel, which is a way to route messages to a provider.
    - `created_at` string, date-time, required: The timestamp of when the channel was created.
    - `id` string, required: The unique identifier for the channel.
    - `key` string, nullable: Unique identifier for the channel within a project (immutable once created).
    - `name` string, nullable: The human-readable name of the channel.
    - `provider` string, required: The ID of the provider that this channel uses to deliver messages.
    - `type` 'email' | 'in_app' | 'in_app_feed' | 'in_app_guide' | 'sms' | 'push' | 'chat' | 'http', required: The type of channel, determining what kind of messages it can send.
    - `updated_at` string, date-time, required: The timestamp of when the channel was last updated.
  - `channel_id` string, uuid, required: Deprecated, use channel.id instead.
  - `clicked_at` string, date-time, nullable: Timestamp when the message was clicked.
  - `data` object, nullable: Data associated with the message’s workflow run. Includes the workflow trigger request’s `data` payload merged with any additional data returned by a [fetch function](/designing-workflows/fetch-function). For messages produced after a [batch step](/designing-workflows/batch-function), includes the payload `data` from the most-recent trigger request (the final `activity` in the batch).
  - `engagement_statuses` string[], required: A list of engagement statuses.
  - `id` string, required: The unique identifier for the message.
  - `inserted_at` string, date-time, required: Timestamp when the resource was created.
  - `interacted_at` string, date-time, nullable: Timestamp when the message was interacted with.
  - `link_clicked_at` string, date-time, nullable: Timestamp when a link in the message was clicked.
  - `metadata` object, nullable: The metadata associated with the message.
  - `read_at` string, date-time, nullable: Timestamp when the message was read.
  - `recipient` union, required: A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
    - string: The ID of the user which is used as the reference for the recipient.
    - object: A reference to a recipient object.
      - `collection` string: The collection the recipient object belongs to.
      - `id` string: An identifier for the recipient object.
  - `recipient_snapshot` object, nullable: The destination the message was delivered to, captured at send time. Email channels carry `email`/`name`; chat channels carry the destination `channel_id` or `user_id`, or `via_incoming_webhook`. Null when no snapshot was captured.
    - `channel_id` string, nullable: The chat channel the message was delivered to (chat channels)
    - `email` string, nullable: The email address the message was delivered to (email channels)
    - `name` string, nullable: The recipient name at send time (email channels)
    - `user_id` string, nullable: The chat user the message was direct-messaged to (chat channels)
    - `via_incoming_webhook` boolean, nullable: Whether the chat message was delivered via an incoming webhook
  - `scheduled_at` string, date-time, nullable: Timestamp when the message was scheduled to be sent.
  - `seen_at` string, date-time, nullable: Timestamp when the message was seen.
  - `source` object, required: The workflow or guide that triggered the message.
    - `__typename` string, required
    - `branch_path` object[], nullable: The branch ancestry of the step that generated the message, outermost first. Each segment is the branching step and the branch taken. Omitted when the step is not nested under a branch.
      - `branch_id` string, uuid, required: The ID of the branch taken.
      - `step_ref` string, required: The reference of the branching step.
      - `step_type` string, required: The type of the branching step.
    - `categories` string[], required: The categories associated with the message.
    - `key` string, required: The key of the workflow or guide that triggered the message.
    - `step_ref` string, nullable: The step reference for the step in the workflow that generated the message.
    - `type` 'broadcast' | 'workflow' | 'guide': Whether this message was generated from a workflow, broadcast, or guide.
    - `version_id` string, uuid, required: The ID of the version of the workflow or guide that triggered the message.
    - `workflow_recipient_run_id` string, uuid, nullable: The unique identifier for the workflow recipient run that generated this message. Only present for workflow/broadcast messages.
    - `workflow_run_id` string, uuid, nullable: The unique identifier for the workflow run that generated this message. Only present for workflow/broadcast messages.
  - `status` 'queued' | 'sent' | 'delivered' | 'delivery_attempted' | 'undelivered' | 'not_sent' | 'bounced', required: The message delivery status.
  - `tenant` string, nullable: The ID of the `tenant` associated with the message. Only present when a `tenant` is provided on a workflow trigger request.
  - `updated_at` string, date-time, required: The timestamp when the resource was last updated.
  - `workflow` string, nullable: The key of the workflow that generated the message.

## Changes

- **2026-10-20** `3f095ce88c5d`: 1 info
  - added the optional property `items/allOf[subschema #1: Message]/source/branch_path` to the response with the `200` status
- **2026-07-28** `1e590485c902`: 1 breaking, 3 info
  - the response property `items/allOf[subschema #1: Message]/recipient_snapshot/email` became nullable for the status `200`
  - added the optional property `items/allOf[subschema #1: Message]/recipient_snapshot/channel_id` to the response with the `200` status
  - added the optional property `items/allOf[subschema #1: Message]/recipient_snapshot/user_id` to the response with the `200` status
  - added the optional property `items/allOf[subschema #1: Message]/recipient_snapshot/via_incoming_webhook` to the response with the `200` status
- **2026-07-14** `de4604427056`: 1 info
  - added the optional property `items/allOf[subschema #1: Message]/recipient_snapshot` to the response with the `200` status
- **2025-12-08** `b4f3f8094215`: 2 info
  - added the optional property `items/allOf[subschema #1: Message]/source/workflow_recipient_run_id` to the response with the `200` status
  - added the optional property `items/allOf[subschema #1: Message]/source/workflow_run_id` to the response with the `200` status
- **2025-10-27** `40ca41599f57`: 2 info
  - added the optional property `items/allOf[subschema #1: Message]/channel` to the response with the `200` status
  - response property `items/allOf[subschema #1: Message]/channel_id` deprecated

[Operation history](https://skmtc.dev/knocklabs/apis/knock-api/changes/v1/messages/batch/unarchived/post.md)

---

[API](https://skmtc.dev/knocklabs/apis/knock-api.md) · [All operations](https://skmtc.dev/knocklabs/apis/knock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/knocklabs/apis/knock-api/revisions/dd3b76c7036d?raw)
