REST API
- Overview
- Limits
- Errors
- GETGet Account Settings
- Authentication
- Users
- Chat
- Overview
- Dialog Model
- POSTCreate Dialog
- GETList Dialogs
- GETGet Dialog by ID
- PUTUpdate Dialog
- DELDelete Dialog
- GETGet Notification Settings
- PUTUpdate Notification Settings
- Message Model
- POSTCreate Message
- GETList Messages
- GETGet Message by ID
- PUTUpdate Message
- PATCHMark All Messages as Delivered
- PATCHMark All Messages as Read
- DELDelete Message
- GETGet Unread Messages Count
- Content
- Push Notifications
- Custom Objects
- Address Book
- AI
Update Message
Update a dialog message.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
Empty body
Recipes
1. Specify if you want to mark messages as delivered
Set a delivered
parameter to 1
to mark all messages as delivered.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Set the ID of the dialog
Set a chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Type an updated message
Enter an updated message text using the message
parameter.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Set the ID of the dialog
Set a chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
3. Set the ID of the message
Set the ID of the message to refer to a particular message.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
4. As a result, the API returns '200 OK' status code which implies that the message was successfully updated.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Specify if you want to mark messages as read.
Set a read
parameter to 1
to mark all messages as read.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Set the ID of the dialog.
Set the chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Use 'Authorization' header to pass API key
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Use 'On-Behalf-Of' header to pass user id
To execute a request on behalf of a specific user
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
3. Specify if you want to mark messages as delivered
Set a delivered
parameter to 1
to mark all messages as delivered.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
4. Set the ID of the dialog
Set a chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Use 'Authorization' header to pass API key
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Use 'On-Behalf-Of' header to pass user id
To execute a request on behalf of a specific user
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
3. Type an updated message
Enter an updated message text using the message
parameter.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
4. Set the ID of the dialog
Set a chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
5. Set the ID of the message
Set the ID of the message to refer to a particular message.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
6. As a result, the API returns '200 OK' status code which implies that the message was successfully updated.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"message":"updated message",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Use 'Authorization' header to pass API key
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
2. Use 'On-Behalf-Of' header to pass user id
To execute a request on behalf of a specific user.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
3. Specify if you want to mark messages as read
Set a read
parameter to 1
to mark all messages as read.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
4. Set the ID of the dialog.
Set the chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
1. Specify if you want to mark messages as read.
Set a read
parameter to 1
to mark all messages as read.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
2. Set the ID of the dialog.
Set the chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
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
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
1. Specify if you want to mark messages as delivered
Set a delivered
parameter to 1
to mark all messages as delivered.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
2. Set the ID of the dialog
Set a chat_dialog_id
to refer to a specific dialog.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
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
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
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.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"delivered":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message.json
Path Parameters
Body Parameters
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. 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. Headers
ApiKey {your_api_key}
. Must be used either QB-Token or Authorization.Responses
A successful response
An error response
An error response
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
Empty body
Was this page helpful?
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"read":"1",
"chat_dialog_id":"53a99a7be4b094c7c6d31b41"
}' \
https://api.quickblox.com/chat/Message/53aabe15e4b077ddd43e7fd3.json
Empty body