Skip to content

Google: Gmail users threads schemas

3 Google schemas with complete fields and constraints.

← Gmail users threads operations · All schemas

Gets the specified thread For more information, see Manage threads (https: developers google com workspace gmail api guides threads) — response body

FieldTypePresenceDescription and constraints
$objectRootA collection of messages representing a conversation.
historyIdstringOptionalThe ID of the last history record that modified this thread.
Format: uint64
idstringOptionalThe unique ID of the thread.
messagesarrayOptionalThe list of messages in the thread.
messages[]ModelEach itemExpand Gets the specified message — response body
snippetstringOptionalA short part of the message text.

Referenced models: Gets the specified message — response body

Lists the threads in the user's mailbox For more information, see Manage threads (https: developers google com workspace gmail api guides threads) — response body

FieldTypePresenceDescription and constraints
$objectRoot
nextPageTokenstringOptionalPage token to retrieve the next page of results in the list.
resultSizeEstimateJSONOptional
resultSizeEstimate (anyOf 1)integerAlternativeEstimated total number of results.
Format: uint32
resultSizeEstimate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
threadsarrayOptionalList of threads. Note that each thread resource does not contain a list of `messages`. The list of `messages` for a given thread can be fetched using the [`threads.get`](https://developers.google.com/workspace/gmail/api/v1/reference/users/threads/get) method.
threads[]ModelEach itemExpand Gets the specified thread For more information, see Manage threads (https: developers google com workspace gmail api guides threads) — response body

Referenced models: Gets the specified thread For more information, see Manage threads (https: developers google com workspace gmail api guides threads) — response body

Modifies the labels applied to the thread This applies to all messages in the thread For more information, see Manage threads (https: developers google com workspace gmail api guides threads) — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
addLabelIdsarrayOptionalA list of IDs of labels to add to this thread. You can add up to 100 labels with each update.
addLabelIds[]stringEach item
removeLabelIdsarrayOptionalA list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update.
removeLabelIds[]stringEach item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.