Skip to main content
PUT

Recipes

1

1. Specify if you want to mark messages as delivered

Set a delivered parameter to 1 to mark all messages as delivered.
2

2. Set the ID of the dialog

Set a chat_dialog_id to refer to a specific dialog.
3

3. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as delivered.

1

1. Type an updated message

Enter an updated message text using the message parameter.
2

2. Set the ID of the dialog

Set a chat_dialog_id to refer to a specific dialog.
3

3. Set the ID of the message

Set the ID of the message to refer to a particular message.
4

4. As a result, the API returns '200 OK' status code which implies that the message was successfully updated.

1

1. Specify if you want to mark messages as read.

Set a read parameter to 1 to mark all messages as read.
2

2. Set the ID of the dialog.

Set the chat_dialog_id to refer to a specific dialog.
3

3. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as read.

1

1. Use 'Authorization' header to pass API key

2

2. Use 'On-Behalf-Of' header to pass user id

To execute a request on behalf of a specific user
3

3. Specify if you want to mark messages as delivered

Set a delivered parameter to 1 to mark all messages as delivered.
4

4. Set the ID of the dialog

Set a chat_dialog_id to refer to a specific dialog.
5

5. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as delivered.

1

1. Use 'Authorization' header to pass API key

2

2. Use 'On-Behalf-Of' header to pass user id

To execute a request on behalf of a specific user
3

3. Type an updated message

Enter an updated message text using the message parameter.
4

4. Set the ID of the dialog

Set a chat_dialog_id to refer to a specific dialog.
5

5. Set the ID of the message

Set the ID of the message to refer to a particular message.
6

6. As a result, the API returns '200 OK' status code which implies that the message was successfully updated.

1

1. Use 'Authorization' header to pass API key

2

2. Use 'On-Behalf-Of' header to pass user id

To execute a request on behalf of a specific user.
3

3. Specify if you want to mark messages as read

Set a read parameter to 1 to mark all messages as read.
4

4. Set the ID of the dialog.

Set the chat_dialog_id to refer to a specific dialog.
5

5. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as read.

1

1. Specify if you want to mark messages as read.

Set a read parameter to 1 to mark all messages as read.
2

2. Set the ID of the dialog.

Set the chat_dialog_id to refer to a specific dialog.
3

3. Don't set any message ID to the path

To mark all messages of specified dialog as read keep the path without message ID
4

4. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as read.

1

1. Specify if you want to mark messages as delivered

Set a delivered parameter to 1 to mark all messages as delivered.
2

2. Set the ID of the dialog

Set a chat_dialog_id to refer to a specific dialog.
3

3. Don't set any message ID to the path

To mark all messages of specified dialog as delivered keep the path without message ID
4

4. As a result, the API retuns a '200 OK' status code which implies that all messages of the specified dialog were marked as delivered.

Path Parameters

string
ID of the message. Generated automatically by the server after message creation.

Body Parameters

integer
Update a message status to read. Set read=1 to perform. As a result, the user ID is added to the array of read_ids field. See the Messages model for more details.
integer
Update a message status to delivered. Set delivered=1 to perform. As a result, the user ID is added to the array of delivered_ids field. See the Messages model for more details.
string
Update message’s text.
string
required
ID of the dialog containing a message for update.

Headers

string
required
A user or application session token. See Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
string
default:"ApiKey {your_api_key}"
API key from Dashboard. Expected format: ApiKey {your_api_key}. Must be used either QB-Token or Authorization.
string
User ID. The user ID of the user on whose behalf the request is being made.

Responses

A successful response
An error response
array of strings
An error response
array of strings