Skip to content

Delete all inbound messages matching filters

POST
/v1/inbound-messages/delete-all

Soft-delete inbound messages matching the specified filters. Processes in chunks for reliability. Returns the count and IDs of deleted messages. On error, the response includes an error object: DELETE_FAILED if no rows were deleted, or PARTIAL_DELETE_FAILURE if some rows were committed before the error. Maximum 1000 messages per request.

status
string

Comma-separated list of statuses to match.

inbound_endpoint_id
string format: uuid

Restrict to messages for this inbound endpoint.

received_after
string format: date-time

Only delete messages received at or after this time (RFC 3339).

received_before
string format: date-time

Only delete messages received before this time (RFC 3339).

limit
integer
default: 1000 >= 1 <= 1000

Maximum messages to delete (1–1000, default 1000).

Delete-all results

object
data
object
deleted
required

Number of messages deleted

integer
deleted_message_ids
required

IDs of deleted messages

Array<string>
error

Present only on partial failure

object
code
string
Allowed values: DELETE_FAILED PARTIAL_DELETE_FAILURE
message
string
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Example
{
"data": {
"deleted": 42,
"deleted_message_ids": [
"01935abc-def0-7123-4567-890abcdef012"
]
},
"meta": {
"request_id": "req_xyz123"
}
}

Invalid request

object
error
object
code

Machine-readable error code

string
Example
INVALID_REQUEST
message

Human-readable error message

string
Example
endpoint must be a valid HTTPS URL
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Examples

Endpoint not found

{
"error": {
"code": "ENDPOINT_NOT_FOUND",
"message": "endpoint not found"
},
"meta": {
"request_id": "req_xyz123"
}
}

Unauthorized - Invalid or missing API key

object
error
object
code

Machine-readable error code

string
Example
INVALID_REQUEST
message

Human-readable error message

string
Example
endpoint must be a valid HTTPS URL
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Example
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
},
"meta": {
"request_id": "req_xyz123"
}
}

Internal server error

object
error
object
code

Machine-readable error code

string
Example
INVALID_REQUEST
message

Human-readable error message

string
Example
endpoint must be a valid HTTPS URL
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Example
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred"
},
"meta": {
"request_id": "req_xyz123"
}
}
Personalize Examples

Enter your credentials to populate code examples throughout the docs.