Skip to content

Delete a thread (every message; move to Trash or expunge)

DELETE
/v1/inboxes/{inbox_id}/threads/{id}

Remove every message in the thread (across all folders), moving them to the Trash folder (recoverable). Pass ?expunge=true to permanently remove them. Requires mailbox:read plus mailbox:create (or mailbox:delete).

inbox_id
required
string

Opaque inbox id (the canonical path key). The inbox’s email address is also accepted here as a within-project alias. Treat the id as opaque.

id
required
string

Thread id.

expunge
boolean

Permanently remove instead of moving to Trash.

Delete outcome (count = messages removed).

Outcome of a message or thread delete.

object
id
required

The message id or thread id that was deleted.

string
deleted
required

Always true on success.

boolean
expunged
required

True when the message(s) were permanently removed; false when moved to Trash (a recoverable soft delete).

boolean
count
required

Number of messages affected (1 for a message; the thread size for a thread).

integer

Invalid request.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Missing or invalid credential.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Authenticated but lacking the required scope, or out of quota.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Resource not found.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope