<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/messages/update-message-status

# Update Message Status

`POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/status`

Sets the delivery status of a message.

Channel integrations (such as the WhatsApp API server) use it to report
delivery and read receipts. The status can only move **forward**:
`sent` → `delivered` → `read` → `failed` → `deleted`. Each status reached is
recorded in `status_history`.

| Setting | Value |
| --- | --- |
| **Method** | `POST` |
| **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/status` |
| **Authorization** | User token. |

**Permissions:**

- User token — any agent who can see the conversation (see
  [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)).
- Agent-bot token: not allowed.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | integer | Yes | Account ID. |
| `conversation_id` | integer | Yes | Conversation display ID. |
| `message_id` | integer | Yes | Message ID. |

**Body parameters (JSON)**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | `delivered`, `read`, `failed` or `deleted`. |

**Example request**

```bash
curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40112/status' \
  -H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "status": "read" }'
```

**Example response** (`200 OK`): the full message object. The relevant
fields:

```json
{
  "id": 40112,
  "status": "read",
  "status_history": {
    "sent": 1794470412,
    "delivered": 1794470447,
    "read": 1794470447
  }
}
```

**Error responses**: `422 {"error": "New status must be greater than current status"}`
(for example `delivered` after `read`).

## Authentication

`api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. |
| `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. |
| `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. |

## Request body

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | The new status. It must come after the current status in the order `sent` → `delivered` → `read` → `failed` → `deleted`. One of: `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. |

### Example (generated from the schema)

```json
{
  "status": "read"
}
```

## Responses

### 200 — The message, with its new status.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer | The numeric ID of the message. |
| `content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". |
| `inbox_id` | integer | The numeric ID of the inbox. |
| `conversation_id` | integer | The numeric ID of the conversation (its display ID). |
| `message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. |
| `content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. |
| `content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. |
| `private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. |
| `status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. |
| `status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. |
| `source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. |
| `echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. |
| `sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. |
| `sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. |
| `sender.name` | string | The sender's name. |
| `sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. |
| `sender.available_name` | string | An agent's display name. |
| `sender.email` | string \| null | The sender's email address. |
| `sender.phone_number` | string \| null | The sender's phone number (a contact's). |
| `sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). |
| `sender.avatar_url` | string | An agent's avatar image URL. |
| `sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. |
| `sender.thumbnail` | string | The sender's avatar URL, or an empty string. |
| `sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). |
| `sender.blocked` | boolean | Whether a contact is blocked. |
| `sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). |
| `sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). |
| `sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. |
| `sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. |
| `attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. |
| `attachments[].id` | integer | The numeric ID of the file (attachment). |
| `attachments[].message_id` | integer | The numeric ID of the message the file belongs to. |
| `attachments[].account_id` | integer | The numeric ID of the account. |
| `attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. |
| `attachments[].filename` | string | The name of the file. |
| `attachments[].extension` | string \| null | The file extension, when known. |
| `attachments[].data_url` | string | The URL of the file. |
| `attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). |
| `attachments[].file_size` | integer | The file size, in bytes. |
| `ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. |
| `delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. |
| `created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. |
| `created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. |

#### Example

```json
{
  "id": 40112,
  "content": "Your order A-1001 is ready for pickup.",
  "inbox_id": 31,
  "echo_id": "crm-msg-1001",
  "conversation_id": 1501,
  "message_type": 1,
  "content_type": "text",
  "status": "read",
  "status_history": {
    "sent": 1794470412,
    "delivered": 1794470447,
    "read": 1794470447
  },
  "content_attributes": {},
  "created_at": 1794470412,
  "private": false,
  "source_id": null,
  "sender": {
    "id": 51,
    "name": "Jane Agent",
    "available_name": "Jane Agent",
    "email": "jane.agent@example.com",
    "avatar_url": "",
    "type": "user",
    "availability_status": "online",
    "thumbnail": ""
  },
  "created_at_exact": "2026-11-12T08:00:12.417Z",
  "delay_hours": null,
  "ticket_id": 903
}
```

### 401 — The access token is missing or wrong, or its user does not belong to this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: Invalid token

The api_access_token header is missing or wrong.

```json
{
  "error": "Invalid Access Token"
}
```

#### Example: Another account

A valid token, for a user who is not in this account.

```json
{
  "error": "You are not authorized to access this account"
}
```

### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization).

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: No permission

The role lacks the permission.

```json
{
  "error": "You are not authorized to do this action"
}
```

#### Example: Agent bot

An agent-bot token on an endpoint that is not open to bots.

```json
{
  "error": "Access to this endpoint is not authorized for bots"
}
```

### 404 — The resource does not exist in this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example

```json
{
  "error": "Resource could not be found"
}
```

### 422 — The new status is not after the message's current status.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message: `New status must be greater than current status`. |

#### Example

```json
{
  "error": "New status must be greater than current status"
}
```
