---
updatedAt: 2026-01-21T13:55:46.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Update message delivery status

The method allows you to update the delivery status of a specific message.

<Callout icon="🚧" theme="warn">
  Please be aware that you won't be able to execute this step described above directly in the API Reference section due to tool limitations: it is not possible to calculate required headers and send a request simultaneously.
</Callout>

# Headers & Authorization type

| Parameter    | Data type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :----------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Date         | string    | Date and time when the request was generated. The signature will be valid for 15 minutes from this Date. The date should be in the format “Thu, 01 Jan 2023 12:00:00 +0000” (RFC2822)                                                                                                                                                                                                                                                                                                                                                                                                    |
| Content-type | string    | Request data type. Currently, only `application/json` is supported.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Content-MD5  | string    | For the request body, it is necessary to calculate the MD5 hash and indicate it in the header in lowercase. At the same time, it is important to keep in mind that the request body is calculated as a stream of bytes without considering the end of JSON markup, and if there are `\n` or spaces at the end, they will also be taken into account. For GET requests, MD5 must also be calculated. Even if nothing is passed in the request body, MD5 will be obtained from an empty string.                                                                                            |
| X-Signature  | string    | Signature of the request as a string. It is formed from the name of the method (GET/POST) in uppercase, with the values of the headers concatenated by `\n`. Header values ​​come in a specific order. If there is no header, an empty string is specified instead. Next, add the requested path from the URL without the protocol and domain (without GET parameters) to the line. The resulting string is calculated using HMAC-SHA1, and as a secret, we use the channel secret obtained during registration. The resulting hash in lowercase is indicated in the X-Signature header. |

<Callout icon="🚧" theme="warn">
  You should write the body in your request exactly the same as written when calculating the headers.
</Callout>

## Message status codes

| Status    | When status should be used               | Enum status value                                                    |
| :-------- | :--------------------------------------- | :------------------------------------------------------------------- |
| Sent      | The message was sent from Kommo          | *No object is passed. Default value for the message delivery status* |
| Delivered | The message was delivered to destination | **1**                                                                |
| Read      | Message was read by recipient            | **2**                                                                |
| Error     | Message was not delivered                | **-1**                                                               |

## Error codes

| Error code | When should the code be sent?                                                         |
| :--------- | :------------------------------------------------------------------------------------ |
| 901        | The user has deleted the message                                                      |
| 902        | Integration disabled on channel side                                                  |
| 903        | Internal server error                                                                 |
| 904        | Unable to create a conversation (For example, the user is not registered in WhatsApp) |
| 905        | Any other error (you must send the error text)                                        |

**Data type header when the request is successful/in case of an error**

Content-Type: application/json

## Examples of request body

### Change message delivery status to Read

```json
{
    "status_code": 2
}
```

<Image align="center" border={false} width="500px" src="https://files.readme.io/e90315c-Screenshot_2024-07-22_at_16.02.57.png" />

### Change message delivery status to Error

```json
{
    "status_code": -1,
    "error_code": 905,
    "error": "An unknown error occurred"
}
```

