Skip to content

Delete all of your messages in a conversation that match its filters

POST
/api/messages/conversations/{peer}/delete-all
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.

peer
required

Conversation.peer. A key that names nobody you have messages with gives an empty page.

string
<= 64 characters

Example

@alice

Conversation.peer. A key that names nobody you have messages with gives an empty page.

Media typeapplication/json

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
q
string
>= 1 characters <= 200 characters
waiting
boolean
before
required
string format: date-time

Example

{
"q": "lunch",
"before": "2026-11-13T12:00:00.000Z"
}

Deleted

Media typeapplication/json
object
deleted
required

How many were deleted; ones already deleted or not yours are skipped.

integer

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)

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

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.

integer

Example

{
"error": {
"code": "validation_error"
}
}

No session

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

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.

integer

Example

{
"error": {
"code": "validation_error"
}
}

Too many requests from this user or client address

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

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.

integer

Example

{
"error": {
"code": "validation_error"
}
}
Retry-After
integer
>= 1

Seconds until the rate limit window resets