Delete all of your messages in a conversation that match its filters
const url = 'https://api.vexarn.dev/api/messages/conversations/%40alice/delete-all';const options = { method: 'POST', headers: { cookie: '__Host-vexarn.session_token=<__Host-vexarn.session_token>', 'Content-Type': 'application/json' }, body: '{"q":"lunch","before":"2026-11-13T12:00:00.000Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vexarn.dev/api/messages/conversations/%40alice/delete-all \ --header 'Content-Type: application/json' \ --cookie __Host-vexarn.session_token=<__Host-vexarn.session_token> \ --data '{ "q": "lunch", "before": "2026-11-13T12:00:00.000Z" }'Deletes your copies of every message GET /api/messages/conversations/{peer} lists with the same q and waiting (all pages, total) that was sent or received at or before before (asOf of that read), each as deleting one by one does: received ones disappear, sent ones stay as delivery rows without the text. Ones already deleted or newer than before are left; the answer says how many were deleted. Each deleted message counts against your rate limit as one request. A peer that names nobody deletes nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Conversation.peer. A key that names nobody you have messages with gives an empty page.
Example
@aliceConversation.peer. A key that names nobody you have messages with gives an empty page.
Request Bodyrequired
Section titled “Request Bodyrequired”The filters of the conversation read (GET /api/messages/conversations/{peer}) and its asOf as before: every message of yours matching them and sent or received at or before before is deleted. No filters: the whole conversation up to before. A before later than now counts as now.
object
Example
{ "q": "lunch", "before": "2026-11-13T12:00:00.000Z"}Responses
Section titled “Responses”Deleted
object
How many were deleted; ones already deleted or not yours are skipped.
Example
{ "deleted": 2}peer is longer than 64 characters, q is empty or too long, waiting is not a boolean, before is missing or not a date-time, or the body has other fields (validation_error)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}No session
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets