API Reference
ConversationsPOST

Mark conversation as read

Marks a conversation as read. Pass conversation_id in the JSON body (not the path, since provider IDs may contain @ / :). For a WhatsApp message receipt, set up_to_message_id together with up_to_message_sender_id; use the matching webhook data.sender.id for a group message. Omit both message fields to mark the whole conversation read. Supplying only one returns 400 invalid_request.

https://api.unifyport.ai/v1/accounts/{account_id}/conversations/read

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Content-Type
stringrequired

Use application/json when sending a JSON request body.

Path parameters

account_id
stringrequired

Identifier used in the conversations route.

Request body

conversation_id
stringrequired

Target conversation identifier.

up_to_message_id
string

Last message to mark read; send together with up_to_message_sender_id.

up_to_message_sender_id
string

Sender of the last message; send together with up_to_message_id.

Response body

ok
boolean

Always true when the operation succeeded; failures return a non-2xx status instead.

Responses

200
200 OK

Request succeeded. See the example response body.

400
Bad Request

The request body, path, or parameters are invalid.

401
Unauthorized

The X-Api-Key header is missing or invalid.

404
Not Found

The requested provider resource could not be found.

409
Conflict

The requested operation conflicts with an existing provider account or resource.

500
Internal Server Error

The service encountered an unexpected error.

501
Not Implemented

The selected provider does not implement this operation.

502
Bad Gateway

The provider adapter or upstream provider could not complete the operation.

Request

curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/conversations/read \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "conversation_id": "peer_example",
  "up_to_message_id": "msg_example",
  "up_to_message_sender_id": "sender_example"
}'

Response

{
  "data": {
    "ok": true
  }
}