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ヘッダー
X-Api-Keyワークスペース API キー。このヘッダーからワークスペースを特定します。
Content-TypeJSON のリクエストボディを送る場合は application/json を使用します。
パスパラメータ
account_idconversations ルートで使用される識別子。
リクエストボディ
conversation_id対象の会話識別子。
up_to_message_id既読にする最後のメッセージ。up_to_message_sender_id と一緒に送信します。
up_to_message_sender_id最後のメッセージの送信者。up_to_message_id と一緒に送信します。
レスポンスボディ
ok操作が成功したときは常に true。失敗時は代わりに 2xx 以外のステータスが返ります。
レスポンス
200リクエスト成功。レスポンスボディの例を参照してください。
400リクエストボディ、パス、またはパラメータが不正です。
401X-Api-Key ヘッダが欠落しているか無効です。
404要求されたプロバイダリソースが見つかりません。
409要求された操作が、既存のプロバイダアカウントまたはリソースと競合しています。
500サービスで予期しないエラーが発生しました。
501選択したプロバイダはこの操作を実装していません。
502プロバイダアダプタまたは上流サービスが操作を完了できませんでした。
リクエスト
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"
}'レスポンス
{
"data": {
"ok": true
}
}