<Image align="center" border={false} width="500px" src="https://files.readme.io/446fe83-Screenshot_2024-07-22_at_16.08.29.png" />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "chats-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://amojo.kommo.com/v2/origin/custom/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/{scope_id}/{msgid}/delivery_status": {
      "post": {
        "summary": "Update message delivery status",
        "description": "The method allows you to update the delivery status of a specific message.",
        "operationId": "update-delivery-status",
        "parameters": [
          {
            "name": "scope_id",
            "in": "path",
            "description": "ID of the connected chat channel to the account. Can be obtained in the request for connecting a chat channel (https://developers.kommo.com/reference/connect-channel)",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "msgid",
            "in": "path",
            "description": "Message ID in the Chats API",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Request data type. Currently, only application/json is supported.",
            "schema": {
              "type": "string",
              "enum": [
                "application/json"
              ]
            }
          },
          {
            "name": "Date",
            "in": "header",
            "description": "Date and time when the request was generated. The signature will be valid for 15 minutes from this Date. The date should be in the format “Thu, 01 Jan 2023 12:00:00 +0000” (RFC2822)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-MD5",
            "in": "header",
            "description": "For the request body, it is necessary to calculate the MD5 hash and indicate it in the header in lowercase. At the same time, it is important to keep in mind that the request body is calculated as a stream of bytes without considering the end of JSON markup, and if there are “\\n” or spaces at the end, they will also be taken into account. For GET requests, MD5 must also be calculated. Even if nothing is passed in the request body, MD5 will be obtained from an empty string.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Signature",
            "in": "header",
            "description": "Signature of the request as a string. It is formed from the name of the method (GET/POST) in uppercase, with the values of the headers concatenated by “\\n”. Header values ​​come in a specific order. If there is no header, an empty string is specified instead. Next, add the requested path from the URL without the protocol and domain (without GET parameters) to the line. The resulting string is calculated using HMAC-SHA1, and as a secret, we use the channel secret obtained during registration. The resulting hash in lowercase is indicated in the X-Signature header.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "object",
                    "properties": {
                      "status_code": {
                        "type": "integer",
                        "enum": [
                          1,
                          2,
                          -1
                        ],
                        "description": "Message delivery status. Available statuses are described here: https://developers.kommo.com/reference/update-delivery-status#message-status-codes"
                      },
                      "error_code": {
                        "type": "integer",
                        "enum": [
                          901,
                          902,
                          903,
                          904,
                          905
                        ],
                        "description": "Error code. Required only if `\"status_code\": -1`. Available types are described here: https://developers.kommo.com/reference/update-delivery-status#error-codes"
                      },
                      "error": {
                        "type": "string",
                        "description": "Error text that will be displayed in Kommo interface. Required only if `\"status_code\": -1` and `\"error_code\": 905`"
                      }
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "object",
                    "properties": {
                      "status_code": {
                        "type": "integer",
                        "enum": [
                          "-",
                          1,
                          2,
                          -1
                        ]
                      },
                      "error_code": {
                        "type": "string",
                        "enum": [
                          "901",
                          "902",
                          "903",
                          "904",
                          "905"
                        ]
                      },
                      "error": {
                        "type": "string",
                        "description": "An error text will be displayed to the user. Don’t send in case of status not error."
                      }
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "object",
                    "properties": {
                      "msgid": {
                        "type": "string",
                        "description": "Message ID on Kommo side. You obtain it in the step 5. Must match the msgid in the method URL."
                      },
                      "delivery_status": {
                        "type": "string",
                        "enum": [
                          "-",
                          "1",
                          "2",
                          "-1"
                        ]
                      },
                      "error_code": {
                        "type": "string",
                        "enum": [
                          "901",
                          "902",
                          "903",
                          "904",
                          "905"
                        ]
                      },
                      "error": {
                        "type": "string",
                        "description": "An error text will be displayed to the user. Don’t send in case of status not error."
                      }
                    }
                  }
                }
              }
            },
            "application/hal+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "object",
                    "properties": {
                      "msgid": {
                        "type": "string",
                        "description": "Message ID on Kommo side. You obtain it in the step 5. Must match the msgid in the method URL."
                      },
                      "delivery_status": {
                        "type": "string",
                        "enum": [
                          "-",
                          "1",
                          "2",
                          "-1"
                        ]
                      },
                      "error_code": {
                        "type": "string",
                        "enum": [
                          "901",
                          "902",
                          "903",
                          "904",
                          "905"
                        ]
                      },
                      "error": {
                        "type": "string",
                        "description": "An error text will be displayed to the user. Don’t send in case of status not error."
                      }
                    }
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "msgid": "XXXXXX-2aa3-464c-b6e4-4386d0f8f3ca",
                    "delivery_status": -1,
                    "error_code": 905,
                    "error": "An unknown error occurred"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Status updated successfully": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Incorrect data was transmitted. Details are available in the response.": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "text/plain": {
                "examples": {
                  "Request signature is incorrect": {
                    "value": ""
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "text/plain": {
                "examples": {
                  "Message does not exist": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```