blob: 4d7c13afa037604c9a584e56fb7d27e9e351ffff [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://mail.google.com/": {
"description": "Read, compose, send, and permanently delete all your email from Gmail"
},
"https://www.googleapis.com/auth/gmail.addons.current.action.compose": {
"description": "Manage drafts and send emails when you interact with the add-on"
},
"https://www.googleapis.com/auth/gmail.addons.current.message.action": {
"description": "View your email messages when you interact with the add-on"
},
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata": {
"description": "View your email message metadata when the add-on is running"
},
"https://www.googleapis.com/auth/gmail.addons.current.message.readonly": {
"description": "View your email messages when the add-on is running"
},
"https://www.googleapis.com/auth/gmail.compose": {
"description": "Manage drafts and send emails"
},
"https://www.googleapis.com/auth/gmail.insert": {
"description": "Insert mail into your mailbox"
},
"https://www.googleapis.com/auth/gmail.labels": {
"description": "Manage mailbox labels"
},
"https://www.googleapis.com/auth/gmail.metadata": {
"description": "View your email message metadata such as labels and headers, but not the email body"
},
"https://www.googleapis.com/auth/gmail.modify": {
"description": "View and modify but not delete your email"
},
"https://www.googleapis.com/auth/gmail.readonly": {
"description": "View your email messages and settings"
},
"https://www.googleapis.com/auth/gmail.send": {
"description": "Send email on your behalf"
},
"https://www.googleapis.com/auth/gmail.settings.basic": {
"description": "Manage your basic mail settings"
},
"https://www.googleapis.com/auth/gmail.settings.sharing": {
"description": "Manage your sensitive mail settings, including who can manage your mail"
}
}
}
},
"basePath": "",
"baseUrl": "https://www.googleapis.com/",
"batchPath": "batch/gmail/v1",
"canonicalName": "Gmail",
"description": "The Gmail API lets you view and manage Gmail mailbox data like\n threads, messages, and labels.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/gmail/api/",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "gmail:v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://www.mtls.googleapis.com/",
"name": "gmail",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "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.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "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.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"users": {
"methods": {
"getProfile": {
"description": "Gets the current user's Gmail profile.",
"flatPath": "gmail/v1/users/{userId}/profile",
"httpMethod": "GET",
"id": "gmail.users.getProfile",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/profile",
"response": {
"$ref": "Profile"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"stop": {
"description": "Stop receiving push notifications for the given user mailbox.",
"flatPath": "gmail/v1/users/{userId}/stop",
"httpMethod": "POST",
"id": "gmail.users.stop",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/stop",
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"watch": {
"description": "Set up or update a push notification watch on the given user mailbox.",
"flatPath": "gmail/v1/users/{userId}/watch",
"httpMethod": "POST",
"id": "gmail.users.watch",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/watch",
"request": {
"$ref": "WatchRequest"
},
"response": {
"$ref": "WatchResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
}
},
"resources": {
"drafts": {
"methods": {
"create": {
"description": "Creates a new draft with the \u003ccode\u003eDRAFT\u003c/code\u003e label.",
"flatPath": "gmail/v1/users/{userId}/drafts",
"httpMethod": "POST",
"id": "gmail.users.drafts.create",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "36700160",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/drafts"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/drafts"
}
}
},
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts",
"request": {
"$ref": "Draft"
},
"response": {
"$ref": "Draft"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify"
],
"supportsMediaUpload": true
},
"delete": {
"description": "Immediately and permanently deletes the specified draft.\nDoes not simply trash it.",
"flatPath": "gmail/v1/users/{userId}/drafts/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.drafts.delete",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the draft to delete.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts/{id}",
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"get": {
"description": "Gets the specified draft.",
"flatPath": "gmail/v1/users/{userId}/drafts/{id}",
"httpMethod": "GET",
"id": "gmail.users.drafts.get",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"format": {
"default": "full",
"description": "The format to return the draft in.",
"enum": [
"minimal",
"full",
"raw",
"metadata"
],
"location": "query",
"type": "string"
},
"id": {
"description": "The ID of the draft to retrieve.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts/{id}",
"response": {
"$ref": "Draft"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"list": {
"description": "Lists the drafts in the user's mailbox.",
"flatPath": "gmail/v1/users/{userId}/drafts",
"httpMethod": "GET",
"id": "gmail.users.drafts.list",
"parameterOrder": [
"userId"
],
"parameters": {
"includeSpamTrash": {
"default": "false",
"description": "Include drafts from \u003ccode\u003eSPAM\u003c/code\u003e and \u003ccode\u003eTRASH\u003c/code\u003e\nin the results.",
"location": "query",
"type": "boolean"
},
"maxResults": {
"default": "100",
"description": "Maximum number of drafts to return.",
"format": "uint32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token to retrieve a specific page of results in the list.",
"location": "query",
"type": "string"
},
"q": {
"description": "Only return draft messages matching the specified query. Supports the same\nquery format as the Gmail search box. For example,\n\u003ccode\u003e\"from:someuser@example.com rfc822msgid:\u003csomemsgid@example.com\u003e\nis:unread\"\u003c/code\u003e.",
"location": "query",
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts",
"response": {
"$ref": "ListDraftsResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"send": {
"description": "Sends the specified, existing draft to the recipients in the\n\u003ccode\u003eTo\u003c/code\u003e, \u003ccode\u003eCc\u003c/code\u003e, and \u003ccode\u003eBcc\u003c/code\u003e headers.",
"flatPath": "gmail/v1/users/{userId}/drafts/send",
"httpMethod": "POST",
"id": "gmail.users.drafts.send",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "36700160",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/drafts/send"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/drafts/send"
}
}
},
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts/send",
"request": {
"$ref": "Draft"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify"
],
"supportsMediaUpload": true
},
"update": {
"description": "Replaces a draft's content.",
"flatPath": "gmail/v1/users/{userId}/drafts/{id}",
"httpMethod": "PUT",
"id": "gmail.users.drafts.update",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "36700160",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/drafts/{id}"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/drafts/{id}"
}
}
},
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the draft to update.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/drafts/{id}",
"request": {
"$ref": "Draft"
},
"response": {
"$ref": "Draft"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify"
],
"supportsMediaUpload": true
}
}
},
"history": {
"methods": {
"list": {
"description": "Lists the history of all changes to the given mailbox. History results are\nreturned in chronological order (increasing \u003ccode\u003ehistoryId\u003c/code\u003e).",
"flatPath": "gmail/v1/users/{userId}/history",
"httpMethod": "GET",
"id": "gmail.users.history.list",
"parameterOrder": [
"userId"
],
"parameters": {
"historyTypes": {
"description": "History types to be returned by the function",
"enum": [
"messageAdded",
"messageDeleted",
"labelAdded",
"labelRemoved"
],
"location": "query",
"repeated": true,
"type": "string"
},
"labelId": {
"description": "Only return messages with a label matching the ID.",
"location": "query",
"type": "string"
},
"maxResults": {
"default": "100",
"description": "The maximum number of history records to return.",
"format": "uint32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token to retrieve a specific page of results in the list.",
"location": "query",
"type": "string"
},
"startHistoryId": {
"description": "Required. Returns history records after the specified\n\u003ccode\u003estartHistoryId\u003c/code\u003e. The supplied \u003ccode\u003estartHistoryId\u003c/code\u003e\nshould be obtained from the \u003ccode\u003ehistoryId\u003c/code\u003e of a message, thread, or\nprevious \u003ccode\u003elist\u003c/code\u003e response. History IDs increase\nchronologically but are not contiguous with random gaps in between valid\nIDs. Supplying an invalid or out of date \u003ccode\u003estartHistoryId\u003c/code\u003e\ntypically returns an \u003ccode\u003eHTTP 404\u003c/code\u003e error code. A\n\u003ccode\u003ehistoryId\u003c/code\u003e is typically valid for at least a week, but in some\nrare circumstances may be valid for only a few hours. If you receive an\n\u003ccode\u003eHTTP 404\u003c/code\u003e error response, your application should perform a\nfull sync. If you receive no \u003ccode\u003enextPageToken\u003c/code\u003e in the response,\nthere are no updates to retrieve and you can store the returned\n\u003ccode\u003ehistoryId\u003c/code\u003e for a future request.",
"format": "uint64",
"location": "query",
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/history",
"response": {
"$ref": "ListHistoryResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
}
}
},
"labels": {
"methods": {
"create": {
"description": "Creates a new label.",
"flatPath": "gmail/v1/users/{userId}/labels",
"httpMethod": "POST",
"id": "gmail.users.labels.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels",
"request": {
"$ref": "Label"
},
"response": {
"$ref": "Label"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"delete": {
"description": "Immediately and permanently deletes the specified label and removes it from\nany messages and threads that it is applied to.",
"flatPath": "gmail/v1/users/{userId}/labels/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.labels.delete",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the label to delete.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels/{id}",
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"get": {
"description": "Gets the specified label.",
"flatPath": "gmail/v1/users/{userId}/labels/{id}",
"httpMethod": "GET",
"id": "gmail.users.labels.get",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the label to retrieve.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels/{id}",
"response": {
"$ref": "Label"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"list": {
"description": "Lists all labels in the user's mailbox.",
"flatPath": "gmail/v1/users/{userId}/labels",
"httpMethod": "GET",
"id": "gmail.users.labels.list",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels",
"response": {
"$ref": "ListLabelsResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"patch": {
"description": "Patch the specified label.",
"flatPath": "gmail/v1/users/{userId}/labels/{id}",
"httpMethod": "PATCH",
"id": "gmail.users.labels.patch",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the label to update.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels/{id}",
"request": {
"$ref": "Label"
},
"response": {
"$ref": "Label"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"update": {
"description": "Updates the specified label.",
"flatPath": "gmail/v1/users/{userId}/labels/{id}",
"httpMethod": "PUT",
"id": "gmail.users.labels.update",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the label to update.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/labels/{id}",
"request": {
"$ref": "Label"
},
"response": {
"$ref": "Label"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify"
]
}
}
},
"messages": {
"methods": {
"batchDelete": {
"description": "Deletes many messages by message ID. Provides no guarantees that messages\nwere not already deleted or even existed at all.",
"flatPath": "gmail/v1/users/{userId}/messages/batchDelete",
"httpMethod": "POST",
"id": "gmail.users.messages.batchDelete",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/batchDelete",
"request": {
"$ref": "BatchDeleteMessagesRequest"
},
"scopes": [
"https://mail.google.com/"
]
},
"batchModify": {
"description": "Modifies the labels on the specified messages.",
"flatPath": "gmail/v1/users/{userId}/messages/batchModify",
"httpMethod": "POST",
"id": "gmail.users.messages.batchModify",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/batchModify",
"request": {
"$ref": "BatchModifyMessagesRequest"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"delete": {
"description": "Immediately and permanently deletes the specified message. This operation\ncannot be undone. Prefer \u003ccode\u003emessages.trash\u003c/code\u003e instead.",
"flatPath": "gmail/v1/users/{userId}/messages/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.messages.delete",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the message to delete.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{id}",
"scopes": [
"https://mail.google.com/"
]
},
"get": {
"description": "Gets the specified message.",
"flatPath": "gmail/v1/users/{userId}/messages/{id}",
"httpMethod": "GET",
"id": "gmail.users.messages.get",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"format": {
"default": "full",
"description": "The format to return the message in.",
"enum": [
"minimal",
"full",
"raw",
"metadata"
],
"location": "query",
"type": "string"
},
"id": {
"description": "The ID of the message to retrieve.",
"location": "path",
"required": true,
"type": "string"
},
"metadataHeaders": {
"description": "When given and format is METADATA, only include headers specified.",
"location": "query",
"repeated": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{id}",
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.message.action",
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata",
"https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"import": {
"description": "Imports a message into only this user's mailbox, with standard\nemail delivery scanning and classification similar to receiving via SMTP.\nDoes not send a message.",
"flatPath": "gmail/v1/users/{userId}/messages/import",
"httpMethod": "POST",
"id": "gmail.users.messages.import",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "52428800",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/messages/import"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/messages/import"
}
}
},
"parameterOrder": [
"userId"
],
"parameters": {
"deleted": {
"default": "false",
"description": "Mark the email as permanently deleted (not TRASH) and\nonly visible in\n\u003ca href=\"http://support.google.com/vault/\"\u003eGoogle Vault\u003c/a\u003e to\na Vault administrator. Only used for G Suite accounts.",
"location": "query",
"type": "boolean"
},
"internalDateSource": {
"default": "dateHeader",
"description": "Source for Gmail's internal date of the message.",
"enum": [
"receivedTime",
"dateHeader"
],
"location": "query",
"type": "string"
},
"neverMarkSpam": {
"default": "false",
"description": "Ignore the Gmail spam classifier decision and never mark\nthis email as SPAM in the mailbox.",
"location": "query",
"type": "boolean"
},
"processForCalendar": {
"default": "false",
"description": "Process calendar invites in the email and add any extracted\nmeetings to the Google Calendar for this user.",
"location": "query",
"type": "boolean"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/import",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.insert",
"https://www.googleapis.com/auth/gmail.modify"
],
"supportsMediaUpload": true
},
"insert": {
"description": "Directly inserts a message into only this user's mailbox similar to\n\u003ccode\u003eIMAP APPEND\u003c/code\u003e, bypassing most scanning and classification.\nDoes not send a message.",
"flatPath": "gmail/v1/users/{userId}/messages",
"httpMethod": "POST",
"id": "gmail.users.messages.insert",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "52428800",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/messages"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/messages"
}
}
},
"parameterOrder": [
"userId"
],
"parameters": {
"deleted": {
"default": "false",
"description": "Mark the email as permanently deleted (not TRASH) and\nonly visible in\n\u003ca href=\"http://support.google.com/vault/\"\u003eGoogle Vault\u003c/a\u003e to\na Vault administrator. Only used for G Suite accounts.",
"location": "query",
"type": "boolean"
},
"internalDateSource": {
"default": "receivedTime",
"description": "Source for Gmail's internal date of the message.",
"enum": [
"receivedTime",
"dateHeader"
],
"location": "query",
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.insert",
"https://www.googleapis.com/auth/gmail.modify"
],
"supportsMediaUpload": true
},
"list": {
"description": "Lists the messages in the user's mailbox.",
"flatPath": "gmail/v1/users/{userId}/messages",
"httpMethod": "GET",
"id": "gmail.users.messages.list",
"parameterOrder": [
"userId"
],
"parameters": {
"includeSpamTrash": {
"default": "false",
"description": "Include messages from \u003ccode\u003eSPAM\u003c/code\u003e and \u003ccode\u003eTRASH\u003c/code\u003e\nin the results.",
"location": "query",
"type": "boolean"
},
"labelIds": {
"description": "Only return messages with labels that match all of the specified label IDs.",
"location": "query",
"repeated": true,
"type": "string"
},
"maxResults": {
"default": "100",
"description": "Maximum number of messages to return.",
"format": "uint32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token to retrieve a specific page of results in the list.",
"location": "query",
"type": "string"
},
"q": {
"description": "Only return messages matching the specified query. Supports the same\nquery format as the Gmail search box. For example,\n\u003ccode\u003e\"from:someuser@example.com rfc822msgid:\u0026lt;somemsgid@example.com\u0026gt;\nis:unread\"\u003c/code\u003e. Parameter cannot be used when accessing the api\nusing the gmail.metadata scope.",
"location": "query",
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages",
"response": {
"$ref": "ListMessagesResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"modify": {
"description": "Modifies the labels on the specified message.",
"flatPath": "gmail/v1/users/{userId}/messages/{id}/modify",
"httpMethod": "POST",
"id": "gmail.users.messages.modify",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the message to modify.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{id}/modify",
"request": {
"$ref": "ModifyMessageRequest"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"send": {
"description": "Sends the specified message to the recipients in the\n\u003ccode\u003eTo\u003c/code\u003e, \u003ccode\u003eCc\u003c/code\u003e, and \u003ccode\u003eBcc\u003c/code\u003e headers.",
"flatPath": "gmail/v1/users/{userId}/messages/send",
"httpMethod": "POST",
"id": "gmail.users.messages.send",
"mediaUpload": {
"accept": [
"message/*"
],
"maxSize": "36700160",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/gmail/v1/users/{userId}/messages/send"
},
"simple": {
"multipart": true,
"path": "/upload/gmail/v1/users/{userId}/messages/send"
}
}
},
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/send",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.send"
],
"supportsMediaUpload": true
},
"trash": {
"description": "Moves the specified message to the trash.",
"flatPath": "gmail/v1/users/{userId}/messages/{id}/trash",
"httpMethod": "POST",
"id": "gmail.users.messages.trash",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the message to Trash.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{id}/trash",
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"untrash": {
"description": "Removes the specified message from the trash.",
"flatPath": "gmail/v1/users/{userId}/messages/{id}/untrash",
"httpMethod": "POST",
"id": "gmail.users.messages.untrash",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the message to remove from Trash.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{id}/untrash",
"response": {
"$ref": "Message"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
}
},
"resources": {
"attachments": {
"methods": {
"get": {
"description": "Gets the specified message attachment.",
"flatPath": "gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}",
"httpMethod": "GET",
"id": "gmail.users.messages.attachments.get",
"parameterOrder": [
"userId",
"messageId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the attachment.",
"location": "path",
"required": true,
"type": "string"
},
"messageId": {
"description": "The ID of the message containing the attachment.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}",
"response": {
"$ref": "MessagePartBody"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.message.action",
"https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
}
}
}
}
},
"settings": {
"methods": {
"getAutoForwarding": {
"description": "Gets the auto-forwarding setting for the specified account.",
"flatPath": "gmail/v1/users/{userId}/settings/autoForwarding",
"httpMethod": "GET",
"id": "gmail.users.settings.getAutoForwarding",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/autoForwarding",
"response": {
"$ref": "AutoForwarding"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"getImap": {
"description": "Gets IMAP settings.",
"flatPath": "gmail/v1/users/{userId}/settings/imap",
"httpMethod": "GET",
"id": "gmail.users.settings.getImap",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/imap",
"response": {
"$ref": "ImapSettings"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"getLanguage": {
"description": "Gets language settings.",
"flatPath": "gmail/v1/users/{userId}/settings/language",
"httpMethod": "GET",
"id": "gmail.users.settings.getLanguage",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/language",
"response": {
"$ref": "LanguageSettings"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"getPop": {
"description": "Gets POP settings.",
"flatPath": "gmail/v1/users/{userId}/settings/pop",
"httpMethod": "GET",
"id": "gmail.users.settings.getPop",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/pop",
"response": {
"$ref": "PopSettings"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"getVacation": {
"description": "Gets vacation responder settings.",
"flatPath": "gmail/v1/users/{userId}/settings/vacation",
"httpMethod": "GET",
"id": "gmail.users.settings.getVacation",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/vacation",
"response": {
"$ref": "VacationSettings"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"updateAutoForwarding": {
"description": "Updates the auto-forwarding setting for the specified account. A verified\nforwarding address must be specified when auto-forwarding is enabled.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/autoForwarding",
"httpMethod": "PUT",
"id": "gmail.users.settings.updateAutoForwarding",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/autoForwarding",
"request": {
"$ref": "AutoForwarding"
},
"response": {
"$ref": "AutoForwarding"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"updateImap": {
"description": "Updates IMAP settings.",
"flatPath": "gmail/v1/users/{userId}/settings/imap",
"httpMethod": "PUT",
"id": "gmail.users.settings.updateImap",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/imap",
"request": {
"$ref": "ImapSettings"
},
"response": {
"$ref": "ImapSettings"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"updateLanguage": {
"description": "Updates language settings.\n\nIf successful, the return object contains the \u003ccode\u003edisplayLanguage\u003c/code\u003e\nthat was saved for the user, which may differ from the value passed into\nthe request. This is because the requested \u003ccode\u003edisplayLanguage\u003c/code\u003e may\nnot be directly supported by Gmail but have a close variant that is, and so\nthe variant may be chosen and saved instead.",
"flatPath": "gmail/v1/users/{userId}/settings/language",
"httpMethod": "PUT",
"id": "gmail.users.settings.updateLanguage",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/language",
"request": {
"$ref": "LanguageSettings"
},
"response": {
"$ref": "LanguageSettings"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"updatePop": {
"description": "Updates POP settings.",
"flatPath": "gmail/v1/users/{userId}/settings/pop",
"httpMethod": "PUT",
"id": "gmail.users.settings.updatePop",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/pop",
"request": {
"$ref": "PopSettings"
},
"response": {
"$ref": "PopSettings"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"updateVacation": {
"description": "Updates vacation responder settings.",
"flatPath": "gmail/v1/users/{userId}/settings/vacation",
"httpMethod": "PUT",
"id": "gmail.users.settings.updateVacation",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/vacation",
"request": {
"$ref": "VacationSettings"
},
"response": {
"$ref": "VacationSettings"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
}
},
"resources": {
"delegates": {
"methods": {
"create": {
"description": "Adds a delegate with its verification status set directly to\n\u003ccode\u003eaccepted\u003c/code\u003e, without sending any verification email. The\ndelegate user must be a member of the same G Suite organization as the\ndelegator user.\n\nGmail imposes limitations on the number of delegates and delegators each\nuser in a G Suite organization can have. These limits depend on your\norganization, but in general each user can have up to 25 delegates and\nup to 10 delegators.\n\nNote that a delegate user must be referred to by their primary email\naddress, and not an email alias.\n\nAlso note that when a new delegate is created, there may be up to a one\nminute delay before the new delegate is available for use.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/delegates",
"httpMethod": "POST",
"id": "gmail.users.settings.delegates.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/delegates",
"request": {
"$ref": "Delegate"
},
"response": {
"$ref": "Delegate"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"delete": {
"description": "Removes the specified delegate (which can be of any verification status),\nand revokes any verification that may have been required for using it.\n\nNote that a delegate user must be referred to by their primary email\naddress, and not an email alias.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
"httpMethod": "DELETE",
"id": "gmail.users.settings.delegates.delete",
"parameterOrder": [
"userId",
"delegateEmail"
],
"parameters": {
"delegateEmail": {
"description": "The email address of the user to be removed as a delegate.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"get": {
"description": "Gets the specified delegate.\n\nNote that a delegate user must be referred to by their primary email\naddress, and not an email alias.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
"httpMethod": "GET",
"id": "gmail.users.settings.delegates.get",
"parameterOrder": [
"userId",
"delegateEmail"
],
"parameters": {
"delegateEmail": {
"description": "The email address of the user whose delegate relationship is to be\nretrieved.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
"response": {
"$ref": "Delegate"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"list": {
"description": "Lists the delegates for the specified account.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/delegates",
"httpMethod": "GET",
"id": "gmail.users.settings.delegates.list",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/delegates",
"response": {
"$ref": "ListDelegatesResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
}
}
},
"filters": {
"methods": {
"create": {
"description": "Creates a filter.",
"flatPath": "gmail/v1/users/{userId}/settings/filters",
"httpMethod": "POST",
"id": "gmail.users.settings.filters.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/filters",
"request": {
"$ref": "Filter"
},
"response": {
"$ref": "Filter"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"delete": {
"description": "Deletes a filter.",
"flatPath": "gmail/v1/users/{userId}/settings/filters/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.settings.filters.delete",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the filter to be deleted.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/filters/{id}",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"get": {
"description": "Gets a filter.",
"flatPath": "gmail/v1/users/{userId}/settings/filters/{id}",
"httpMethod": "GET",
"id": "gmail.users.settings.filters.get",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the filter to be fetched.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/filters/{id}",
"response": {
"$ref": "Filter"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"list": {
"description": "Lists the message filters of a Gmail user.",
"flatPath": "gmail/v1/users/{userId}/settings/filters",
"httpMethod": "GET",
"id": "gmail.users.settings.filters.list",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/filters",
"response": {
"$ref": "ListFiltersResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
}
}
},
"forwardingAddresses": {
"methods": {
"create": {
"description": "Creates a forwarding address. If ownership verification is required, a\nmessage will be sent to the recipient and the resource's verification\nstatus will be set to \u003ccode\u003epending\u003c/code\u003e; otherwise, the resource will be\ncreated with verification status set to \u003ccode\u003eaccepted\u003c/code\u003e.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses",
"httpMethod": "POST",
"id": "gmail.users.settings.forwardingAddresses.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/forwardingAddresses",
"request": {
"$ref": "ForwardingAddress"
},
"response": {
"$ref": "ForwardingAddress"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"delete": {
"description": "Deletes the specified forwarding address and revokes any verification that\nmay have been required.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
"httpMethod": "DELETE",
"id": "gmail.users.settings.forwardingAddresses.delete",
"parameterOrder": [
"userId",
"forwardingEmail"
],
"parameters": {
"forwardingEmail": {
"description": "The forwarding address to be deleted.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"get": {
"description": "Gets the specified forwarding address.",
"flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
"httpMethod": "GET",
"id": "gmail.users.settings.forwardingAddresses.get",
"parameterOrder": [
"userId",
"forwardingEmail"
],
"parameters": {
"forwardingEmail": {
"description": "The forwarding address to be retrieved.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
"response": {
"$ref": "ForwardingAddress"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"list": {
"description": "Lists the forwarding addresses for the specified account.",
"flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses",
"httpMethod": "GET",
"id": "gmail.users.settings.forwardingAddresses.list",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/forwardingAddresses",
"response": {
"$ref": "ListForwardingAddressesResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
}
}
},
"sendAs": {
"methods": {
"create": {
"description": "Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail\nwill attempt to connect to the SMTP service to validate the configuration\nbefore creating the alias. If ownership verification is required for the\nalias, a message will be sent to the email address and the resource's\nverification status will be set to \u003ccode\u003epending\u003c/code\u003e; otherwise, the\nresource will be created with verification status set to\n\u003ccode\u003eaccepted\u003c/code\u003e. If a signature is provided, Gmail will sanitize the\nHTML before saving it with the alias.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs",
"httpMethod": "POST",
"id": "gmail.users.settings.sendAs.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs",
"request": {
"$ref": "SendAs"
},
"response": {
"$ref": "SendAs"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"delete": {
"description": "Deletes the specified send-as alias. Revokes any verification that may\nhave been required for using it.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"httpMethod": "DELETE",
"id": "gmail.users.settings.sendAs.delete",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The send-as alias to be deleted.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"get": {
"description": "Gets the specified send-as alias. Fails with an HTTP 404 error if the\nspecified address is not a member of the collection.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"httpMethod": "GET",
"id": "gmail.users.settings.sendAs.get",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The send-as alias to be retrieved.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"response": {
"$ref": "SendAs"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"list": {
"description": "Lists the send-as aliases for the specified account. The result includes\nthe primary send-as address associated with the account as well as any\ncustom \"from\" aliases.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs",
"httpMethod": "GET",
"id": "gmail.users.settings.sendAs.list",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs",
"response": {
"$ref": "ListSendAsResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"
]
},
"patch": {
"description": "Patch the specified send-as alias.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"httpMethod": "PATCH",
"id": "gmail.users.settings.sendAs.patch",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The send-as alias to be updated.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"request": {
"$ref": "SendAs"
},
"response": {
"$ref": "SendAs"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"update": {
"description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize\nthe HTML before saving it with the alias.\n\nAddresses other than the primary address for the account can only be\nupdated by service account clients that have been delegated domain-wide\nauthority.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"httpMethod": "PUT",
"id": "gmail.users.settings.sendAs.update",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The send-as alias to be updated.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
"request": {
"$ref": "SendAs"
},
"response": {
"$ref": "SendAs"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"verify": {
"description": "Sends a verification email to the specified send-as alias address.\nThe verification status must be \u003ccode\u003epending\u003c/code\u003e.\n\nThis method is only available to service account clients that have been\ndelegated domain-wide authority.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify",
"httpMethod": "POST",
"id": "gmail.users.settings.sendAs.verify",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The send-as alias to be verified.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "User's email address. The special value \"me\"\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
}
},
"resources": {
"smimeInfo": {
"methods": {
"delete": {
"description": "Deletes the specified S/MIME config for the specified send-as alias.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.settings.sendAs.smimeInfo.delete",
"parameterOrder": [
"userId",
"sendAsEmail",
"id"
],
"parameters": {
"id": {
"description": "The immutable ID for the SmimeInfo.",
"location": "path",
"required": true,
"type": "string"
},
"sendAsEmail": {
"description": "The email address that appears in the \"From:\" header for mail sent using\nthis alias.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"get": {
"description": "Gets the specified S/MIME config for the specified send-as alias.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
"httpMethod": "GET",
"id": "gmail.users.settings.sendAs.smimeInfo.get",
"parameterOrder": [
"userId",
"sendAsEmail",
"id"
],
"parameters": {
"id": {
"description": "The immutable ID for the SmimeInfo.",
"location": "path",
"required": true,
"type": "string"
},
"sendAsEmail": {
"description": "The email address that appears in the \"From:\" header for mail sent using\nthis alias.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
"response": {
"$ref": "SmimeInfo"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"insert": {
"description": "Insert (upload) the given S/MIME config for the specified send-as alias.\nNote that pkcs12 format is required for the key.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
"httpMethod": "POST",
"id": "gmail.users.settings.sendAs.smimeInfo.insert",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The email address that appears in the \"From:\" header for mail sent using\nthis alias.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
"request": {
"$ref": "SmimeInfo"
},
"response": {
"$ref": "SmimeInfo"
},
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"list": {
"description": "Lists S/MIME configs for the specified send-as alias.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
"httpMethod": "GET",
"id": "gmail.users.settings.sendAs.smimeInfo.list",
"parameterOrder": [
"userId",
"sendAsEmail"
],
"parameters": {
"sendAsEmail": {
"description": "The email address that appears in the \"From:\" header for mail sent using\nthis alias.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
"response": {
"$ref": "ListSmimeInfoResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
},
"setDefault": {
"description": "Sets the default S/MIME config for the specified send-as alias.",
"flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault",
"httpMethod": "POST",
"id": "gmail.users.settings.sendAs.smimeInfo.setDefault",
"parameterOrder": [
"userId",
"sendAsEmail",
"id"
],
"parameters": {
"id": {
"description": "The immutable ID for the SmimeInfo.",
"location": "path",
"required": true,
"type": "string"
},
"sendAsEmail": {
"description": "The email address that appears in the \"From:\" header for mail sent using\nthis alias.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault",
"scopes": [
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"
]
}
}
}
}
}
}
},
"threads": {
"methods": {
"delete": {
"description": "Immediately and permanently deletes the specified thread. This operation\ncannot be undone. Prefer \u003ccode\u003ethreads.trash\u003c/code\u003e instead.",
"flatPath": "gmail/v1/users/{userId}/threads/{id}",
"httpMethod": "DELETE",
"id": "gmail.users.threads.delete",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "ID of the Thread to delete.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads/{id}",
"scopes": [
"https://mail.google.com/"
]
},
"get": {
"description": "Gets the specified thread.",
"flatPath": "gmail/v1/users/{userId}/threads/{id}",
"httpMethod": "GET",
"id": "gmail.users.threads.get",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"format": {
"default": "full",
"description": "The format to return the messages in.",
"enum": [
"full",
"metadata",
"minimal"
],
"location": "query",
"type": "string"
},
"id": {
"description": "The ID of the thread to retrieve.",
"location": "path",
"required": true,
"type": "string"
},
"metadataHeaders": {
"description": "When given and format is METADATA, only include headers specified.",
"location": "query",
"repeated": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads/{id}",
"response": {
"$ref": "Thread"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.addons.current.message.action",
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata",
"https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"list": {
"description": "Lists the threads in the user's mailbox.",
"flatPath": "gmail/v1/users/{userId}/threads",
"httpMethod": "GET",
"id": "gmail.users.threads.list",
"parameterOrder": [
"userId"
],
"parameters": {
"includeSpamTrash": {
"default": "false",
"description": "Include threads from \u003ccode\u003eSPAM\u003c/code\u003e and \u003ccode\u003eTRASH\u003c/code\u003e\nin the results.",
"location": "query",
"type": "boolean"
},
"labelIds": {
"description": "Only return threads with labels that match all of the specified label IDs.",
"location": "query",
"repeated": true,
"type": "string"
},
"maxResults": {
"default": "100",
"description": "Maximum number of threads to return.",
"format": "uint32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token to retrieve a specific page of results in the list.",
"location": "query",
"type": "string"
},
"q": {
"description": "Only return threads matching the specified query. Supports the same\nquery format as the Gmail search box. For example,\n\u003ccode\u003e\"from:someuser@example.com rfc822msgid:\u003csomemsgid@example.com\u003e\nis:unread\"\u003c/code\u003e. Parameter cannot be used when accessing the api\nusing the gmail.metadata scope.",
"location": "query",
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads",
"response": {
"$ref": "ListThreadsResponse"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"
]
},
"modify": {
"description": "Modifies the labels applied to the thread. This applies to all messages\nin the thread.",
"flatPath": "gmail/v1/users/{userId}/threads/{id}/modify",
"httpMethod": "POST",
"id": "gmail.users.threads.modify",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the thread to modify.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads/{id}/modify",
"request": {
"$ref": "ModifyThreadRequest"
},
"response": {
"$ref": "Thread"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"trash": {
"description": "Moves the specified thread to the trash.",
"flatPath": "gmail/v1/users/{userId}/threads/{id}/trash",
"httpMethod": "POST",
"id": "gmail.users.threads.trash",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the thread to Trash.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads/{id}/trash",
"response": {
"$ref": "Thread"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
},
"untrash": {
"description": "Removes the specified thread from the trash.",
"flatPath": "gmail/v1/users/{userId}/threads/{id}/untrash",
"httpMethod": "POST",
"id": "gmail.users.threads.untrash",
"parameterOrder": [
"userId",
"id"
],
"parameters": {
"id": {
"description": "The ID of the thread to remove from Trash.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"default": "me",
"description": "The user's email address. The special value \u003ccode\u003eme\u003c/code\u003e\ncan be used to indicate the authenticated user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "gmail/v1/users/{userId}/threads/{id}/untrash",
"response": {
"$ref": "Thread"
},
"scopes": [
"https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"
]
}
}
}
}
}
},
"revision": "20200608",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AutoForwarding": {
"description": "Auto-forwarding settings for an account.",
"id": "AutoForwarding",
"properties": {
"disposition": {
"description": "The state that a message should be left in after it has been forwarded.",
"enum": [
"dispositionUnspecified",
"leaveInInbox",
"archive",
"trash",
"markRead"
],
"enumDescriptions": [
"Unspecified disposition.",
"Leave the message in the `INBOX`.",
"Archive the message.",
"Move the message to the `TRASH`.",
"Leave the message in the `INBOX` and mark it as read."
],
"type": "string"
},
"emailAddress": {
"description": "Email address to which all incoming messages are forwarded. This email\naddress must be a verified member of the forwarding addresses.",
"type": "string"
},
"enabled": {