v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-173225164.2 KB
users

Moves the specified message to the trash.

post/users/{userId}/messages/{id}/trash

Path parameters

userIdstring required

The user's email address. The special value me can be used to indicate the authenticated user

idstring required

The ID of the message to Trash

Query parameters

$.xgafv'1' | '2'

V1 error format

V1 error format

access_tokenstring

OAuth access token

alt'json' | 'media' | 'proto'

Data format for response

Data format for response

callbackstring

JSONP

fieldsstring

Selector specifying which fields to include in a partial response

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token

oauth_tokenstring

OAuth 2.0 token for the current user

prettyPrintboolean

Returns response with indentations and line breaks

quotaUserstring

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters

upload_protocolstring

Upload protocol for media (e.g. "raw", "multipart")

uploadTypestring

Legacy upload protocol for media (e.g. "media", "multipart")

Response

Successful response

snippetstring

A short part of the message text

threadIdstring

The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested threadId must be specified on the Message or Draft.Message you supply with your request. 2. The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard. 3. The Subject headers must match.

labelIdsstring[]

List of IDs of labels applied to this message

historyIdstring uint64

The ID of the last history record that modified this message

rawstring byte

The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied

idstring

The immutable ID of the message

sizeEstimateinteger

Estimated size in bytes of the message

internalDatestring int64

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header