@mcp-s/connectors 0.0.20260928085734

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"id":"gmail","slug":"gmail","kind":"api","status":"active","applications":["gmail"],"definition":{"display":{"name":"Gmail","description":"Gmail is a web-based email service developed by Google.","icon":"gmail.svg","website":"https://www.gmail.com","category":"communication-messaging","docs_url":"https://docs.withwillow.ai/docs/mcp-servers/built-in/gmail"},"api":{"base_url":"https://gmail.googleapis.com/gmail/v1"},"auth":{"methods":{"oauth":{"authUrl":"https://accounts.google.com/o/oauth2/v2/auth","tokenUrl":"https://oauth2.googleapis.com/token","authInitUrlParams":{"access_type":"offline","prompt":"consent"},"scopes":["https://www.googleapis.com/auth/gmail.addons.current.action.compose","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.labels","https://www.googleapis.com/auth/gmail.send","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.insert","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"defaultScopes":["https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.settings.basic"],"codeExchangeConfig":{"modelCredentialsMapping":"{\n \"access_token\": access_token, \n \"expires_at\": $fromMillis($millis() + expires_in * 1000),\n \"refresh_token\": refresh_token,\n \"refresh_token_expires_at\": $fromMillis($millis() + refresh_token_expires_in * 1000),\n \"scope\": scope,\n \"token_type\": token_type\n }"},"docs":{"link":"https://console.cloud.google.com/","steps":[{"markdown":"Go to [console.cloud.google.com](https://console.cloud.google.com/) and create or select a project. Navigate to **APIs & Services** → **OAuth consent screen**, choose **External** or **Internal**, fill in the required info, and add the Gmail scopes you need."},{"markdown":"Go to **APIs & Services** → **Credentials**, click **Create Credentials** → **OAuth client ID**, and select **Web application**. Under **Authorized redirect URIs**, paste this callback URL:","component":"redirectUrl"},{"markdown":"Click **Create**, then copy your **Client ID** and **Client Secret** and paste them here:","component":"credentials"}]}},"webrix-oauth":{"scopes":["https://www.googleapis.com/auth/gmail.send","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.settings.basic"],"defaultScopes":["https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.settings.basic"]}}},"conditions":[{"id":"block-labeled-messages","name":"Block messages with restricted labels","description":"Before reading an email, fetch its label ids and block the call when the message carries one of the configured restricted labels (e.g. a 'Confidential' label).","action":{"path":"/users/me/messages/{messageId}","method":"GET","mapping":{"params":"{ \"messageId\": arguments.messageId }","query":"{ \"format\": \"metadata\" }"}},"mapping":"$count(response.labelIds[$ in $$.variables.blockedLabelIds]) > 0","message":"This email carries a restricted label and cannot be accessed by this tool.","variables":[{"key":"blockedLabelIds","label":"Restricted label ids","description":"Gmail label ids (e.g. SPAM, CATEGORY_PERSONAL, or a custom Label_xxx) that block access to a message.","type":"string[]","required":true,"placeholder":"SPAM, Label_12345"}],"appliesTo":["read-email","list-gmail-attachments","get-gmail-attachment"]}],"tools":[{"name":"sendGmailMessage","enabled":true,"description":"Send an email message using Gmail.","slug":"send-gmail-message","ai_risk":{"level":"medium","score":6,"reasoning":"This tool sends an email message, which can be considered high risk as it can potentially lead to spam or misuse if misconfigured.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"to":{"type":"string","description":"Comma-separated list of recipient email addresses."},"cc":{"type":"string","description":"Comma-separated list of CC email addresses."},"bcc":{"type":"string","description":"Comma-separated list of BCC email addresses."},"subject":{"type":"string","description":"The subject line of the email."},"body":{"type":"string","description":"The plain text body of the email."},"threadId":{"type":"string","description":"Optional thread ID to send the message as a reply."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Optional list of label IDs to apply to the sent message."}},"required":["to","subject","body"]},"risk":"high","action":{"path":"/users/me/messages/send","method":"POST","mapping":{"body":"{\n \"raw\": $base64encode(\n \"To: \" & arguments.to & \"\r\n\" &\n ($exists(arguments.cc) and arguments.cc ? \"Cc: \" & arguments.cc & \"\r\n\" : \"\") &\n ($exists(arguments.bcc) and arguments.bcc ? \"Bcc: \" & arguments.bcc & \"\r\n\" : \"\") &\n \"Subject: \" & arguments.subject & \"\r\n\" &\n \"\r\n\" &\n arguments.body\n ),\n \"threadId\": arguments.threadId,\n \"labelIds\": arguments.labelIds\n}"}},"annotations":{"destructiveHint":true,"openWorldHint":true}},{"name":"createGmailDraft","enabled":true,"description":"Create a draft email message using Gmail.","slug":"create-gmail-draft","ai_risk":{"level":"medium","score":5,"reasoning":"Creating a draft email is a standard write operation, posing medium risk as it modifies user data but does not send it.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"to":{"type":"string","description":"Comma-separated list of recipient email addresses."},"cc":{"type":"string","description":"Comma-separated list of CC email addresses."},"bcc":{"type":"string","description":"Comma-separated list of BCC email addresses."},"subject":{"type":"string","description":"The subject line of the email."},"body":{"type":"string","description":"The plain text body of the email."},"threadId":{"type":"string","description":"Optional thread ID to send the message as a reply."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Optional list of label IDs to apply to the sent message."}},"required":["to","subject","body"]},"action":{"path":"/users/me/drafts","method":"POST","mapping":{"body":"{\n \"message\": {\n \"raw\": $base64encode(\n \"To: \" & arguments.to & \"\r\n\" &\n ($exists(arguments.cc) and arguments.cc ? \"Cc: \" & arguments.cc & \"\r\n\" : \"\") &\n ($exists(arguments.bcc) and arguments.bcc ? \"Bcc: \" & arguments.bcc & \"\r\n\" : \"\") &\n \"Subject: \" & arguments.subject & \"\r\n\" &\n \"\r\n\" &\n arguments.body\n ),\n \"threadId\": arguments.threadId,\n \"labelIds\": arguments.labelIds\n}\n }"}},"annotations":{"destructiveHint":true}},{"name":"readEmail","enabled":true,"description":"Read an email message using Gmail.","slug":"read-email","ai_risk":{"level":"low","score":1,"reasoning":"This tool reads an email message, making it low risk as it only fetches data without modifying anything.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the email message to read."}}},"action":{"path":"/users/me/messages/{messageId}","method":"GET","mapping":{"params":"{\n \"messageId\": arguments.messageId\n }","response":"(\n $header := function($name) { response.payload.headers[name = $name].value };\n $body := response.payload.body.data\n ? $base64decode(response.payload.body.data)\n : $join(response.payload.parts.(body.data ? $base64decode(body.data) : ''), '\n');\n {\n \"id\": response.id,\n \"threadId\": response.threadId,\n \"labelIds\": response.labelIds,\n \"snippet\": response.snippet,\n \"from\": $header(\"From\"),\n \"to\": $header(\"To\"),\n \"cc\": $header(\"Cc\"),\n \"subject\": $header(\"Subject\"),\n \"date\": $header(\"Date\"),\n \"internalDate\": response.internalDate,\n \"mimeType\": response.payload.mimeType,\n \"body\": $body\n }\n )"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"listGmailAttachments","enabled":true,"description":"List file attachments on a Gmail message. Returns metadata for each attachment including filename, MIME type, attachment ID, and size. Use 'getGmailAttachment' with the attachment ID to download the file content. Optionally filter by MIME type (e.g. 'application/pdf' for PDF files).","slug":"list-gmail-attachments","ai_risk":{"level":"low","score":1,"reasoning":"This tool lists attachment metadata on an email message without downloading file content.","calculated_at":"2026-07-28T08:00:00.000Z"},"inputSchema":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the email message to list attachments from."},"mimeType":{"type":"string","description":"Optional MIME type filter (e.g. 'application/pdf' to list only PDF attachments)."}},"required":["messageId"]},"action":{"path":"/users/me/messages/{messageId}","method":"GET","mapping":{"params":"{\n \"messageId\": arguments.messageId\n }","query":"{\n \"format\": \"full\"\n }","response":"(\n $flatten := function($parts) { (\n $direct := $parts[filename or body.attachmentId].{\n \"filename\": filename,\n \"mimeType\": mimeType,\n \"attachmentId\": body.attachmentId,\n \"size\": body.size,\n \"hasInlineData\": $boolean(body.data)\n };\n $nested := $parts.parts.($count($) > 0 ? $flatten($) : []);\n $append($direct, $nested)\n )};\n $attachments := response.payload.parts\n ? $flatten(response.payload.parts)\n : (\n response.payload.filename or response.payload.body.attachmentId\n )\n ? [{\n \"filename\": response.payload.filename,\n \"mimeType\": response.payload.mimeType,\n \"attachmentId\": response.payload.body.attachmentId,\n \"size\": response.payload.body.size,\n \"hasInlineData\": $boolean(response.payload.body.data)\n }]\n : [];\n $filtered := $filter($attachments, function($a) {\n $not($exists($$.arguments.mimeType) and $$.arguments.mimeType)\n or $a.mimeType = $$.arguments.mimeType\n });\n {\n \"messageId\": response.id,\n \"attachments\": $filtered\n }\n )"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"getGmailAttachment","enabled":true,"description":"Download a file attachment from a Gmail message. Returns the attachment content as a base64url-encoded string in the 'data' field. Use 'listGmailAttachments' first to find the attachment ID. Decode the data with a base64url decoder to save the file locally.","slug":"get-gmail-attachment","ai_risk":{"level":"low","score":1,"reasoning":"This tool downloads an email attachment and is read-only.","calculated_at":"2026-07-28T08:00:00.000Z"},"inputSchema":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the email message containing the attachment."},"attachmentId":{"type":"string","description":"The attachment ID from 'listGmailAttachments'. Required for attachments stored separately from the message body."}},"required":["messageId","attachmentId"]},"action":{"path":"/users/me/messages/{messageId}/attachments/{attachmentId}","method":"GET","mapping":{"params":"{\n \"messageId\": arguments.messageId,\n \"attachmentId\": arguments.attachmentId\n }","response":"{\n \"attachmentId\": response.attachmentId ? response.attachmentId : arguments.attachmentId,\n \"size\": response.size,\n \"data\": response.data,\n \"encoding\": \"base64url\"\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"listEmails","enabled":true,"description":"List email messages using Gmail.","slug":"list-emails","ai_risk":{"level":"low","score":1,"reasoning":"Listing email messages is a read-only operation, posing low risk as it does not alter any data.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"The query to search for email messages. Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, 'from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread'."},"maxResults":{"type":"number","description":"The maximum number of results to return.","default":10}}},"action":{"path":"/users/me/messages","method":"GET","mapping":{"query":"{\n \"q\": arguments.query,\n \"maxResults\": arguments.maxResults ? arguments.maxResults : 10\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"listGmailDrafts","enabled":true,"description":"Lists draft emails from the authenticated user's Gmail account. Supports filtering by query string and pagination.","slug":"list-gmail-drafts","ai_risk":{"level":"low","score":1,"reasoning":"This tool lists draft emails, which is a read-only operation and therefore low risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Optional query string to filter drafts, using the same format as the Gmail search bar (e.g. 'subject:Update', 'from:user@example.com', 'is:unread', 'has:attachment', 'after:YYYY/MM/DD'). If omitted, all drafts (excluding spam and trash by default) are listed."},"maxResults":{"type":"number","description":"The maximum number of drafts to return. Defaults to 20. The maximum allowed value is 50.","default":20,"minimum":1,"maximum":50},"pageToken":{"type":"string","description":"A token received from a previous list_drafts call to retrieve the next page of results. Leave empty to fetch the first page."},"includeSpamTrash":{"type":"boolean","description":"Include drafts from SPAM and TRASH in the results. Defaults to false."}}},"action":{"path":"/users/me/drafts","method":"GET","mapping":{"query":"{\n \"q\": arguments.query,\n \"maxResults\": arguments.maxResults ? arguments.maxResults : 20,\n \"pageToken\": arguments.pageToken,\n \"includeSpamTrash\": arguments.includeSpamTrash\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"getGmailThread","enabled":true,"description":"Retrieves a specific email thread from the authenticated user's Gmail account, including a list of its messages.","slug":"get-gmail-thread","ai_risk":{"level":"low","score":1,"reasoning":"Retrieving a specific email thread is a read-only action, posing low risk as it does not modify any data.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"threadId":{"type":"string","description":"The unique identifier of the thread to fetch."},"format":{"type":"string","enum":["full","metadata","minimal"],"description":"The format to return the messages in. Defaults to 'full'.","default":"full"}},"required":["threadId"]},"action":{"path":"/users/me/threads/{threadId}","method":"GET","mapping":{"params":"{\n \"threadId\": arguments.threadId\n }","query":"{\n \"format\": arguments.format ? arguments.format : \"full\"\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"searchGmailThreads","enabled":true,"description":"Lists email threads from the authenticated user's Gmail account. Supports filtering by query string and pagination. Returns thread IDs and snippets; use 'getGmailThread' to fetch full message bodies.","slug":"search-gmail-threads","ai_risk":{"level":"low","score":1,"reasoning":"This tool lists email threads, which is a read-only operation and thus low risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Optional query string to filter threads, using the same format as the Gmail search bar (e.g. 'subject:Update', 'from:user@example.com', 'is:unread', 'has:attachment', 'after:YYYY/MM/DD'). If omitted, all threads (excluding spam and trash by default) are listed."},"maxResults":{"type":"number","description":"The maximum number of threads to return. Defaults to 20. The maximum allowed value is 50.","default":20,"minimum":1,"maximum":50},"pageToken":{"type":"string","description":"Page token to retrieve a specific page of results. Leave empty to fetch the first page."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Only return threads with labels that match all of the specified label IDs."},"includeSpamTrash":{"type":"boolean","description":"Include threads from SPAM and TRASH in the results. Defaults to false."}}},"action":{"path":"/users/me/threads","method":"GET","mapping":{"query":"{\n \"q\": arguments.query,\n \"maxResults\": arguments.maxResults ? arguments.maxResults : 20,\n \"pageToken\": arguments.pageToken,\n \"labelIds\": arguments.labelIds,\n \"includeSpamTrash\": arguments.includeSpamTrash\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"labelGmailThread","enabled":true,"description":"Adds labels to an entire thread. Affects all messages currently in the thread and any future messages added to it. Use 'searchGmailThreads' to find a thread ID and 'listGmailLabels' to discover label IDs. System label IDs include: INBOX, TRASH, SPAM, STARRED, UNREAD, IMPORTANT.","slug":"label-gmail-thread","ai_risk":{"level":"low","score":4,"reasoning":"Adding labels to a thread modifies the state of the emails, which is a standard write operation and poses medium risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"threadId":{"type":"string","description":"The unique identifier of the thread to add labels to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the labels to add. Can be a system label ID (e.g., 'INBOX', 'TRASH', 'SPAM', 'STARRED', 'UNREAD') or a user-defined label ID.","minItems":1,"maxItems":100}},"required":["threadId","labelIds"]},"action":{"path":"/users/me/threads/{threadId}/modify","method":"POST","mapping":{"params":"{\n \"threadId\": arguments.threadId\n }","body":"{\n \"addLabelIds\": arguments.labelIds\n }"}},"annotations":{"idempotentHint":true,"openWorldHint":true}},{"name":"unlabelGmailThread","enabled":true,"description":"Removes labels from an entire thread. Use 'searchGmailThreads' to find a thread ID and 'listGmailLabels' to discover label IDs.","slug":"unlabel-gmail-thread","ai_risk":{"level":"medium","score":5,"reasoning":"Removing labels from a thread is a destructive action that modifies user data, posing medium risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"threadId":{"type":"string","description":"The unique identifier of the thread to remove labels from."},"labelIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the labels to remove.","minItems":1,"maxItems":100}},"required":["threadId","labelIds"]},"action":{"path":"/users/me/threads/{threadId}/modify","method":"POST","mapping":{"params":"{\n \"threadId\": arguments.threadId\n }","body":"{\n \"removeLabelIds\": arguments.labelIds\n }"}},"annotations":{"destructiveHint":true,"idempotentHint":true}},{"name":"listGmailLabels","enabled":true,"description":"Lists all labels available in the authenticated user's Gmail account. Use this tool to discover the ID of a user label before calling label/unlabel tools. System labels can be used with their well-known IDs: INBOX, TRASH, SPAM, STARRED, UNREAD, IMPORTANT, CHAT, DRAFT, SENT.","slug":"list-gmail-labels","ai_risk":{"level":"low","score":1,"reasoning":"This tool lists all labels, which is a read-only operation and therefore low risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{}},"action":{"path":"/users/me/labels","method":"GET","mapping":{}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"labelGmailMessage","enabled":true,"description":"Adds one or more labels to a specific message. Use 'searchGmailThreads' or 'getGmailThread' to find message IDs and 'listGmailLabels' to discover label IDs.","slug":"label-gmail-message","ai_risk":{"level":"low","score":4,"reasoning":"Adding labels to a specific message modifies its state, which is a standard write operation and poses medium risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the message to add the labels to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the labels to add. Can be a system label ID (e.g., 'INBOX', 'TRASH', 'SPAM', 'STARRED', 'UNREAD') or a user-defined label ID.","minItems":1,"maxItems":100}},"required":["messageId","labelIds"]},"action":{"path":"/users/me/messages/{messageId}/modify","method":"POST","mapping":{"params":"{\n \"messageId\": arguments.messageId\n }","body":"{\n \"addLabelIds\": arguments.labelIds\n }"}},"annotations":{"idempotentHint":true,"openWorldHint":true}},{"name":"unlabelGmailMessage","enabled":true,"description":"Removes one or more labels from a specific message. Use 'searchGmailThreads' or 'getGmailThread' to find message IDs and 'listGmailLabels' to discover label IDs.","slug":"unlabel-gmail-message","ai_risk":{"level":"medium","score":5,"reasoning":"Removing labels from a specific message is a destructive action that modifies user data, posing medium risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the message to remove the labels from."},"labelIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the labels to remove.","minItems":1,"maxItems":100}},"required":["messageId","labelIds"]},"action":{"path":"/users/me/messages/{messageId}/modify","method":"POST","mapping":{"params":"{\n \"messageId\": arguments.messageId\n }","body":"{\n \"removeLabelIds\": arguments.labelIds\n }"}},"annotations":{"destructiveHint":true,"idempotentHint":true}},{"name":"createGmailLabel","enabled":true,"description":"Creates a new user label in the authenticated user's Gmail account.","slug":"create-gmail-label","ai_risk":{"level":"low","score":4,"reasoning":"Creating a new user label modifies the user's account settings, which is a standard write operation and poses medium risk.","calculated_at":"2026-05-22T10:03:01.160Z"},"inputSchema":{"type":"object","properties":{"displayName":{"type":"string","description":"The display name of the label to create."},"labelListVisibility":{"type":"string","enum":["labelShow","labelShowIfUnread","labelHide"],"description":"The visibility of the label in the label list of the Gmail web interface. Defaults to 'labelShow'."},"messageListVisibility":{"type":"string","enum":["show","hide"],"description":"The visibility of messages with this label in the message list. Defaults to 'show'."}},"required":["displayName"]},"action":{"path":"/users/me/labels","method":"POST","mapping":{"body":"{\n \"name\": arguments.displayName,\n \"labelListVisibility\": arguments.labelListVisibility,\n \"messageListVisibility\": arguments.messageListVisibility\n }"}},"annotations":{"openWorldHint":true}},{"name":"createGmailFilter","enabled":true,"description":"Creates a Gmail filter (inbox rule) that automatically applies actions to incoming messages matching the given criteria. Provide at least one criterion (e.g. 'query', 'from', 'subject') and at least one action (e.g. 'addLabelIds', 'removeLabelIds', 'forward'). To auto-archive messages, remove the 'INBOX' label via 'removeLabelIds'. Use 'listGmailLabels' to discover label IDs and 'createGmailLabel' to create new ones. You can create up to 1,000 filters per user.","slug":"create-gmail-filter","ai_risk":{"level":"medium","score":5,"reasoning":"Creating a filter persistently changes how future incoming mail is handled (labeling, archiving, forwarding), which is a write operation that modifies account behavior and poses medium risk.","calculated_at":"2026-08-26T00:00:00.000Z"},"inputSchema":{"type":"object","properties":{"criteria":{"type":"object","description":"The conditions a message must match for the filter to apply. Provide at least one field.","properties":{"from":{"type":"string","description":"The sender's email address to match. Supports the same format as the Gmail search box, e.g. 'notifications@github.com' or 'from:(a@x.com OR b@x.com)'."},"to":{"type":"string","description":"The recipient's email address to match."},"subject":{"type":"string","description":"Text that must appear in the subject line."},"query":{"type":"string","description":"A Gmail search query that matches the message, using the same format as the Gmail search box (e.g. 'from:(notifications@github.com) list:(repo.org.github.com)')."},"negatedQuery":{"type":"string","description":"A Gmail search query whose matching messages are excluded from the filter."},"hasAttachment":{"type":"boolean","description":"Whether the message must have an attachment."},"excludeChats":{"type":"boolean","description":"Whether to exclude chat messages from matching."},"size":{"type":"number","description":"The size of the message in bytes, compared using 'sizeComparison'."},"sizeComparison":{"type":"string","enum":["larger","smaller"],"description":"How the message size is compared against 'size': 'larger' or 'smaller'."}},"additionalProperties":false},"action":{"type":"object","description":"The actions to apply to messages matching the criteria. Provide at least one field.","properties":{"addLabelIds":{"type":"array","items":{"type":"string"},"description":"Label IDs to add to matching messages. Can be a system label ID (e.g. 'STARRED', 'IMPORTANT') or a user-defined label ID from 'listGmailLabels'."},"removeLabelIds":{"type":"array","items":{"type":"string"},"description":"Label IDs to remove from matching messages. Remove 'INBOX' to auto-archive, or 'UNREAD' to mark as read."},"forward":{"type":"string","description":"An email address to forward matching messages to. The address must already be a verified forwarding address on the account."}},"additionalProperties":false}},"required":["criteria","action"]},"action":{"path":"/users/me/settings/filters","method":"POST","mapping":{"body":"{\n \"criteria\": arguments.criteria,\n \"action\": arguments.action\n }"}},"annotations":{"openWorldHint":true}},{"name":"listGmailFilters","enabled":true,"description":"Lists all filters (inbox rules) configured in the authenticated user's Gmail account, including each filter's ID, criteria, and actions. Use the returned filter ID with 'getGmailFilter' or 'deleteGmailFilter'.","slug":"list-gmail-filters","ai_risk":{"level":"low","score":1,"reasoning":"This tool lists existing filters, which is a read-only operation and therefore low risk.","calculated_at":"2026-08-26T00:00:00.000Z"},"inputSchema":{"type":"object","properties":{}},"action":{"path":"/users/me/settings/filters","method":"GET","mapping":{"response":"{\n \"filters\": response.filter ? response.filter : []\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"getGmailFilter","enabled":true,"description":"Retrieves a single Gmail filter (inbox rule) by its ID, including its criteria and actions. Use 'listGmailFilters' to discover filter IDs.","slug":"get-gmail-filter","ai_risk":{"level":"low","score":1,"reasoning":"This tool fetches a single filter, which is a read-only operation and therefore low risk.","calculated_at":"2026-08-26T00:00:00.000Z"},"inputSchema":{"type":"object","properties":{"filterId":{"type":"string","description":"The ID of the filter to fetch."}},"required":["filterId"]},"action":{"path":"/users/me/settings/filters/{filterId}","method":"GET","mapping":{"params":"{\n \"filterId\": arguments.filterId\n }"}},"annotations":{"readOnlyHint":true,"idempotentHint":true}},{"name":"deleteGmailFilter","enabled":true,"description":"Immediately and permanently deletes a Gmail filter (inbox rule) by its ID. This does not affect messages already processed by the filter. Use 'listGmailFilters' to discover filter IDs.","slug":"delete-gmail-filter","ai_risk":{"level":"medium","score":5,"reasoning":"Deleting a filter permanently removes an inbox rule, which is a destructive change to account configuration and poses medium risk.","calculated_at":"2026-08-26T00:00:00.000Z"},"inputSchema":{"type":"object","properties":{"filterId":{"type":"string","description":"The ID of the filter to delete."}},"required":["filterId"]},"action":{"path":"/users/me/settings/filters/{filterId}","method":"DELETE","mapping":{"params":"{\n \"filterId\": arguments.filterId\n }","response":"{\n \"success\": true,\n \"filterId\": arguments.filterId\n }"}},"annotations":{"destructiveHint":true,"idempotentHint":true}}],"schemas":[{"connectorSlug":"gmail","path":"/users/{userId}/profile","method":"GET","name":"users.getProfile","description":"Gets the current user's Gmail profile.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"responses":{"200":{"type":"object","properties":{"emailAddress":{"type":"string","description":"The user's email address."},"messagesTotal":{"type":"integer","description":"The total number of messages in the mailbox."},"threadsTotal":{"type":"integer","description":"The total number of threads in the mailbox."},"historyId":{"type":"string","description":"The ID of the mailbox's current history record."}},"required":["emailAddress","messagesTotal","threadsTotal","historyId"],"additionalProperties":false,"description":"Profile for a Gmail user."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/stop","method":"POST","name":"users.stop","description":"Stops receiving push notifications for the specified user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the users.stop endpoint."},"body":{"type":"object","description":"The request body must be empty.","additionalProperties":false,"properties":{}},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful request.","additionalProperties":false,"properties":{}}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/watch","method":"POST","name":"users.watch","description":"Set up or update a push notification watch on the given user mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"labelIds":{"type":"array","description":"List of labelIds to restrict notifications about. If unspecified, all changes are pushed out. If specified, dictates which labels are required for a push notification to be generated.","items":{"type":"string","description":"A label ID to restrict notifications about."}},"labelFilterAction":{"type":"string","enum":["include","exclude"],"description":"Filtering behavior of labelIds list specified. This field is deprecated because it caused incorrect behavior in some cases; use labelFilterBehavior instead."},"labelFilterBehavior":{"type":"string","enum":["include","exclude"],"description":"Filtering behavior of labelIds list specified. This field replaces labelFilterAction; if set, labelFilterAction is ignored."},"topicName":{"type":"string","description":"A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name must already exist in Cloud Pub/Sub and you must have already granted gmail 'publish' permission on it. For example, 'projects/my-project-identifier/topics/my-topic-name'."}},"required":["topicName"],"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"historyId":{"type":"string","description":"The ID of the mailbox's current history record."},"expiration":{"type":"string","description":"When Gmail will stop sending notifications for mailbox updates (epoch millis). Call watch again before this time to renew the watch."}},"required":["historyId","expiration"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts","method":"POST","name":"users.drafts.create","description":"Creates a new draft with the DRAFT label in the specified user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for identifying the user."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the draft."},"message":{"type":"object","description":"The message content of the draft.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"additionalProperties":true}},"required":["message"],"additionalProperties":false,"description":"The draft to be created."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the created draft."},"message":{"type":"object","description":"The message content of the created draft.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"additionalProperties":true}},"required":["id","message"],"additionalProperties":false,"description":"The created draft resource."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts/{id}","method":"DELETE","name":"users.drafts.delete","description":"Immediately and permanently deletes the specified draft. Does not simply trash it.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the draft to delete."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the draft to delete."},"body":{"type":"object","description":"The request body must be empty.","additionalProperties":false,"properties":{}},"responses":{"200":{"type":"object","description":"If successful, the response body is an empty JSON object.","additionalProperties":false,"properties":{}}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts/{id}","method":"GET","name":"users.drafts.get","description":"Gets the specified draft from a user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the draft to retrieve."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the draft."},"query":{"type":"object","properties":{"format":{"type":"string","enum":["full","metadata","minimal","raw"],"description":"The format to return the draft in."}},"additionalProperties":false,"description":"Query parameters for specifying the format of the returned draft."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the draft."},"message":{"type":"object","description":"The message content of the draft.","properties":{},"additionalProperties":true}},"required":["id","message"],"additionalProperties":false,"description":"A Draft resource representing the retrieved draft."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts","method":"GET","name":"users.drafts.list","description":"Lists the drafts in the user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"maxResults":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of drafts to return. Defaults to 100. The maximum allowed value is 500."},"pageToken":{"type":"string","description":"Page token to retrieve a specific page of results in the list."},"q":{"type":"string","description":"Only return draft messages matching the specified query. Supports the same query format as the Gmail search box."},"includeSpamTrash":{"type":"boolean","description":"Include drafts from SPAM and TRASH in the results."}},"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"drafts":{"type":"array","description":"List of drafts. Each Draft resource contains a Message property with only id and threadId.","items":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the draft."},"message":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true,"description":"The message content of the draft, containing only id and threadId."}},"required":["id","message"],"additionalProperties":true,"description":"A draft object."}},"nextPageToken":{"type":"string","description":"Token to retrieve the next page of results in the list."},"resultSizeEstimate":{"type":"integer","description":"Estimated total number of results."}},"required":[],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts/send","method":"POST","name":"users.drafts.send","description":"Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the draft."},"message":{"type":"object","description":"The message content to be sent.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"additionalProperties":true}},"required":["id"],"additionalProperties":false,"description":"The request body containing the draft to send."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the sent message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"required":["id"],"additionalProperties":true,"description":"The sent message resource."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/drafts/{id}","method":"PUT","name":"users.drafts.update","description":"Replaces a draft's content in the specified user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the draft to update."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the draft to update."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the draft."},"message":{"type":"object","description":"The message content of the draft.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"additionalProperties":true}},"required":["message"],"additionalProperties":true,"description":"The draft resource containing the updated message."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the updated draft."},"message":{"type":"object","description":"The updated message content of the draft.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"additionalProperties":true}},"required":["id","message"],"additionalProperties":true,"description":"The updated draft resource."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/history","method":"GET","name":"users.history.list","description":"Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"maxResults":{"type":"integer","minimum":1,"maximum":500,"description":"Maximum number of history records to return. Defaults to 100. The maximum allowed value is 500."},"pageToken":{"type":"string","description":"Page token to retrieve a specific page of results in the list."},"startHistoryId":{"type":"string","description":"Required. Returns history records after the specified startHistoryId. Should be obtained from the historyId of a message, thread, or previous list response."},"labelId":{"type":"string","description":"Only return messages with a label matching the ID."},"historyTypes":{"type":"array","items":{"type":"string","enum":["messageAdded","messageDeleted","labelAdded","labelRemoved"],"description":"History types to be returned by the function."},"description":"History types to be returned by the function."}},"required":["startHistoryId"],"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"history":{"type":"array","description":"List of history records. Any messages contained in the response will typically only have id and threadId fields populated.","items":{"type":"object","properties":{"id":{"type":"string","description":"The mailbox sequence ID."},"messages":{"type":"array","description":"List of messages changed in this history record. The fields for specific change types, such as messagesAdded may duplicate messages in this field.","items":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true}},"messagesAdded":{"type":"array","description":"Messages added to the mailbox in this history record.","items":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true}},"required":["message"],"additionalProperties":false}},"messagesDeleted":{"type":"array","description":"Messages deleted (not Trashed) from the mailbox in this history record.","items":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true}},"required":["message"],"additionalProperties":false}},"labelsAdded":{"type":"array","description":"Labels added to messages in this history record.","items":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true},"labelIds":{"type":"array","items":{"type":"string","description":"Label ID added to the message."},"description":"Label IDs added to the message."}},"required":["message","labelIds"],"additionalProperties":false}},"labelsRemoved":{"type":"array","description":"Labels removed from messages in this history record.","items":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true},"labelIds":{"type":"array","items":{"type":"string","description":"Label ID removed from the message."},"description":"Label IDs removed from the message."}},"required":["message","labelIds"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"nextPageToken":{"type":"string","description":"Page token to retrieve the next page of results in the list."},"historyId":{"type":"string","description":"The ID of the mailbox's current history record."}},"required":[],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels","method":"POST","name":"users.labels.create","description":"Creates a new label in the specified user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","enum":["show","hide"],"description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","enum":["labelShow","labelShowIfUnread","labelHide"],"description":"The visibility of the label in the label list."},"type":{"type":"string","enum":["system","user"],"description":"The type of the label: 'system' or 'user'."},"color":{"type":"object","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in hexadecimal."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in hexadecimal."}},"required":[],"additionalProperties":false,"description":"The color settings for the label."}},"required":[],"additionalProperties":false,"description":"The Label resource to create."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","enum":["show","hide"],"description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","enum":["labelShow","labelShowIfUnread","labelHide"],"description":"The visibility of the label in the label list."},"type":{"type":"string","enum":["system","user"],"description":"The type of the label: 'system' or 'user'."},"color":{"type":"object","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in hexadecimal."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in hexadecimal."}},"required":[],"additionalProperties":false,"description":"The color settings for the label."}},"required":["id","name","type"],"additionalProperties":false,"description":"A newly created instance of Label."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.labels"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels/{id}","method":"DELETE","name":"users.labels.delete","description":"Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the label to delete."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the label to delete."},"body":{"type":"object","properties":{},"additionalProperties":false,"description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{},"additionalProperties":false,"description":"If successful, the response body is an empty JSON object."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.labels"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels/{id}","method":"GET","name":"users.labels.get","description":"Gets the specified label for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the label to retrieve."}},"required":["userId","id"],"additionalProperties":false},"responses":{"200":{"type":"object","description":"A Label resource representing a Gmail label.","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","description":"The visibility of the label in the label list."},"type":{"type":"string","description":"The type of the label (system or user)."},"messagesTotal":{"type":"integer","description":"The total number of messages with the label."},"messagesUnread":{"type":"integer","description":"The number of unread messages with the label."},"threadsTotal":{"type":"integer","description":"The total number of threads with the label."},"threadsUnread":{"type":"integer","description":"The number of unread threads with the label."},"color":{"type":"object","description":"The color of the label.","properties":{"textColor":{"type":"string","description":"The text color of the label in hex format."},"backgroundColor":{"type":"string","description":"The background color of the label in hex format."}},"required":["textColor","backgroundColor"],"additionalProperties":false}},"required":["id","name","type"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels","method":"GET","name":"users.labels.list","description":"Lists all labels in the user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"labels":{"type":"array","description":"List of labels. Each label resource contains an id, name, messageListVisibility, labelListVisibility, and type.","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","description":"The visibility of the label in the label list."},"type":{"type":"string","description":"The type of the label (e.g., system or user)."}},"required":["id","name","messageListVisibility","labelListVisibility","type"],"additionalProperties":false,"description":"A label resource."}}},"required":["labels"],"additionalProperties":false,"description":"The response body containing the list of labels."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels/{id}","method":"PATCH","name":"users.labels.patch","description":"Patch the specified label in the user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the label to update."}},"required":["userId","id"],"additionalProperties":false},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","description":"The visibility of the label in the message list. Possible values include 'show' and 'hide'."},"labelListVisibility":{"type":"string","description":"The visibility of the label in the label list in the Gmail web interface. Possible values include 'labelShow', 'labelShowIfUnread', and 'labelHide'."},"type":{"type":"string","description":"The type of the label, such as 'system' or 'user'."},"color":{"type":"object","description":"The color to assign to the label.","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in the #RRGGBB format."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in the #RRGGBB format."}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","description":"The visibility of the label in the label list in the Gmail web interface."},"type":{"type":"string","description":"The type of the label, such as 'system' or 'user'."},"color":{"type":"object","description":"The color assigned to the label.","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in the #RRGGBB format."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in the #RRGGBB format."}},"required":[],"additionalProperties":false}},"required":["id","name","type"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.labels"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/labels/{id}","method":"PUT","name":"users.labels.update","description":"Updates the specified label in the user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the label to update."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and label to update."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","enum":["show","hide"],"description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","enum":["labelShow","labelShowIfUnread","labelHide"],"description":"The visibility of the label in the label list."},"type":{"type":"string","enum":["system","user"],"description":"The type of the label: system or user."},"color":{"type":"object","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in hexadecimal."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in hexadecimal."}},"required":["textColor","backgroundColor"],"additionalProperties":false,"description":"The color settings for the label."}},"required":[],"additionalProperties":false,"description":"The Label resource containing updated label information."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the label."},"name":{"type":"string","description":"The display name of the label."},"messageListVisibility":{"type":"string","enum":["show","hide"],"description":"The visibility of the label in the message list."},"labelListVisibility":{"type":"string","enum":["labelShow","labelShowIfUnread","labelHide"],"description":"The visibility of the label in the label list."},"type":{"type":"string","enum":["system","user"],"description":"The type of the label: system or user."},"color":{"type":"object","properties":{"textColor":{"type":"string","description":"The text color of the label, specified in hexadecimal."},"backgroundColor":{"type":"string","description":"The background color of the label, specified in hexadecimal."}},"required":["textColor","backgroundColor"],"additionalProperties":false,"description":"The color settings for the label."}},"required":["id","name","type"],"additionalProperties":false,"description":"The updated Label resource."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.labels"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/batchDelete","method":"POST","name":"users.messages.batchDelete","description":"Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"ids":{"type":"array","description":"The IDs of the messages to delete.","items":{"type":"string","description":"A message ID to delete."}}},"required":["ids"],"additionalProperties":false},"responses":{"200":{"type":"object","description":"Empty response body if successful.","properties":{},"additionalProperties":false}}},"requiredScopes":["https://mail.google.com/"]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/batchModify","method":"POST","name":"users.messages.batchModify","description":"Modifies the labels on the specified messages.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"ids":{"type":"array","description":"The IDs of the messages to modify. There is a limit of 1000 ids per request.","items":{"type":"string","description":"A message ID to modify."}},"addLabelIds":{"type":"array","description":"A list of label IDs to add to messages.","items":{"type":"string","description":"A label ID to add."}},"removeLabelIds":{"type":"array","description":"A list of label IDs to remove from messages.","items":{"type":"string","description":"A label ID to remove."}}},"required":["ids"],"additionalProperties":false},"responses":{"200":{"type":"object","description":"Empty response body if successful.","properties":{},"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{id}","method":"DELETE","name":"users.messages.delete","description":"Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the message to delete."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the message to delete."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","description":"If successful, the response body is an empty JSON object.","additionalProperties":false}}},"requiredScopes":["https://mail.google.com/"]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{id}","method":"GET","name":"users.messages.get","description":"Gets the specified message.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the message to retrieve. This ID is usually retrieved using messages.list, messages.insert, or messages.import."}},"required":["userId","id"],"additionalProperties":false},"query":{"type":"object","properties":{"format":{"type":"string","description":"The format to return the message in.","enum":["full","metadata","minimal","raw"]},"metadataHeaders":{"type":"array","description":"When given and format is METADATA, only include headers specified.","items":{"type":"string","description":"A header name to include in the response when format is METADATA."}}},"additionalProperties":false},"responses":{"200":{"$ref":"#/components/schemas/Message","description":"A Message resource representing the retrieved email message."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/import","method":"POST","name":"users.messages.import","description":"Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks and does not send a message.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"internalDateSource":{"type":"string","description":"Source for Gmail's internal date of the message.","enum":["dateHeader","receivedTime"]},"neverMarkSpam":{"type":"boolean","description":"Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox."},"processForCalendar":{"type":"boolean","description":"Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user."},"deleted":{"type":"boolean","description":"Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts."}},"additionalProperties":false},"body":{"$ref":"#/definitions/Message"},"responses":{"200":{"$ref":"#/definitions/Message"}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.insert"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages","method":"POST","name":"users.messages.insert","description":"Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"internalDateSource":{"type":"string","description":"Source for Gmail's internal date of the message.","enum":["dateHeader","receivedTime"]},"deleted":{"type":"boolean","description":"Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts."}},"additionalProperties":false},"body":{"$ref":"#/definitions/Message"},"responses":{"200":{"$ref":"#/definitions/Message"}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.insert"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages","method":"GET","name":"users.messages.list","description":"Lists the messages in the user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"maxResults":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of messages to return. Defaults to 100. The maximum allowed value is 500."},"pageToken":{"type":"string","description":"Page token to retrieve a specific page of results in the list."},"q":{"type":"string","description":"Only return messages matching the specified query. Supports the same query format as the Gmail search box. Cannot be used with the gmail.metadata scope."},"labelIds":{"type":"array","items":{"type":"string","description":"A label ID to filter messages by."},"description":"Only return messages with labels that match all of the specified label IDs."},"includeSpamTrash":{"type":"boolean","description":"Include messages from SPAM and TRASH in the results."}},"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"messages":{"type":"array","description":"List of messages. Each message contains only an id and a threadId.","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true}},"nextPageToken":{"type":"string","description":"Token to retrieve the next page of results in the list."},"resultSizeEstimate":{"type":"integer","description":"Estimated total number of results."}},"required":[],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{id}/modify","method":"POST","name":"users.messages.modify","description":"Modifies the labels on the specified Gmail message by adding or removing label IDs.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the message to modify."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the message to modify."},"body":{"type":"object","properties":{"addLabelIds":{"type":"array","items":{"type":"string","description":"A label ID to add to the message."},"maxItems":100,"description":"A list of IDs of labels to add to this message. You can add up to 100 labels with each update."},"removeLabelIds":{"type":"array","items":{"type":"string","description":"A label ID to remove from the message."},"maxItems":100,"description":"A list of IDs of labels to remove from this message. You can remove up to 100 labels with each update."}},"additionalProperties":false,"description":"Request body specifying which labels to add or remove from the message."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string","description":"A label ID applied to the message."},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"required":["id"],"additionalProperties":true,"description":"A Message resource representing the modified message."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/send","method":"POST","name":"users.messages.send","description":"Sends the specified message to the recipients in the To, Cc, and Bcc headers.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the send message endpoint."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message, including headers and body.","properties":{"partId":{"type":"string","description":"The part ID of the payload."},"mimeType":{"type":"string","description":"The MIME type of the message part."},"filename":{"type":"string","description":"Filename of the attachment."},"headers":{"type":"array","description":"List of headers for this part.","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the header."},"value":{"type":"string","description":"The value of the header."}},"required":["name","value"],"additionalProperties":false}},"body":{"type":"object","description":"The message part body for this part.","properties":{"size":{"type":"integer","description":"Number of bytes for the message part body."},"data":{"type":"string","description":"The body data of the message part, which may be encoded as base64url."},"attachmentId":{"type":"string","description":"Attachment ID if the body is an attachment."}},"additionalProperties":false},"parts":{"type":"array","description":"Child parts of this message part.","items":{"$ref":"#/properties/payload"}}},"additionalProperties":false},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"required":[],"additionalProperties":false,"description":"The message to send. Should be a Message resource."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID of the sent message."},"threadId":{"type":"string","description":"The ID of the thread the sent message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to the sent message."},"snippet":{"type":"string","description":"A short part of the sent message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the sent message, including headers and body.","properties":{"partId":{"type":"string","description":"The part ID of the payload."},"mimeType":{"type":"string","description":"The MIME type of the message part."},"filename":{"type":"string","description":"Filename of the attachment."},"headers":{"type":"array","description":"List of headers for this part.","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the header."},"value":{"type":"string","description":"The value of the header."}},"required":["name","value"],"additionalProperties":false}},"body":{"type":"object","description":"The message part body for this part.","properties":{"size":{"type":"integer","description":"Number of bytes for the message part body."},"data":{"type":"string","description":"The body data of the message part, which may be encoded as base64url."},"attachmentId":{"type":"string","description":"Attachment ID if the body is an attachment."}},"additionalProperties":false},"parts":{"type":"array","description":"Child parts of this message part.","items":{"$ref":"#/properties/payload"}}},"additionalProperties":false},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the sent message."},"raw":{"type":"string","description":"The entire sent email message in an RFC 2822 formatted and base64url encoded string."}},"required":[],"additionalProperties":false,"description":"The sent message resource."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.send"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{id}/trash","method":"POST","name":"users.messages.trash","description":"Moves the specified message to the trash.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the message to Trash."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the message to trash."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A Message resource representing the trashed message.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","items":{"type":"string"},"description":"List of IDs of labels applied to this message."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms), as a string."},"payload":{"type":"object","description":"The parsed email structure in the message parts.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"required":["id"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{id}/untrash","method":"POST","name":"users.messages.untrash","description":"Removes the specified message from the trash.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the message to remove from Trash."}},"required":["userId","id"],"additionalProperties":false},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A Message resource representing the untrashed message.","properties":{"id":{"type":"string","description":"The immutable ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","description":"List of IDs of labels applied to this message.","items":{"type":"string"}},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms), as a string."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."},"raw":{"type":"string","description":"The entire email message in an RFC 2822 formatted and base64url encoded string."}},"required":["id"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/messages/{messageId}/attachments/{id}","method":"GET","name":"users.messages.attachments.get","description":"Gets the specified message attachment.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"messageId":{"type":"string","description":"The ID of the message containing the attachment."},"id":{"type":"string","description":"The ID of the attachment."}},"required":["userId","messageId","id"],"additionalProperties":false,"description":"Path parameters identifying the user, message, and attachment."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"size":{"type":"integer","description":"The size of the attachment in bytes."},"data":{"type":"string","description":"The body data of the attachment as a base64url encoded string."},"attachmentId":{"type":"string","description":"When present, contains the ID of the attachment."}},"required":["data"],"additionalProperties":false,"description":"The body of the message part containing the attachment data."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/autoForwarding","method":"GET","name":"users.settings.getAutoForwarding","description":"Gets the auto-forwarding setting for the specified Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"responses":{"200":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether auto-forwarding is enabled for this account."},"emailAddress":{"type":"string","format":"email","description":"Email address to which all incoming messages are forwarded. This property is only present if auto-forwarding is enabled."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead"],"description":"The action to take on messages after forwarding them."}},"required":["enabled"],"additionalProperties":false,"description":"AutoForwarding settings for the specified account."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/imap","method":"GET","name":"users.settings.getImap","description":"Gets IMAP settings for the specified user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether IMAP is enabled for the account."},"autoExpunge":{"type":"boolean","description":"If true, messages are expunged from the server immediately after they are marked as deleted."},"expungeBehavior":{"type":"string","description":"Specifies what happens when a message is marked as deleted and expunged. Possible values include 'archive', 'deleteForever', or 'trash'."},"maxFolderSize":{"type":"integer","description":"The maximum number of messages per folder. A value of 0 indicates no limit."}},"required":[],"additionalProperties":false,"description":"IMAP settings for the user."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/language","method":"GET","name":"users.settings.getLanguage","description":"Gets the language settings for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"languageTag":{"type":"string","description":"The IETF BCP 47 language tag (e.g., 'en', 'fr', 'ja')."},"displayLanguage":{"type":"string","description":"The display language as shown in the Gmail UI."}},"required":["languageTag"],"additionalProperties":true,"description":"Language settings for the user."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/pop","method":"GET","name":"users.settings.getPop","description":"Gets the POP settings for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"accessWindow":{"type":"string","enum":["allMail","fromNowOn","unspecified"],"description":"The range of messages which are accessible via POP. Possible values: 'allMail', 'fromNowOn', or 'unspecified'."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead","unspecified"],"description":"What to do with messages after they are fetched via POP. Possible values: 'leaveInInbox', 'archive', 'trash', 'markRead', or 'unspecified'."},"enabled":{"type":"boolean","description":"Whether POP is enabled for the account."}},"required":[],"additionalProperties":false,"description":"The POP settings for the user."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/vacation","method":"GET","name":"users.settings.getVacation","description":"Gets vacation responder settings for the specified user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"enableAutoReply":{"type":"boolean","description":"Whether the vacation responder is enabled."},"responseSubject":{"type":"string","description":"Subject line for vacation responder messages."},"responseBodyPlainText":{"type":"string","description":"Plain text body of the vacation responder message."},"responseBodyHtml":{"type":"string","description":"HTML body of the vacation responder message."},"restrictToContacts":{"type":"boolean","description":"Whether responses are restricted to user's contacts."},"restrictToDomain":{"type":"boolean","description":"Whether responses are restricted to users in the same domain."},"startTime":{"type":"string","format":"int64","description":"Start time of the vacation in milliseconds since epoch."},"endTime":{"type":"string","format":"int64","description":"End time of the vacation in milliseconds since epoch."}},"required":["enableAutoReply"],"additionalProperties":false,"description":"Vacation responder settings for the user."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/autoForwarding","method":"PUT","name":"users.settings.updateAutoForwarding","description":"Updates the auto-forwarding setting for the specified Gmail account. A verified forwarding address must be specified when auto-forwarding is enabled. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether auto-forwarding is enabled for this account."},"emailAddress":{"type":"string","description":"Email address to which all incoming messages are forwarded. This address must be a verified forwarding address."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead"],"description":"Action to take on messages after forwarding. Possible values: 'leaveInInbox', 'archive', 'trash', 'markRead'."}},"required":[],"additionalProperties":false,"description":"AutoForwarding settings to update for the user."},"responses":{"200":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether auto-forwarding is enabled for this account."},"emailAddress":{"type":"string","description":"Email address to which all incoming messages are forwarded. This address must be a verified forwarding address."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead"],"description":"Action to take on messages after forwarding. Possible values: 'leaveInInbox', 'archive', 'trash', 'markRead'."}},"required":[],"additionalProperties":false,"description":"The updated AutoForwarding settings for the user."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/imap","method":"PUT","name":"users.settings.updateImap","description":"Updates IMAP settings for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether IMAP is enabled for the account."},"autoExpunge":{"type":"boolean","description":"Whether to expunge messages when they are marked as deleted."},"expungeBehavior":{"type":"string","enum":["EXPUNGE_BEHAVIOR_UNSPECIFIED","ARCHIVE","DELETE_FOREVER","TRASH"],"description":"The action to take when a message is expunged."},"maxFolderSize":{"type":"integer","description":"The maximum number of messages per folder."}},"additionalProperties":false,"description":"IMAP settings to update."},"responses":{"200":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether IMAP is enabled for the account."},"autoExpunge":{"type":"boolean","description":"Whether to expunge messages when they are marked as deleted."},"expungeBehavior":{"type":"string","enum":["EXPUNGE_BEHAVIOR_UNSPECIFIED","ARCHIVE","DELETE_FOREVER","TRASH"],"description":"The action to take when a message is expunged."},"maxFolderSize":{"type":"integer","description":"The maximum number of messages per folder."}},"additionalProperties":false,"description":"The updated IMAP settings."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/language","method":"PUT","name":"users.settings.updateLanguage","description":"Updates the language settings for a Gmail user. If successful, returns the displayLanguage that was saved for the user, which may differ from the requested value if a close variant is chosen.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"displayLanguage":{"type":"string","description":"The requested display language for the user. May not be directly supported and could be substituted with a close variant."}},"required":["displayLanguage"],"additionalProperties":false,"description":"Language settings to update for the user."},"responses":{"200":{"type":"object","properties":{"displayLanguage":{"type":"string","description":"The display language that was saved for the user, which may differ from the requested value if a close variant is chosen."}},"required":["displayLanguage"],"additionalProperties":false,"description":"The updated language settings for the user."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/pop","method":"PUT","name":"users.settings.updatePop","description":"Updates the POP settings for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"accessWindow":{"type":"string","enum":["allMail","fromNowOn"],"description":"The range of messages which are accessible via POP. Acceptable values are: 'allMail' (all messages are accessible), 'fromNowOn' (only mail received after the time this setting is changed is accessible)."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead"],"description":"What to do with messages after they are fetched via POP. Acceptable values are: 'leaveInInbox', 'archive', 'trash', 'markRead'."},"enabled":{"type":"boolean","description":"Whether POP is enabled for the account."}},"required":[],"additionalProperties":false,"description":"The POP settings to update."},"responses":{"200":{"type":"object","properties":{"accessWindow":{"type":"string","enum":["allMail","fromNowOn"],"description":"The range of messages which are accessible via POP."},"disposition":{"type":"string","enum":["leaveInInbox","archive","trash","markRead"],"description":"What to do with messages after they are fetched via POP."},"enabled":{"type":"boolean","description":"Whether POP is enabled for the account."}},"required":[],"additionalProperties":false,"description":"The updated POP settings."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/vacation","method":"PUT","name":"users.settings.updateVacation","description":"Updates vacation responder settings for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"enableAutoReply":{"type":"boolean","description":"Whether the vacation responder is enabled."},"responseSubject":{"type":"string","description":"Subject line for the vacation responder email."},"responseBodyPlainText":{"type":"string","description":"Plain text body of the vacation responder email."},"responseBodyHtml":{"type":"string","description":"HTML body of the vacation responder email."},"restrictToContacts":{"type":"boolean","description":"Whether responses are restricted to user's contacts."},"restrictToDomain":{"type":"boolean","description":"Whether responses are restricted to users in the same domain."},"startTime":{"type":"string","format":"int64","description":"Start time of the vacation in milliseconds since epoch."},"endTime":{"type":"string","format":"int64","description":"End time of the vacation in milliseconds since epoch."}},"additionalProperties":false,"description":"Vacation responder settings to update."},"responses":{"200":{"type":"object","properties":{"enableAutoReply":{"type":"boolean","description":"Whether the vacation responder is enabled."},"responseSubject":{"type":"string","description":"Subject line for the vacation responder email."},"responseBodyPlainText":{"type":"string","description":"Plain text body of the vacation responder email."},"responseBodyHtml":{"type":"string","description":"HTML body of the vacation responder email."},"restrictToContacts":{"type":"boolean","description":"Whether responses are restricted to user's contacts."},"restrictToDomain":{"type":"boolean","description":"Whether responses are restricted to users in the same domain."},"startTime":{"type":"string","format":"int64","description":"Start time of the vacation in milliseconds since epoch."},"endTime":{"type":"string","format":"int64","description":"End time of the vacation in milliseconds since epoch."}},"additionalProperties":false,"description":"Vacation responder settings after update."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/identities","method":"POST","name":"users.settings.cse.identities.create","description":"Creates and configures a client-side encryption identity authorized to send mail from the user account. Publishes the S/MIME certificate to a shared domain-wide directory for organization-wide encryption and mail sending.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"emailAddress":{"type":"string","description":"The email address associated with the client-side encryption identity."},"certificate":{"type":"string","description":"The S/MIME certificate in base64-encoded format to be published and used for encryption."},"privateKey":{"type":"string","description":"The private key associated with the S/MIME certificate, in base64-encoded format."},"encryptedKeyPassword":{"type":"string","description":"The password used to encrypt the private key, if applicable."},"displayName":{"type":"string","description":"The display name for the identity."}},"required":["emailAddress","certificate","privateKey"],"additionalProperties":false,"description":"CseIdentity object containing the configuration for the client-side encryption identity."},"responses":{"200":{"type":"object","properties":{"emailAddress":{"type":"string","description":"The email address associated with the created client-side encryption identity."},"certificate":{"type":"string","description":"The S/MIME certificate in base64-encoded format."},"displayName":{"type":"string","description":"The display name for the identity."},"state":{"type":"string","description":"The current state of the identity (e.g., ACTIVE, INACTIVE)."}},"required":["emailAddress","certificate"],"additionalProperties":false,"description":"A newly created instance of CseIdentity."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/identities/{cseEmailAddress}","method":"DELETE","name":"users.settings.cse.identities.delete","description":"Deletes a client-side encryption identity. The authenticated user can no longer use the identity to send encrypted messages. The identity cannot be restored after deletion; use identities.create to create a new identity with the same configuration.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"cseEmailAddress":{"type":"string","description":"The primary email address associated with the client-side encryption identity configuration to be removed."}},"required":["userId","cseEmailAddress"],"additionalProperties":false,"description":"Path parameters identifying the user and the client-side encryption identity to delete."},"body":{"type":"object","description":"The request body must be empty.","additionalProperties":false,"properties":{}},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful deletion.","additionalProperties":false,"properties":{}}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/identities/{cseEmailAddress}","method":"GET","name":"users.settings.cse.identities.get","description":"Retrieves a client-side encryption identity configuration for a specified user and CSE email address.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"cseEmailAddress":{"type":"string","description":"The primary email address associated with the client-side encryption identity configuration to retrieve."}},"required":["userId","cseEmailAddress"],"additionalProperties":false,"description":"Path parameters identifying the user and the CSE identity."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"$ref":"#/definitions/CseIdentity","description":"The client-side encryption identity configuration."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/identities","method":"GET","name":"users.settings.cse.identities.list","description":"Lists the client-side encrypted identities for an authenticated user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"pageToken":{"type":"string","description":"Pagination token indicating which page of identities to return. If not supplied, the API returns the first page."},"pageSize":{"type":"integer","description":"The number of identities to return. Defaults to 20 if not provided."}},"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"cseIdentities":{"type":"array","description":"One page of the list of CSE identities configured for the user.","items":{"type":"object","description":"A client-side encrypted identity. (CseIdentity object structure is not detailed in the document.)","additionalProperties":true}},"nextPageToken":{"type":"string","description":"Pagination token to retrieve the next page of identities. If empty or not returned, no further pages remain."}},"required":["cseIdentities"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/identities/{emailAddress}","method":"PATCH","name":"users.settings.cse.identities.patch","description":"Associates a different key pair with an existing client-side encryption identity. The updated key pair must validate against Google's S/MIME certificate profiles.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"emailAddress":{"type":"string","description":"The email address of the client-side encryption identity to update."}},"required":["userId","emailAddress"],"additionalProperties":false,"description":"Path parameters identifying the user and the CSE identity."},"body":{"$ref":"#/definitions/CseIdentity","description":"The updated CseIdentity object containing the new key pair."},"responses":{"200":{"$ref":"#/definitions/CseIdentity","description":"The updated CseIdentity object after the key pair has been associated."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs","method":"POST","name":"users.settings.cse.keypairs.create","description":"Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value 'me'."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"$ref":"#/definitions/CseKeyPair","description":"The request body contains an instance of CseKeyPair."},"responses":{"200":{"$ref":"#/definitions/CseKeyPair","description":"A newly created instance of CseKeyPair."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs/{keyPairId}:disable","method":"POST","name":"users.settings.cse.keypairs.disable","description":"Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the keypairs.enable to turn on the key pair. After 30 days, you can permanently delete the key pair by using the keypairs.obliterate method.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value 'me'."},"keyPairId":{"type":"string","description":"The identifier of the key pair to turn off."}},"required":["userId","keyPairId"],"additionalProperties":false,"description":"Path parameters identifying the user and key pair."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A CseKeyPair resource representing the key pair that was disabled.","properties":{"keyPairId":{"type":"string","description":"The unique identifier of the key pair."},"status":{"type":"string","description":"The status of the key pair, such as 'ENABLED' or 'DISABLED'."},"createTime":{"type":"string","format":"date-time","description":"Timestamp when the key pair was created."},"disableTime":{"type":"string","format":"date-time","description":"Timestamp when the key pair was disabled."},"publicKey":{"type":"string","description":"The public key material in PEM format."},"algorithm":{"type":"string","description":"The cryptographic algorithm used by the key pair."}},"required":["keyPairId","status"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs/{keyPairId}:enable","method":"POST","name":"users.settings.cse.keypairs.enable","description":"Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"keyPairId":{"type":"string","description":"The identifier of the key pair to turn on."}},"required":["userId","keyPairId"],"additionalProperties":false,"description":"Path parameters identifying the user and key pair."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A CseKeyPair resource representing the enabled key pair.","properties":{"keyPairId":{"type":"string","description":"The unique identifier of the key pair."},"status":{"type":"string","description":"The status of the key pair, such as 'ENABLED' or 'DISABLED'."},"createTime":{"type":"string","format":"date-time","description":"The creation time of the key pair."},"updateTime":{"type":"string","format":"date-time","description":"The last update time of the key pair."},"identities":{"type":"array","description":"List of client-side encryption identities associated with this key pair.","items":{"type":"string","description":"A client-side encryption identity."}}},"required":["keyPairId","status"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs/{keyPairId}","method":"GET","name":"users.settings.cse.keypairs.get","description":"Retrieves an existing client-side encryption key pair.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"keyPairId":{"type":"string","description":"The identifier of the key pair to retrieve."}},"required":["userId","keyPairId"],"additionalProperties":false,"description":"Path parameters identifying the user and key pair."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","description":"A CseKeyPair resource representing the client-side encryption key pair.","properties":{"keyPairId":{"type":"string","description":"The unique identifier of the key pair."},"publicKey":{"type":"string","description":"The public key of the key pair, encoded as a string."},"creationTime":{"type":"string","format":"date-time","description":"The timestamp when the key pair was created."},"expirationTime":{"type":"string","format":"date-time","description":"The timestamp when the key pair expires."},"status":{"type":"string","description":"The status of the key pair (e.g., 'ACTIVE', 'INACTIVE')."}},"required":["keyPairId","publicKey"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs","method":"GET","name":"users.settings.cse.keypairs.list","description":"Lists client-side encryption key pairs for an authenticated user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"pageToken":{"type":"string","description":"Pagination token indicating which page of key pairs to return. If not supplied, the API returns the first page."},"pageSize":{"type":"integer","description":"The number of key pairs to return. Defaults to 20 if not provided."}},"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"cseKeyPairs":{"type":"array","description":"One page of the list of CSE key pairs installed for the user.","items":{"type":"object","description":"A client-side encryption key pair. (CseKeyPair object)","additionalProperties":true}},"nextPageToken":{"type":"string","description":"Pagination token to retrieve the next page of key pairs. If not returned, no further pages remain."}},"required":["cseKeyPairs"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate","method":"POST","name":"users.settings.cse.keypairs.obliterate","description":"Permanently and immediately deletes a client-side encryption key pair that has been turned off for more than 30 days. This action cannot be undone and encrypted messages cannot be restored or decrypted after obliteration.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The requester's primary email address. Use 'me' to indicate the authenticated user."},"keyPairId":{"type":"string","description":"The identifier of the key pair to obliterate."}},"required":["userId","keyPairId"],"additionalProperties":false,"description":"Path parameters identifying the user and key pair to obliterate."},"body":{"type":"object","description":"The request body must be empty.","additionalProperties":false,"properties":{}},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful obliteration of the key pair.","additionalProperties":false,"properties":{}}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/delegates","method":"POST","name":"users.settings.delegates.create","description":"Adds a delegate to a user's Gmail account with verification status set to accepted, without sending a verification email. The delegate must be in the same Google Workspace organization as the delegator. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"delegateEmail":{"type":"string","description":"The email address of the delegate. Must be the delegate's primary email address, not an alias."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"The verification status of the delegate. For this method, it is set directly to 'accepted'."}},"required":["delegateEmail"],"additionalProperties":false,"description":"Delegate object containing information about the delegate to be added."},"responses":{"200":{"type":"object","properties":{"delegateEmail":{"type":"string","description":"The email address of the delegate. Must be the delegate's primary email address, not an alias."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"The verification status of the delegate."}},"required":["delegateEmail","verificationStatus"],"additionalProperties":false,"description":"A newly created Delegate object."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/delegates/{delegateEmail}","method":"DELETE","name":"users.settings.delegates.delete","description":"Removes the specified delegate (of any verification status) from a user's Gmail account and revokes any required verification. Only available to service account clients with domain-wide authority. The delegate must be specified by their primary email address.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"delegateEmail":{"type":"string","description":"The email address of the user to be removed as a delegate."}},"required":["userId","delegateEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the delegate to remove."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"Empty response object returned upon successful removal of the delegate.","properties":{},"additionalProperties":false}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/delegates/{delegateEmail}","method":"GET","name":"users.settings.delegates.get","description":"Gets the specified delegate. The delegate user must be referred to by their primary email address, not an alias. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"delegateEmail":{"type":"string","description":"The email address of the user whose delegate relationship is to be retrieved."}},"required":["userId","delegateEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and delegate."},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{"delegateEmail":{"type":"string","description":"The email address of the delegate."},"verificationStatus":{"type":"string","description":"Indicates whether the delegate has verified their account and is able to access the mailbox. Possible values include 'accepted', 'pending', etc."}},"required":["delegateEmail","verificationStatus"],"additionalProperties":true,"description":"A Delegate resource representing the delegate relationship."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/delegates","method":"GET","name":"users.settings.delegates.list","description":"Lists the delegates for the specified Gmail account. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"delegates":{"type":"array","description":"List of the user's delegates (with any verification status). If an account doesn't have delegates, this field doesn't appear.","items":{"type":"object","description":"Delegate object representing a user's delegate.","properties":{},"additionalProperties":true}}},"required":[],"additionalProperties":false,"description":"Response for the delegates.list method."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/filters","method":"POST","name":"users.settings.filters.create","description":"Creates a filter for the specified user. You can create up to 1,000 filters per user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"$ref":"#/definitions/Filter","description":"The filter to be created."},"responses":{"200":{"$ref":"#/definitions/Filter","description":"A newly created instance of Filter."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/filters/{id}","method":"DELETE","name":"users.settings.filters.delete","description":"Immediately and permanently deletes the specified filter from the user's Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the filter to be deleted."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the filter to delete."},"body":{"type":"object","properties":{},"additionalProperties":false,"description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{},"additionalProperties":false,"description":"An empty JSON object returned upon successful deletion."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/filters/{id}","method":"GET","name":"users.settings.filters.get","description":"Gets a filter for a specified user in Gmail by filter ID.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the filter to be fetched."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the filter."},"responses":{"200":{"type":"object","description":"A Filter resource representing the Gmail filter.","properties":{"id":{"type":"string","description":"The server assigned ID of the filter."},"criteria":{"type":"object","description":"The criteria that define the filter.","properties":{"from":{"type":"string","description":"The sender's email address to match."},"to":{"type":"string","description":"The recipient's email address to match."},"subject":{"type":"string","description":"The subject line to match."},"query":{"type":"string","description":"The Gmail search query to match."},"negatedQuery":{"type":"string","description":"The Gmail search query to exclude from matching."},"hasAttachment":{"type":"boolean","description":"Whether the message has an attachment."},"size":{"type":"integer","description":"The size of the message in bytes."},"sizeComparison":{"type":"string","enum":["larger","smaller"],"description":"How the size is compared: 'larger' or 'smaller'."}},"additionalProperties":false},"action":{"type":"object","description":"The action to perform on messages that match the criteria.","properties":{"addLabelIds":{"type":"array","items":{"type":"string"},"description":"List of label IDs to add to the message."},"removeLabelIds":{"type":"array","items":{"type":"string"},"description":"List of label IDs to remove from the message."},"forward":{"type":"string","description":"Email address to forward matching messages to."}},"additionalProperties":false}},"required":["id"],"additionalProperties":false}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/filters","method":"GET","name":"users.settings.filters.list","description":"Lists the message filters of a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"responses":{"200":{"type":"object","properties":{"filter":{"type":"array","description":"List of a user's filters.","items":{"type":"object","description":"A filter object.","properties":{},"additionalProperties":true}}},"required":["filter"],"additionalProperties":false,"description":"Response for the filters.list method."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/forwardingAddresses","method":"POST","name":"users.settings.forwardingAddresses.create","description":"Creates a forwarding address for a Gmail user. If ownership verification is required, a message will be sent to the recipient and the verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"body":{"type":"object","properties":{"forwardingEmail":{"type":"string","format":"email","description":"An email address to which messages will be forwarded."}},"required":["forwardingEmail"],"additionalProperties":false,"description":"The forwarding address to be created."},"responses":{"200":{"type":"object","properties":{"forwardingEmail":{"type":"string","format":"email","description":"The forwarding email address that was created."},"verificationStatus":{"type":"string","enum":["accepted","pending"],"description":"Indicates whether the forwarding address has been verified. 'pending' if verification is required and not yet completed; 'accepted' if verification is complete or not required."}},"required":["forwardingEmail","verificationStatus"],"additionalProperties":false,"description":"A newly created instance of ForwardingAddress."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/forwardingAddresses/{forwardingEmail}","method":"DELETE","name":"users.settings.forwardingAddresses.delete","description":"Deletes the specified forwarding address and revokes any verification that may have been required. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"forwardingEmail":{"type":"string","description":"The forwarding address to be deleted."}},"required":["userId","forwardingEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and forwarding address to delete."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"Empty response object returned upon successful deletion.","properties":{},"additionalProperties":false}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/forwardingAddresses/{forwardingEmail}","method":"GET","name":"users.settings.forwardingAddresses.get","description":"Gets the specified forwarding address for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"forwardingEmail":{"type":"string","description":"The forwarding address to be retrieved."}},"required":["userId","forwardingEmail"],"additionalProperties":false},"body":{"type":"null","description":"The request body must be empty."},"responses":{"200":{"type":"object","title":"ForwardingAddress","description":"A forwarding address resource.","properties":{"forwardingEmail":{"type":"string","description":"An email address to which messages are forwarded."},"verificationStatus":{"type":"string","description":"Indicates whether this address has been verified and is usable for forwarding. Possible values: 'accepted', 'pending'."}},"required":["forwardingEmail","verificationStatus"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/forwardingAddresses","method":"GET","name":"users.settings.forwardingAddresses.list","description":"Lists the forwarding addresses for the specified Gmail account.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"responses":{"200":{"type":"object","properties":{"forwardingAddresses":{"type":"array","description":"List of addresses that may be used for forwarding.","items":{"type":"object","description":"A forwarding address associated with the user's account.","properties":{"forwardingEmail":{"type":"string","description":"An email address to which messages can be forwarded."},"verificationStatus":{"type":"string","description":"Indicates whether this address has been verified and is usable for forwarding. Possible values: 'accepted', 'pending'."}},"required":["forwardingEmail","verificationStatus"],"additionalProperties":false}}},"required":["forwardingAddresses"],"additionalProperties":false,"description":"Response for the forwardingAddresses.list method."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs","method":"POST","name":"users.settings.sendAs.create","description":"Creates a custom 'from' send-as alias for a Gmail user. If an SMTP MSA is specified, Gmail will attempt to validate the configuration. If ownership verification is required, a message will be sent to the alias and verification status will be set to pending; otherwise, it will be set to accepted. HTML signatures will be sanitized. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"body":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages sent using this alias. Gmail will sanitize the HTML before saving."},"isPrimary":{"type":"boolean","description":"Whether this address is the primary address that appears in the 'From:' header."},"isDefault":{"type":"boolean","description":"Whether this address is the default 'From:' address for the account."},"treatAsAlias":{"type":"boolean","description":"Whether Gmail should treat this address as an alias for the user's primary email address."},"smtpMsa":{"type":"object","description":"Configuration for an SMTP mail submission agent (MSA) to send mail through.","properties":{"host":{"type":"string","description":"The hostname of the SMTP server."},"port":{"type":"integer","description":"The port of the SMTP server."},"username":{"type":"string","description":"The username that will be used to authenticate with the SMTP server."},"password":{"type":"string","description":"The password that will be used to authenticate with the SMTP server."},"securityMode":{"type":"string","enum":["none","ssl","starttls"],"description":"The type of encryption to use when connecting to the SMTP server."}},"required":["host","port","username","password","securityMode"],"additionalProperties":false},"verificationStatus":{"type":"string","enum":["accepted","pending"],"description":"Indicates whether ownership of the alias has been verified. Set to 'pending' if verification is required, otherwise 'accepted'."}},"required":["sendAsEmail"],"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages sent using this alias."},"isPrimary":{"type":"boolean","description":"Whether this address is the primary address that appears in the 'From:' header."},"isDefault":{"type":"boolean","description":"Whether this address is the default 'From:' address for the account."},"treatAsAlias":{"type":"boolean","description":"Whether Gmail should treat this address as an alias for the user's primary email address."},"smtpMsa":{"type":"object","description":"Configuration for an SMTP mail submission agent (MSA) to send mail through.","properties":{"host":{"type":"string","description":"The hostname of the SMTP server."},"port":{"type":"integer","description":"The port of the SMTP server."},"username":{"type":"string","description":"The username that will be used to authenticate with the SMTP server."},"securityMode":{"type":"string","enum":["none","ssl","starttls"],"description":"The type of encryption to use when connecting to the SMTP server."}},"required":["host","port","username","securityMode"],"additionalProperties":false},"verificationStatus":{"type":"string","enum":["accepted","pending"],"description":"Indicates whether ownership of the alias has been verified."}},"required":["sendAsEmail"],"additionalProperties":false}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}","method":"DELETE","name":"users.settings.sendAs.delete","description":"Deletes the specified send-as alias for a Gmail user. Revokes any verification that may have been required for using it. Only available to service account clients with domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The send-as alias email address to be deleted."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias to delete."},"body":{"type":"object","description":"The request body must be empty.","additionalProperties":false,"properties":{}},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful deletion of the send-as alias.","additionalProperties":false,"properties":{}}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}","method":"GET","name":"users.settings.sendAs.get","description":"Gets the specified send-as alias for a Gmail user. Returns an HTTP 404 error if the specified address is not a member of the collection.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The send-as alias to be retrieved."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias."},"responses":{"200":{"$ref":"#/definitions/SendAs","description":"A SendAs resource representing the send-as alias."},"404":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A description of the error."},"status":{"type":"string","description":"The status of the error."}},"required":["code","message","status"],"description":"Error information for a failed request."}},"required":["error"],"description":"Error response when the specified send-as alias is not found."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs","method":"GET","name":"users.settings.sendAs.list","description":"Lists the send-as aliases for the specified Gmail account, including the primary send-as address and any custom 'from' aliases.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false,"description":"Path parameters for the request."},"responses":{"200":{"type":"object","properties":{"sendAs":{"type":"array","description":"List of send-as aliases.","items":{"type":"object","description":"A send-as alias associated with the account.","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to outgoing messages sent using this alias."},"isPrimary":{"type":"boolean","description":"Whether this address is the primary address for the account."},"isDefault":{"type":"boolean","description":"Whether this address is the default 'From:' address for the account."},"treatAsAlias":{"type":"boolean","description":"Whether Gmail should treat this address as an alias for the user's primary email address."},"verificationStatus":{"type":"string","description":"Indicates whether this address has been verified. Possible values: 'accepted', 'pending', 'rejected'."},"smtpMsa":{"type":"object","description":"SMTP server settings for sending mail through a custom SMTP server.","properties":{"host":{"type":"string","description":"The hostname of the SMTP server."},"port":{"type":"integer","description":"The port of the SMTP server."},"username":{"type":"string","description":"The username for the SMTP server."},"password":{"type":"string","description":"The password for the SMTP server."},"securityMode":{"type":"string","description":"The security mode to use for the SMTP server. Possible values: 'none', 'ssl', 'starttls'."}},"required":[],"additionalProperties":false}},"required":["sendAsEmail"],"additionalProperties":false}}},"required":["sendAs"],"additionalProperties":false,"description":"Response for the sendAs.list method."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}","method":"PATCH","name":"users.settings.sendAs.patch","description":"Patch the specified send-as alias for a Gmail user.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The send-as alias to be updated."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias."},"body":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages composed with this alias in the Gmail web UI."},"isPrimary":{"type":"boolean","description":"Whether this address is the primary address that appears in the 'From:' header."},"isDefault":{"type":"boolean","description":"Whether this address is the default 'From:' address."},"treatAsAlias":{"type":"boolean","description":"Whether Gmail should treat this address as an alias for the user's primary email address."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"Indicates whether this address has been verified for use as a send-as alias."},"smtpMsa":{"type":"object","properties":{"host":{"type":"string","description":"The hostname of the SMTP service."},"port":{"type":"integer","description":"The port of the SMTP service."},"username":{"type":"string","description":"The username that will be used for SMTP authentication."},"password":{"type":"string","description":"The password that will be used for SMTP authentication."},"securityMode":{"type":"string","enum":["none","ssl","starttls"],"description":"The protocol that will be used to secure communication with the SMTP service."}},"required":["host","port","username","password","securityMode"],"additionalProperties":false,"description":"Configuration for custom SMTP server for this alias."}},"additionalProperties":false,"description":"The SendAs resource containing updated alias settings."},"responses":{"200":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages composed with this alias in the Gmail web UI."},"isPrimary":{"type":"boolean","description":"Whether this address is the primary address that appears in the 'From:' header."},"isDefault":{"type":"boolean","description":"Whether this address is the default 'From:' address."},"treatAsAlias":{"type":"boolean","description":"Whether Gmail should treat this address as an alias for the user's primary email address."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"Indicates whether this address has been verified for use as a send-as alias."},"smtpMsa":{"type":"object","properties":{"host":{"type":"string","description":"The hostname of the SMTP service."},"port":{"type":"integer","description":"The port of the SMTP service."},"username":{"type":"string","description":"The username that will be used for SMTP authentication."},"securityMode":{"type":"string","enum":["none","ssl","starttls"],"description":"The protocol that will be used to secure communication with the SMTP service."}},"required":["host","port","username","securityMode"],"additionalProperties":false,"description":"Configuration for custom SMTP server for this alias."}},"additionalProperties":false,"description":"The updated SendAs resource."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}","method":"PUT","name":"users.settings.sendAs.update","description":"Updates a send-as alias for a Gmail user. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. Only service account clients with domain-wide authority can update addresses other than the primary address.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The send-as alias to be updated."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias."},"body":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages sent using this alias. Gmail will sanitize the HTML before saving."},"isPrimary":{"type":"boolean","description":"Indicates whether this address is the primary address for the account."},"isDefault":{"type":"boolean","description":"Indicates whether this address is the default 'From:' address for the account."},"treatAsAlias":{"type":"boolean","description":"Indicates whether Gmail should treat this address as an alias for the user's primary email address."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"Indicates whether this address has been verified for use as a send-as alias."}},"additionalProperties":false,"description":"The SendAs resource representing the send-as alias to update."},"responses":{"200":{"type":"object","properties":{"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"displayName":{"type":"string","description":"A name that appears in the 'From:' header for mail sent using this alias."},"replyToAddress":{"type":"string","description":"An optional email address that is included in a 'Reply-To:' header for mail sent using this alias."},"signature":{"type":"string","description":"An optional HTML signature that is appended to messages sent using this alias."},"isPrimary":{"type":"boolean","description":"Indicates whether this address is the primary address for the account."},"isDefault":{"type":"boolean","description":"Indicates whether this address is the default 'From:' address for the account."},"treatAsAlias":{"type":"boolean","description":"Indicates whether Gmail should treat this address as an alias for the user's primary email address."},"verificationStatus":{"type":"string","enum":["accepted","pending","rejected"],"description":"Indicates whether this address has been verified for use as a send-as alias."}},"additionalProperties":false,"description":"The updated SendAs resource."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/verify","method":"POST","name":"users.settings.sendAs.verify","description":"Sends a verification email to the specified send-as alias address. The verification status must be pending. This method is only available to service account clients that have been delegated domain-wide authority.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"User's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The send-as alias to be verified."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias."},"body":{"type":"object","properties":{},"additionalProperties":false,"description":"The request body must be empty."},"responses":{"200":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty response body if the verification email was sent successfully."}}},"requiredScopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}","method":"DELETE","name":"users.settings.sendAs.smimeInfo.delete","description":"Deletes the specified S/MIME config for the specified send-as alias.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"id":{"type":"string","description":"The immutable ID for the SmimeInfo."}},"required":["userId","sendAsEmail","id"],"additionalProperties":false,"description":"Path parameters identifying the user, send-as alias, and S/MIME config to delete."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful deletion.","properties":{},"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}","method":"GET","name":"users.settings.sendAs.smimeInfo.get","description":"Gets the specified S/MIME config for the specified send-as alias.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"id":{"type":"string","description":"The immutable ID for the SmimeInfo."}},"required":["userId","sendAsEmail","id"],"additionalProperties":false},"responses":{"200":{"type":"object","description":"The S/MIME configuration for the specified send-as alias.","properties":{"id":{"type":"string","description":"The immutable ID for the SmimeInfo."},"expiration":{"type":"string","format":"int64","description":"When the certificate expires (in milliseconds since epoch)."},"issuerCn":{"type":"string","description":"The common name of the certificate issuer."},"isDefault":{"type":"boolean","description":"Whether this S/MIME config is the default for this send-as alias."},"pem":{"type":"string","description":"The S/MIME certificate in PEM format."},"pkcs12":{"type":"string","description":"The PKCS#12 data for the certificate, encoded as a base64url string."},"encryptedKeyPassword":{"type":"string","description":"The password for the encrypted private key, if applicable."},"state":{"type":"string","description":"The S/MIME config state. Possible values include 'ENABLED', 'DISABLED', etc."}},"required":["id"],"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","method":"POST","name":"users.settings.sendAs.smimeInfo.insert","description":"Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and the send-as alias."},"body":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID for the SmimeInfo."},"expiration":{"type":"string","format":"int64","description":"When the certificate expires (in milliseconds since epoch)."},"issuerCn":{"type":"string","description":"The common name of the certificate issuer."},"isDefault":{"type":"boolean","description":"Whether this SmimeInfo is the default for this send-as address."},"pem":{"type":"string","description":"The S/MIME certificate in PEM format."},"pkcs12":{"type":"string","description":"The PKCS#12 format S/MIME key and certificate, encoded as a base64 string. Required for upload."},"encryptedKeyPassword":{"type":"string","description":"The password for the encrypted S/MIME key, if applicable."},"smimeVersion":{"type":"integer","description":"The S/MIME protocol version."},"subject":{"type":"string","description":"The subject of the S/MIME certificate."}},"required":["pkcs12"],"additionalProperties":false,"description":"The S/MIME configuration to insert for the send-as alias."},"responses":{"200":{"type":"object","properties":{"id":{"type":"string","description":"The immutable ID for the SmimeInfo."},"expiration":{"type":"string","format":"int64","description":"When the certificate expires (in milliseconds since epoch)."},"issuerCn":{"type":"string","description":"The common name of the certificate issuer."},"isDefault":{"type":"boolean","description":"Whether this SmimeInfo is the default for this send-as address."},"pem":{"type":"string","description":"The S/MIME certificate in PEM format."},"pkcs12":{"type":"string","description":"The PKCS#12 format S/MIME key and certificate, encoded as a base64 string."},"encryptedKeyPassword":{"type":"string","description":"The password for the encrypted S/MIME key, if applicable."},"smimeVersion":{"type":"integer","description":"The S/MIME protocol version."},"subject":{"type":"string","description":"The subject of the S/MIME certificate."}},"required":[],"additionalProperties":false,"description":"A newly created instance of SmimeInfo."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","method":"GET","name":"users.settings.sendAs.smimeInfo.list","description":"Lists S/MIME configs for the specified send-as alias.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."}},"required":["userId","sendAsEmail"],"additionalProperties":false,"description":"Path parameters identifying the user and send-as alias."},"responses":{"200":{"type":"object","properties":{"smimeInfo":{"type":"array","description":"List of S/MIME configurations for the specified send-as alias.","items":{"type":"object","description":"S/MIME configuration for a send-as alias.","properties":{},"additionalProperties":true}}},"required":["smimeInfo"],"additionalProperties":false,"description":"Successful response containing a list of S/MIME configurations."}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","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.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault","method":"POST","name":"users.settings.sendAs.smimeInfo.setDefault","description":"Sets the default S/MIME config for the specified send-as alias.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"sendAsEmail":{"type":"string","description":"The email address that appears in the 'From:' header for mail sent using this alias."},"id":{"type":"string","description":"The immutable ID for the SmimeInfo."}},"required":["userId","sendAsEmail","id"],"additionalProperties":false,"description":"Path parameters identifying the user, send-as alias, and S/MIME info."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"An empty JSON object returned upon successful setting of the default S/MIME config.","properties":{},"additionalProperties":false}}},"requiredScopes":[{"oneOf":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/threads/{id}","method":"DELETE","name":"users.threads.delete","description":"Immediately and permanently deletes the specified thread and all its messages. This operation cannot be undone. Prefer threads.trash instead.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"ID of the Thread to delete."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and thread to delete."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"If successful, the response body is an empty JSON object.","properties":{},"additionalProperties":false}}},"requiredScopes":["https://mail.google.com/"]},{"connectorSlug":"gmail","path":"/users/{userId}/threads/{id}","method":"GET","name":"users.threads.get","description":"Gets the specified thread.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the thread to retrieve."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and thread."},"query":{"type":"object","properties":{"format":{"type":"string","enum":["full","metadata","minimal"],"description":"The format to return the messages in."},"metadataHeaders":{"type":"array","items":{"type":"string","description":"A header name to include when format is METADATA."},"description":"When given and format is METADATA, only include headers specified."}},"additionalProperties":false,"description":"Query parameters for specifying the format and headers to include."},"responses":{"200":{"$ref":"#/components/schemas/Thread","description":"A Thread resource representing the requested thread."}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/threads","method":"GET","name":"users.threads.list","description":"Lists the threads in the user's mailbox.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."}},"required":["userId"],"additionalProperties":false},"query":{"type":"object","properties":{"maxResults":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of threads to return. Defaults to 100. The maximum allowed value is 500."},"pageToken":{"type":"string","description":"Page token to retrieve a specific page of results in the list."},"q":{"type":"string","description":"Only return threads matching the specified query. Supports the same query format as the Gmail search box. Cannot be used with the gmail.metadata scope."},"labelIds":{"type":"array","items":{"type":"string","description":"A label ID to filter threads by."},"description":"Only return threads with labels that match all of the specified label IDs."},"includeSpamTrash":{"type":"boolean","description":"Include threads from SPAM and TRASH in the results."}},"additionalProperties":false},"responses":{"200":{"type":"object","properties":{"threads":{"type":"array","description":"List of threads. Each thread resource does not contain a list of messages.","items":{"$ref":"#/definitions/Thread"}},"nextPageToken":{"type":"string","description":"Page token to retrieve the next page of results in the list."},"resultSizeEstimate":{"type":"integer","description":"Estimated total number of results."}},"required":[],"additionalProperties":false,"definitions":{"Thread":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the thread."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this thread."},"messages":{"type":"array","description":"The list of messages in the thread. Not included in list response.","items":{"type":"object"}}},"additionalProperties":true,"description":"A thread in the user's mailbox."}}}}},"requiredScopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.metadata"]},{"connectorSlug":"gmail","path":"/users/{userId}/threads/{id}/modify","method":"POST","name":"users.threads.modify","description":"Modifies the labels applied to the thread. This applies to all messages in the thread.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the thread to modify."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and thread."},"body":{"type":"object","properties":{"addLabelIds":{"type":"array","items":{"type":"string","description":"The ID of a label to add to this thread."},"maxItems":100,"description":"A list of IDs of labels to add to this thread. You can add up to 100 labels with each update."},"removeLabelIds":{"type":"array","items":{"type":"string","description":"The ID of a label to remove from this thread."},"maxItems":100,"description":"A list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update."}},"additionalProperties":false,"description":"The request body specifying which labels to add or remove from the thread."},"responses":{"200":{"type":"object","description":"A Thread resource representing the modified thread.","properties":{"id":{"type":"string","description":"The unique ID of the thread."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this thread."},"messages":{"type":"array","description":"A list of messages in the thread.","items":{"type":"object","description":"A message in the thread.","properties":{"id":{"type":"string","description":"The unique ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"]}},"labelIds":{"type":"array","description":"List of IDs of labels applied to the thread.","items":{"type":"string","description":"A label ID applied to the thread."}}},"required":["id"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/threads/{id}/trash","method":"POST","name":"users.threads.trash","description":"Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the thread to Trash."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and thread."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A Thread resource representing the trashed thread.","properties":{"id":{"type":"string","description":"The unique ID of the thread."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this thread."},"messages":{"type":"array","description":"A list of messages contained in this thread.","items":{"type":"object","description":"A message in the thread.","properties":{"id":{"type":"string","description":"The unique ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."}},"required":["id","threadId"],"additionalProperties":true}}},"required":["id"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]},{"connectorSlug":"gmail","path":"/users/{userId}/threads/{id}/untrash","method":"POST","name":"users.threads.untrash","description":"Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.","schemas":{"path":{"type":"object","properties":{"userId":{"type":"string","description":"The user's email address. The special value 'me' can be used to indicate the authenticated user."},"id":{"type":"string","description":"The ID of the thread to remove from Trash."}},"required":["userId","id"],"additionalProperties":false,"description":"Path parameters identifying the user and the thread to untrash."},"body":{"type":"object","description":"The request body must be empty.","properties":{},"additionalProperties":false},"responses":{"200":{"type":"object","description":"A Thread resource representing the untrashed thread.","properties":{"id":{"type":"string","description":"The unique ID of the thread."},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this thread."},"messages":{"type":"array","description":"The list of messages in the thread.","items":{"type":"object","description":"A message in the thread.","properties":{"id":{"type":"string","description":"The unique ID of the message."},"threadId":{"type":"string","description":"The ID of the thread the message belongs to."},"labelIds":{"type":"array","description":"List of IDs of labels applied to this message.","items":{"type":"string","description":"A label ID."}},"snippet":{"type":"string","description":"A short part of the message text."},"historyId":{"type":"string","description":"The ID of the last history record that modified this message."},"internalDate":{"type":"string","description":"The internal message creation timestamp (epoch ms)."},"payload":{"type":"object","description":"The parsed email structure in the message.","properties":{},"additionalProperties":true},"sizeEstimate":{"type":"integer","description":"Estimated size in bytes of the message."}},"required":["id","threadId"],"additionalProperties":true}}},"required":["id"],"additionalProperties":true}}},"requiredScopes":[{"oneOf":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}]}]}}