Delete a chat's message content
Deletes the content of every message in one chat up to a cutoff from what Linq stores, and normally received files’ copies at the provider; it does not unsend anything, the customer’s device keeps its copies, and the provider keeps its own copy of message text.
before is the id of a message in this chat: the request covers it and
every earlier message in the chat’s sequence, and never a message after
it, including one that arrives later. An id that is not a message in this
chat answers 404 not_found.
The 202 returns the request; read its progress with
GET /v1/content_deletions/{content_deletion}, or wait for the chat’s
content_deletion.completed event, which the chat’s events read shows as
an entry carrying the completed request. Messages are removed as they
become deletable: one whose send is still being handed to the channel, or
an incoming one whose first event to you is still being delivered, waits
and resumes on its own, and the request stays blocked until then. A
received message waits until every delivery of its first event has
succeeded or failed for good, so a failing endpoint delays the request
and a hold on delivery delays it until the hold is released. Each
removed message vanishes from every read, and what is kept is as for the
one-message delete. completed means every message in range has no
content left in our database; stored files, and the channel’s copies of
files sent or received, can be removed after it, as for the one-message
delete. Linq cannot delete the channel’s own copy of message text. The chat itself, and every message
after before, stay.
A repeat with the same Idempotency-Key returns the same request in its
current state; a message already deleted is counted already_gone.
Idempotency-Key is required; reusing it for a different chat or cutoff
answers 409 idempotency_conflict.
Delete a chat's message content
curl https://whatsapp.messages.api.linqapp.com/v1/chats/$CHAT/messages \
-X DELETE \
-H "Authorization: Bearer $LINQ_WHATSAPP_API_KEY"{
"id": "id",
"before": "before",
"blocked_reasons": [
"string"
],
"chat_id": "chat_id",
"completed_at": "2019-12-27T18:11:19.117Z",
"counts": {
"already_gone": 0,
"blocked": 0,
"deleted": 0
},
"created_at": "2019-12-27T18:11:19.117Z",
"state": "state"
}Returns Examples
{
"id": "id",
"before": "before",
"blocked_reasons": [
"string"
],
"chat_id": "chat_id",
"completed_at": "2019-12-27T18:11:19.117Z",
"counts": {
"already_gone": 0,
"blocked": 0,
"deleted": 0
},
"created_at": "2019-12-27T18:11:19.117Z",
"state": "state"
}