# Update message

## Update

<mark style="color:green;">`POST`</mark> `https://{{account_id}}.acquire.io/api/v1/crm/messenger/chat/message/{{messageId}}`

Use this endpoint to modify a message in a Conversation. The **messageId** needs to be passed as a path parameter in the endpoint URL.\
\
**messageId** - the message ID. Use a webhook or GET request to find the message ID. If doing a GET request to Single Case, the message Id will be found in the object "messageSeen": { "1": 4334 } where 4334 corresponds to the messageId.&#x20;

#### Path Parameters

| Name                                 | Type    | Description      |
| ------------------------------------ | ------- | ---------------- |
| id<mark style="color:red;">\*</mark> | integer | The message's ID |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer {{API\_KEY}} |

#### Request Body

| Name                                      | Type   | Description                                                |
| ----------------------------------------- | ------ | ---------------------------------------------------------- |
| translateLangKey                          | string | Within the message object. ISO language code               |
| message<mark style="color:red;">\*</mark> | string | Within the message object. The message you intend to send. |
| type<mark style="color:red;">\*</mark>    | string | Within the message object. "message"                       |
| message<mark style="color:red;">\*</mark> | object | The message object                                         |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "id": 8288,
    "channel": "chat",
    "senderId": 1,
    "senderType": "user",
    "type": "message",
    "message": "updating the sent message",
    "dateCreated": "2021-03-30T16:04:11.000Z",
    "dateUpdated": "2021-03-30T16:10:54.000Z",
    "seen": "no",
    "meta": {},
    "case": {
      "dateCreated": "2021-03-30T16:04:10.000Z",
      "dateUpdated": "2021-03-30T16:05:46.000Z",
      "id": 2069,
      "contactId": 597759,
      "closedBy": null,
      "visitId": 1379,
      "title": "#597759 has just started a chat",
      "description": "Hey added from the api",
      "channel": "chat",
      "status": "active",
      "closingState": "handled",
      "dateQueue": "2021-03-30T16:04:10.000Z",
      "datePending": "2021-03-30T16:04:10.000Z",
      "dateActive": "2021-03-30T16:04:10.000Z",
      "dateClosed": null,
      "queueId": null,
      "queueOrder": null,
      "meta": {},
      "parentId": 1875,
      "userId": null,
      "waitTime": 0,
      "threadId": 1875
    },
    "sender": {
      "roles": [],
      "id": 1,
      "name": "David Guetta",
      "firstName": "David Guetta",
      "lastName": "",
      "photo": "",
      "email": "user@example.com",
      "clientId": "",
      "parentId": 0,
      "type": "user",
      "accessLevel": null
    },
    "caseId": 2069,
    "threadId": 1875
  }
}
```

{% endtab %}
{% endtabs %}

## Body(raw)

```
{
  "channel": "chat",
  "message": {
    "type": "message",
    "message": "Hey added from the api",
    "translateLangKey": "en"
  },
  "caseId": 9
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.acquire.io/rest-apis/conversation/conversation-or-cases/messages-1/update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
