Modify Threads

POST {{baseUrl}}/gmail/v1/users/:userId/threads/:id/modify

Modifies the labels applied to the thread. This applies to all messages in the thread.

Request Params

KeyDatatypeRequiredDescription
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI 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_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable 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_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").
$.xgafvstringV1 error format.

Request Body

{"addLabelIds"=>["labore anim culpa aliqua", "Duis sed irure Ut aliqua"], "removeLabelIds"=>["consectetur et dolore Lorem", "reprehenderit tempor id dolore incididunt"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"id":"nostrud deserunt","snippet":"cillum quis","historyId":"id ea ad amet venia","messages":[{"id":"exercitation sint","threadId":"Ut sed occaecat","labelIds":["in commodo","sit dolor"],"snippet":"dolor fugiat Ut","historyId":"Lorem quis ullamco veniam","internalDate":"consectetur elit dolor","payload":{"partId":"mi","mimeType":"elit","filename":"ex","headers":[{"name":"velit do voluptate","value":"in reprehenderit sit pariatur"},{"name":"enim","value":"vel"}],"body":{"attachmentId":"e","size":62147464,"data":"aliquip aute in Excepteur"},"parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"sizeEstimate":-33441686,"raw":"Ut sit"},{"id":"magna pariatur","threadId":"et","labelIds":["est dolore","Lorem Duis amet dolore"],"snippet":"dolore est reprehender","historyId":"in ex veniam nulla","internalDate":"ut","payload":{"partId":"do consectetur tempor qui in","mimeType":"Excepteur in","filename":"reprehenderit","headers":[{"name":"nulla sed ut","value":"et occaecat"},{"name":"mollit elit commodo nostrud pariatur","value":"aliqua"}],"body":{"attachmentId":"sit sunt occaecat","size":23654047,"data":"dolor ut"},"parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"sizeEstimate":2028457,"raw":"ipsum enim minim"}]}