This is page 2 of 3. Use http://codebase.md/markuspfundstein/mcp-gsuite?lines=true&page={x} to view the full context. # Directory Structure ``` ├── .gitignore ├── .python-version ├── Dockerfile ├── gmail-api-openapi-spec.yaml ├── gmail.v1.json ├── google-calendar-api-openapi-spec.yaml ├── LICENSE ├── pyproject.toml ├── README.md ├── smithery.yaml ├── src │ └── mcp_gsuite │ ├── __init__.py │ ├── calendar.py │ ├── gauth.py │ ├── gmail.py │ ├── server.py │ ├── toolhandler.py │ ├── tools_calendar.py │ └── tools_gmail.py └── uv.lock ``` # Files -------------------------------------------------------------------------------- /gmail-api-openapi-spec.yaml: -------------------------------------------------------------------------------- ```yaml 1 | agger: "2.0" 2 | info: 3 | title: Gmail 4 | description: Access Gmail mailboxes including sending user email. 5 | contact: 6 | name: Google 7 | url: https://google.com 8 | version: v1 9 | host: www.googleapis.com 10 | basePath: /gmail/v1/users 11 | schemes: 12 | - http 13 | produces: 14 | - application/json 15 | consumes: 16 | - application/json 17 | paths: 18 | /{userId}/drafts: 19 | get: 20 | summary: Get Drafts 21 | description: Lists the drafts in the user's mailbox 22 | operationId: gmail.users.drafts.list 23 | parameters: 24 | - in: query 25 | name: includeSpamTrash 26 | description: Include drafts from SPAM and TRASH in the results 27 | - in: query 28 | name: maxResults 29 | description: Maximum number of drafts to return 30 | - in: query 31 | name: pageToken 32 | description: Page token to retrieve a specific page of results in the list 33 | - in: query 34 | name: q 35 | description: Only return draft messages matching the specified query 36 | - in: path 37 | name: userId 38 | description: The user's email address 39 | responses: 40 | 200: 41 | description: OK 42 | tags: 43 | - Email 44 | post: 45 | summary: Update Draft 46 | description: Creates a new draft with the DRAFT label 47 | operationId: gmail.users.drafts.create 48 | parameters: 49 | - in: body 50 | name: body 51 | schema: 52 | $ref: '#/definitions/holder' 53 | - in: path 54 | name: userId 55 | description: The user's email address 56 | responses: 57 | 200: 58 | description: OK 59 | tags: 60 | - Email 61 | /{userId}/drafts/send: 62 | post: 63 | summary: Send Draft 64 | description: Sends the specified, existing draft to the recipients in the To, 65 | Cc, and Bcc headers 66 | operationId: gmail.users.drafts.send 67 | parameters: 68 | - in: body 69 | name: body 70 | schema: 71 | $ref: '#/definitions/holder' 72 | - in: path 73 | name: userId 74 | description: The user's email address 75 | responses: 76 | 200: 77 | description: OK 78 | tags: 79 | - Email 80 | /{userId}/drafts/{id}: 81 | delete: 82 | summary: Delete Draft 83 | description: Immediately and permanently deletes the specified draft 84 | operationId: gmail.users.drafts.delete 85 | parameters: 86 | - in: path 87 | name: id 88 | description: The ID of the draft to delete 89 | - in: path 90 | name: userId 91 | description: The user's email address 92 | responses: 93 | 200: 94 | description: OK 95 | tags: 96 | - Email 97 | get: 98 | summary: Get Draft 99 | description: Gets the specified draft 100 | operationId: gmail.users.drafts.get 101 | parameters: 102 | - in: query 103 | name: format 104 | description: The format to return the draft in 105 | - in: path 106 | name: id 107 | description: The ID of the draft to retrieve 108 | - in: path 109 | name: userId 110 | description: The user's email address 111 | responses: 112 | 200: 113 | description: OK 114 | tags: 115 | - Email 116 | put: 117 | summary: Update Draft 118 | description: Replaces a draft's content 119 | operationId: gmail.users.drafts.update 120 | parameters: 121 | - in: body 122 | name: body 123 | schema: 124 | $ref: '#/definitions/holder' 125 | - in: path 126 | name: id 127 | description: The ID of the draft to update 128 | - in: path 129 | name: userId 130 | description: The user's email address 131 | responses: 132 | 200: 133 | description: OK 134 | tags: 135 | - Email 136 | /{userId}/history: 137 | get: 138 | summary: Get History 139 | description: Lists the history of all changes to the given mailbox 140 | operationId: gmail.users.history.list 141 | parameters: 142 | - in: query 143 | name: historyTypes 144 | description: History types to be returned by the function 145 | - in: query 146 | name: labelId 147 | description: Only return messages with a label matching the ID 148 | - in: query 149 | name: maxResults 150 | description: The maximum number of history records to return 151 | - in: query 152 | name: pageToken 153 | description: Page token to retrieve a specific page of results in the list 154 | - in: query 155 | name: startHistoryId 156 | description: Required 157 | - in: path 158 | name: userId 159 | description: The user's email address 160 | responses: 161 | 200: 162 | description: OK 163 | tags: 164 | - History 165 | /{userId}/labels: 166 | get: 167 | summary: Get Labels 168 | description: Lists all labels in the user's mailbox 169 | operationId: gmail.users.labels.list 170 | parameters: 171 | - in: path 172 | name: userId 173 | description: The user's email address 174 | responses: 175 | 200: 176 | description: OK 177 | tags: 178 | - Label 179 | post: 180 | summary: Create Label 181 | description: Creates a new label 182 | operationId: gmail.users.labels.create 183 | parameters: 184 | - in: body 185 | name: body 186 | schema: 187 | $ref: '#/definitions/holder' 188 | - in: path 189 | name: userId 190 | description: The user's email address 191 | responses: 192 | 200: 193 | description: OK 194 | tags: 195 | - Label 196 | /{userId}/labels/{id}: 197 | delete: 198 | summary: Delete Lbel 199 | description: Immediately and permanently deletes the specified label and removes 200 | it from any messages and threads that it is applied to 201 | operationId: gmail.users.labels.delete 202 | parameters: 203 | - in: path 204 | name: id 205 | description: The ID of the label to delete 206 | - in: path 207 | name: userId 208 | description: The user's email address 209 | responses: 210 | 200: 211 | description: OK 212 | tags: 213 | - Label 214 | get: 215 | summary: Get Label 216 | description: Gets the specified label 217 | operationId: gmail.users.labels.get 218 | parameters: 219 | - in: path 220 | name: id 221 | description: The ID of the label to retrieve 222 | - in: path 223 | name: userId 224 | description: The user's email address 225 | responses: 226 | 200: 227 | description: OK 228 | tags: 229 | - Label 230 | patch: 231 | summary: Update Label 232 | description: Updates the specified label 233 | operationId: gmail.users.labels.patch 234 | parameters: 235 | - in: body 236 | name: body 237 | schema: 238 | $ref: '#/definitions/holder' 239 | - in: path 240 | name: id 241 | description: The ID of the label to update 242 | - in: path 243 | name: userId 244 | description: The user's email address 245 | responses: 246 | 200: 247 | description: OK 248 | tags: 249 | - Label 250 | put: 251 | summary: Update Label 252 | description: Updates the specified label 253 | operationId: gmail.users.labels.update 254 | parameters: 255 | - in: body 256 | name: body 257 | schema: 258 | $ref: '#/definitions/holder' 259 | - in: path 260 | name: id 261 | description: The ID of the label to update 262 | - in: path 263 | name: userId 264 | description: The user's email address 265 | responses: 266 | 200: 267 | description: OK 268 | tags: 269 | - Label 270 | /{userId}/messages: 271 | get: 272 | summary: Get Message 273 | description: Lists the messages in the user's mailbox 274 | operationId: gmail.users.messages.list 275 | parameters: 276 | - in: query 277 | name: includeSpamTrash 278 | description: Include messages from SPAM and TRASH in the results 279 | - in: query 280 | name: labelIds 281 | description: Only return messages with labels that match all of the specified 282 | label IDs 283 | - in: query 284 | name: maxResults 285 | description: Maximum number of messages to return 286 | - in: query 287 | name: pageToken 288 | description: Page token to retrieve a specific page of results in the list 289 | - in: query 290 | name: q 291 | description: Only return messages matching the specified query 292 | - in: path 293 | name: userId 294 | description: The user's email address 295 | responses: 296 | 200: 297 | description: OK 298 | tags: 299 | - Email 300 | post: 301 | summary: Create Message 302 | description: Directly inserts a message into only this user's mailbox similar 303 | to IMAP APPEND, bypassing most scanning and classification 304 | operationId: gmail.users.messages.insert 305 | parameters: 306 | - in: body 307 | name: body 308 | schema: 309 | $ref: '#/definitions/holder' 310 | - in: query 311 | name: deleted 312 | description: Mark the email as permanently deleted (not TRASH) and only visible 313 | in Google Vault to a Vault administrator 314 | - in: query 315 | name: internalDateSource 316 | description: Source for Gmail's internal date of the message 317 | - in: path 318 | name: userId 319 | description: The user's email address 320 | responses: 321 | 200: 322 | description: OK 323 | tags: 324 | - Email 325 | /{userId}/messages/batchDelete: 326 | post: 327 | summary: Delete Messages 328 | description: Deletes many messages by message ID 329 | operationId: gmail.users.messages.batchDelete 330 | parameters: 331 | - in: body 332 | name: body 333 | schema: 334 | $ref: '#/definitions/holder' 335 | - in: path 336 | name: userId 337 | description: The user's email address 338 | responses: 339 | 200: 340 | description: OK 341 | tags: 342 | - Email 343 | /{userId}/messages/batchModify: 344 | post: 345 | summary: Update Label 346 | description: Modifies the labels on the specified messages 347 | operationId: gmail.users.messages.batchModify 348 | parameters: 349 | - in: body 350 | name: body 351 | schema: 352 | $ref: '#/definitions/holder' 353 | - in: path 354 | name: userId 355 | description: The user's email address 356 | responses: 357 | 200: 358 | description: OK 359 | tags: 360 | - Email 361 | /{userId}/messages/import: 362 | post: 363 | summary: Import Message 364 | description: Imports a message into only this user's mailbox, with standard 365 | email delivery scanning and classification similar to receiving via SMTP 366 | operationId: gmail.users.messages.import 367 | parameters: 368 | - in: body 369 | name: body 370 | schema: 371 | $ref: '#/definitions/holder' 372 | - in: query 373 | name: deleted 374 | description: Mark the email as permanently deleted (not TRASH) and only visible 375 | in Google Vault to a Vault administrator 376 | - in: query 377 | name: internalDateSource 378 | description: Source for Gmail's internal date of the message 379 | - in: query 380 | name: neverMarkSpam 381 | description: Ignore the Gmail spam classifier decision and never mark this 382 | email as SPAM in the mailbox 383 | - in: query 384 | name: processForCalendar 385 | description: Process calendar invites in the email and add any extracted meetings 386 | to the Google Calendar for this user 387 | - in: path 388 | name: userId 389 | description: The user's email address 390 | responses: 391 | 200: 392 | description: OK 393 | tags: 394 | - Email 395 | /{userId}/messages/send: 396 | post: 397 | summary: Send Message 398 | description: Sends the specified message to the recipients in the To, Cc, and 399 | Bcc headers 400 | operationId: gmail.users.messages.send 401 | parameters: 402 | - in: body 403 | name: body 404 | schema: 405 | $ref: '#/definitions/holder' 406 | - in: path 407 | name: userId 408 | description: The user's email address 409 | responses: 410 | 200: 411 | description: OK 412 | tags: 413 | - Email 414 | /{userId}/messages/{id}: 415 | delete: 416 | summary: Delete Message 417 | description: Immediately and permanently deletes the specified message 418 | operationId: gmail.users.messages.delete 419 | parameters: 420 | - in: path 421 | name: id 422 | description: The ID of the message to delete 423 | - in: path 424 | name: userId 425 | description: The user's email address 426 | responses: 427 | 200: 428 | description: OK 429 | tags: 430 | - Email 431 | get: 432 | summary: Get Message 433 | description: Gets the specified message 434 | operationId: gmail.users.messages.get 435 | parameters: 436 | - in: query 437 | name: format 438 | description: The format to return the message in 439 | - in: path 440 | name: id 441 | description: The ID of the message to retrieve 442 | - in: query 443 | name: metadataHeaders 444 | description: When given and format is METADATA, only include headers specified 445 | - in: path 446 | name: userId 447 | description: The user's email address 448 | responses: 449 | 200: 450 | description: OK 451 | tags: 452 | - Email 453 | /{userId}/messages/{id}/modify: 454 | post: 455 | summary: Modify message 456 | description: Modifies the labels on the specified message 457 | operationId: gmail.users.messages.modify 458 | parameters: 459 | - in: body 460 | name: body 461 | schema: 462 | $ref: '#/definitions/holder' 463 | - in: path 464 | name: id 465 | description: The ID of the message to modify 466 | - in: path 467 | name: userId 468 | description: The user's email address 469 | responses: 470 | 200: 471 | description: OK 472 | tags: 473 | - Email 474 | /{userId}/messages/{id}/trash: 475 | post: 476 | summary: Trash Message 477 | description: Moves the specified message to the trash 478 | operationId: gmail.users.messages.trash 479 | parameters: 480 | - in: path 481 | name: id 482 | description: The ID of the message to Trash 483 | - in: path 484 | name: userId 485 | description: The user's email address 486 | responses: 487 | 200: 488 | description: OK 489 | tags: 490 | - Email 491 | /{userId}/messages/{id}/untrash: 492 | post: 493 | summary: UnTrash Message 494 | description: Removes the specified message from the trash 495 | operationId: gmail.users.messages.untrash 496 | parameters: 497 | - in: path 498 | name: id 499 | description: The ID of the message to remove from Trash 500 | - in: path 501 | name: userId 502 | description: The user's email address 503 | responses: 504 | 200: 505 | description: OK 506 | tags: 507 | - Email 508 | /{userId}/messages/{messageId}/attachments/{id}: 509 | get: 510 | summary: Get Attachments 511 | description: Gets the specified message attachment 512 | operationId: gmail.users.messages.attachments.get 513 | parameters: 514 | - in: path 515 | name: id 516 | description: The ID of the attachment 517 | - in: path 518 | name: messageId 519 | description: The ID of the message containing the attachment 520 | - in: path 521 | name: userId 522 | description: The user's email address 523 | responses: 524 | 200: 525 | description: OK 526 | tags: 527 | - Email 528 | /{userId}/profile: 529 | get: 530 | summary: Get Profile 531 | description: Gets the current user's Gmail profile 532 | operationId: gmail.users.getProfile 533 | parameters: 534 | - in: path 535 | name: userId 536 | description: The user's email address 537 | responses: 538 | 200: 539 | description: OK 540 | tags: 541 | - User 542 | /{userId}/settings/autoForwarding: 543 | get: 544 | summary: Get Auto-Forwarding Settings 545 | description: Gets the auto-forwarding setting for the specified account 546 | operationId: gmail.users.settings.getAutoForwarding 547 | parameters: 548 | - in: path 549 | name: userId 550 | description: User's email address 551 | responses: 552 | 200: 553 | description: OK 554 | tags: 555 | - Settings 556 | put: 557 | summary: Update Auto-Forwarding Settings 558 | description: Updates the auto-forwarding setting for the specified account 559 | operationId: gmail.users.settings.updateAutoForwarding 560 | parameters: 561 | - in: body 562 | name: body 563 | schema: 564 | $ref: '#/definitions/holder' 565 | - in: path 566 | name: userId 567 | description: User's email address 568 | responses: 569 | 200: 570 | description: OK 571 | tags: 572 | - Settings 573 | /{userId}/settings/filters: 574 | get: 575 | summary: Get Message Filters 576 | description: Lists the message filters of a Gmail user 577 | operationId: gmail.users.settings.filters.list 578 | parameters: 579 | - in: path 580 | name: userId 581 | description: User's email address 582 | responses: 583 | 200: 584 | description: OK 585 | tags: 586 | - Filters 587 | post: 588 | summary: Create Message Filters 589 | description: Creates a filter 590 | operationId: gmail.users.settings.filters.create 591 | parameters: 592 | - in: body 593 | name: body 594 | schema: 595 | $ref: '#/definitions/holder' 596 | - in: path 597 | name: userId 598 | description: User's email address 599 | responses: 600 | 200: 601 | description: OK 602 | tags: 603 | - Filters 604 | /{userId}/settings/filters/{id}: 605 | delete: 606 | summary: Delete Message Filter 607 | description: Deletes a filter 608 | operationId: gmail.users.settings.filters.delete 609 | parameters: 610 | - in: path 611 | name: id 612 | description: The ID of the filter to be deleted 613 | - in: path 614 | name: userId 615 | description: User's email address 616 | responses: 617 | 200: 618 | description: OK 619 | tags: 620 | - Filters 621 | get: 622 | summary: Get Message Filter 623 | description: Gets a filter 624 | operationId: gmail.users.settings.filters.get 625 | parameters: 626 | - in: path 627 | name: id 628 | description: The ID of the filter to be fetched 629 | - in: path 630 | name: userId 631 | description: User's email address 632 | responses: 633 | 200: 634 | description: OK 635 | tags: 636 | - Filters 637 | /{userId}/settings/forwardingAddresses: 638 | get: 639 | summary: Get Forward Addresses 640 | description: Lists the forwarding addresses for the specified account 641 | operationId: gmail.users.settings.forwardingAddresses.list 642 | parameters: 643 | - in: path 644 | name: userId 645 | description: User's email address 646 | responses: 647 | 200: 648 | description: OK 649 | tags: 650 | - Forwarding Address 651 | post: 652 | summary: Create Forward Addresse 653 | description: Creates a forwarding address 654 | operationId: gmail.users.settings.forwardingAddresses.create 655 | parameters: 656 | - in: body 657 | name: body 658 | schema: 659 | $ref: '#/definitions/holder' 660 | - in: path 661 | name: userId 662 | description: User's email address 663 | responses: 664 | 200: 665 | description: OK 666 | tags: 667 | - Forwarding Address 668 | /{userId}/settings/forwardingAddresses/{forwardingEmail}: 669 | delete: 670 | summary: Delete Forward Address 671 | description: Deletes the specified forwarding address and revokes any verification 672 | that may have been required 673 | operationId: gmail.users.settings.forwardingAddresses.delete 674 | parameters: 675 | - in: path 676 | name: forwardingEmail 677 | description: The forwarding address to be deleted 678 | - in: path 679 | name: userId 680 | description: User's email address 681 | responses: 682 | 200: 683 | description: OK 684 | tags: 685 | - Forwarding Address 686 | get: 687 | summary: GGetet Forward Address 688 | description: Gets the specified forwarding address 689 | operationId: gmail.users.settings.forwardingAddresses.get 690 | parameters: 691 | - in: path 692 | name: forwardingEmail 693 | description: The forwarding address to be retrieved 694 | - in: path 695 | name: userId 696 | description: User's email address 697 | responses: 698 | 200: 699 | description: OK 700 | tags: 701 | - Forwarding Address 702 | /{userId}/settings/imap: 703 | get: 704 | summary: Gets IMAP Settings 705 | description: Gets IMAP settings 706 | operationId: gmail.users.settings.getImap 707 | parameters: 708 | - in: path 709 | name: userId 710 | description: User's email address 711 | responses: 712 | 200: 713 | description: OK 714 | tags: 715 | - IMAP Settings 716 | put: 717 | summary: Update IMAP Setting 718 | description: Updates IMAP settings 719 | operationId: gmail.users.settings.updateImap 720 | parameters: 721 | - in: body 722 | name: body 723 | schema: 724 | $ref: '#/definitions/holder' 725 | - in: path 726 | name: userId 727 | description: User's email address 728 | responses: 729 | 200: 730 | description: OK 731 | tags: 732 | - IMAP Settings 733 | /{userId}/settings/pop: 734 | get: 735 | summary: Gets POP Settings 736 | description: Gets POP settings 737 | operationId: gmail.users.settings.getPop 738 | parameters: 739 | - in: path 740 | name: userId 741 | description: User's email address 742 | responses: 743 | 200: 744 | description: OK 745 | tags: 746 | - "" 747 | put: 748 | summary: Update IMAP Setting 749 | description: Updates POP settings 750 | operationId: gmail.users.settings.updatePop 751 | parameters: 752 | - in: body 753 | name: body 754 | schema: 755 | $ref: '#/definitions/holder' 756 | - in: path 757 | name: userId 758 | description: User's email address 759 | responses: 760 | 200: 761 | description: OK 762 | tags: 763 | - POP Settings 764 | /{userId}/settings/sendAs: 765 | get: 766 | summary: Send As Alias 767 | description: Lists the send-as aliases for the specified account 768 | operationId: gmail.users.settings.sendAs.list 769 | parameters: 770 | - in: path 771 | name: userId 772 | description: User's email address 773 | responses: 774 | 200: 775 | description: OK 776 | tags: 777 | - Alias 778 | post: 779 | summary: Create Alias 780 | description: Creates a custom "from" send-as alias 781 | operationId: gmail.users.settings.sendAs.create 782 | parameters: 783 | - in: body 784 | name: body 785 | schema: 786 | $ref: '#/definitions/holder' 787 | - in: path 788 | name: userId 789 | description: User's email address 790 | responses: 791 | 200: 792 | description: OK 793 | tags: 794 | - Alias 795 | /{userId}/settings/sendAs/{sendAsEmail}: 796 | delete: 797 | summary: Delete Alias 798 | description: Deletes the specified send-as alias 799 | operationId: gmail.users.settings.sendAs.delete 800 | parameters: 801 | - in: path 802 | name: sendAsEmail 803 | description: The send-as alias to be deleted 804 | - in: path 805 | name: userId 806 | description: User's email address 807 | responses: 808 | 200: 809 | description: OK 810 | tags: 811 | - Alias 812 | get: 813 | summary: Get Alias 814 | description: Gets the specified send-as alias 815 | operationId: gmail.users.settings.sendAs.get 816 | parameters: 817 | - in: path 818 | name: sendAsEmail 819 | description: The send-as alias to be retrieved 820 | - in: path 821 | name: userId 822 | description: User's email address 823 | responses: 824 | 200: 825 | description: OK 826 | tags: 827 | - Alias 828 | patch: 829 | summary: Update Alias 830 | description: Updates a send-as alias 831 | operationId: gmail.users.settings.sendAs.patch 832 | parameters: 833 | - in: body 834 | name: body 835 | schema: 836 | $ref: '#/definitions/holder' 837 | - in: path 838 | name: sendAsEmail 839 | description: The send-as alias to be updated 840 | - in: path 841 | name: userId 842 | description: User's email address 843 | responses: 844 | 200: 845 | description: OK 846 | tags: 847 | - Alias 848 | put: 849 | summary: Update Alias 850 | description: Updates a send-as alias 851 | operationId: gmail.users.settings.sendAs.update 852 | parameters: 853 | - in: body 854 | name: body 855 | schema: 856 | $ref: '#/definitions/holder' 857 | - in: path 858 | name: sendAsEmail 859 | description: The send-as alias to be updated 860 | - in: path 861 | name: userId 862 | description: User's email address 863 | responses: 864 | 200: 865 | description: OK 866 | tags: 867 | - Alias 868 | /{userId}/settings/sendAs/{sendAsEmail}/smimeInfo: 869 | get: 870 | summary: Get S/MIME Configurations 871 | description: Lists S/MIME configs for the specified send-as alias 872 | operationId: gmail.users.settings.sendAs.smimeInfo.list 873 | parameters: 874 | - in: path 875 | name: sendAsEmail 876 | description: The email address that appears in the "From:" header for mail 877 | sent using this alias 878 | - in: path 879 | name: userId 880 | description: The user's email address 881 | responses: 882 | 200: 883 | description: OK 884 | tags: 885 | - S/MIME Configuration 886 | post: 887 | summary: Create S/MIME Configurations 888 | description: Insert (upload) the given S/MIME config for the specified send-as 889 | alias 890 | operationId: gmail.users.settings.sendAs.smimeInfo.insert 891 | parameters: 892 | - in: body 893 | name: body 894 | schema: 895 | $ref: '#/definitions/holder' 896 | - in: path 897 | name: sendAsEmail 898 | description: The email address that appears in the "From:" header for mail 899 | sent using this alias 900 | - in: path 901 | name: userId 902 | description: The user's email address 903 | responses: 904 | 200: 905 | description: OK 906 | tags: 907 | - S/MIME Configuration 908 | /{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}: 909 | delete: 910 | summary: Delete S/MIME Configurations 911 | description: Deletes the specified S/MIME config for the specified send-as alias 912 | operationId: gmail.users.settings.sendAs.smimeInfo.delete 913 | parameters: 914 | - in: path 915 | name: id 916 | description: The immutable ID for the SmimeInfo 917 | - in: path 918 | name: sendAsEmail 919 | description: The email address that appears in the "From:" header for mail 920 | sent using this alias 921 | - in: path 922 | name: userId 923 | description: The user's email address 924 | responses: 925 | 200: 926 | description: OK 927 | tags: 928 | - S/MIME Configuration 929 | get: 930 | summary: Get S/MIME Configuration 931 | description: Gets the specified S/MIME config for the specified send-as alias 932 | operationId: gmail.users.settings.sendAs.smimeInfo.get 933 | parameters: 934 | - in: path 935 | name: id 936 | description: The immutable ID for the SmimeInfo 937 | - in: path 938 | name: sendAsEmail 939 | description: The email address that appears in the "From:" header for mail 940 | sent using this alias 941 | - in: path 942 | name: userId 943 | description: The user's email address 944 | responses: 945 | 200: 946 | description: OK 947 | tags: 948 | - S/MIME Configuration 949 | /{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault: 950 | post: 951 | summary: Create Default S/MIME Configurations 952 | description: Sets the default S/MIME config for the specified send-as alias 953 | operationId: gmail.users.settings.sendAs.smimeInfo.setDefault 954 | parameters: 955 | - in: path 956 | name: id 957 | description: The immutable ID for the SmimeInfo 958 | - in: path 959 | name: sendAsEmail 960 | description: The email address that appears in the "From:" header for mail 961 | sent using this alias 962 | - in: path 963 | name: userId 964 | description: The user's email address 965 | responses: 966 | 200: 967 | description: OK 968 | tags: 969 | - S/MIME Configuration 970 | /{userId}/settings/sendAs/{sendAsEmail}/verify: 971 | post: 972 | summary: Send Verification Email 973 | description: Sends a verification email to the specified send-as alias address 974 | operationId: gmail.users.settings.sendAs.verify 975 | parameters: 976 | - in: path 977 | name: sendAsEmail 978 | description: The send-as alias to be verified 979 | - in: path 980 | name: userId 981 | description: User's email address 982 | responses: 983 | 200: 984 | description: OK 985 | tags: 986 | - Verification 987 | /{userId}/settings/vacation: 988 | get: 989 | summary: Get Vacation Settings 990 | description: Gets vacation responder settings 991 | operationId: gmail.users.settings.getVacation 992 | parameters: 993 | - in: path 994 | name: userId 995 | description: User's email address 996 | responses: 997 | 200: 998 | description: OK 999 | tags: 1000 | - Vacation Settings 1001 | put: 1002 | summary: Update Vacation Settings 1003 | description: Updates vacation responder settings 1004 | operationId: gmail.users.settings.updateVacation 1005 | parameters: 1006 | - in: body 1007 | name: body 1008 | schema: 1009 | $ref: '#/definitions/holder' 1010 | - in: path 1011 | name: userId 1012 | description: User's email address 1013 | responses: 1014 | 200: 1015 | description: OK 1016 | tags: 1017 | - Vacation Settings 1018 | /{userId}/stop: 1019 | post: 1020 | summary: Stop Push Notifications 1021 | description: Stop receiving push notifications for the given user mailbox 1022 | operationId: gmail.users.stop 1023 | parameters: 1024 | - in: path 1025 | name: userId 1026 | description: The user's email address 1027 | responses: 1028 | 200: 1029 | description: OK 1030 | tags: 1031 | - Push Notification 1032 | /{userId}/threads: 1033 | get: 1034 | summary: Get Threads 1035 | description: Lists the threads in the user's mailbox 1036 | operationId: gmail.users.threads.list 1037 | parameters: 1038 | - in: query 1039 | name: includeSpamTrash 1040 | description: Include threads from SPAM and TRASH in the results 1041 | - in: query 1042 | name: labelIds 1043 | description: Only return threads with labels that match all of the specified 1044 | label IDs 1045 | - in: query 1046 | name: maxResults 1047 | description: Maximum number of threads to return 1048 | - in: query 1049 | name: pageToken 1050 | description: Page token to retrieve a specific page of results in the list 1051 | - in: query 1052 | name: q 1053 | description: Only return threads matching the specified query 1054 | - in: path 1055 | name: userId 1056 | description: The user's email address 1057 | responses: 1058 | 200: 1059 | description: OK 1060 | tags: 1061 | - Email Thread 1062 | /{userId}/threads/{id}: 1063 | delete: 1064 | summary: Delete Threads 1065 | description: Immediately and permanently deletes the specified thread 1066 | operationId: gmail.users.threads.delete 1067 | parameters: 1068 | - in: path 1069 | name: id 1070 | description: ID of the Thread to delete 1071 | - in: path 1072 | name: userId 1073 | description: The user's email address 1074 | responses: 1075 | 200: 1076 | description: OK 1077 | tags: 1078 | - Email Thread 1079 | get: 1080 | summary: Get Threads 1081 | description: Gets the specified thread 1082 | operationId: gmail.users.threads.get 1083 | parameters: 1084 | - in: query 1085 | name: format 1086 | description: The format to return the messages in 1087 | - in: path 1088 | name: id 1089 | description: The ID of the thread to retrieve 1090 | - in: query 1091 | name: metadataHeaders 1092 | description: When given and format is METADATA, only include headers specified 1093 | - in: path 1094 | name: userId 1095 | description: The user's email address 1096 | responses: 1097 | 200: 1098 | description: OK 1099 | tags: 1100 | - Email Thread 1101 | /{userId}/threads/{id}/modify: 1102 | post: 1103 | summary: Modify Thread labels 1104 | description: Modifies the labels applied to the thread 1105 | operationId: gmail.users.threads.modify 1106 | parameters: 1107 | - in: body 1108 | name: body 1109 | schema: 1110 | $ref: '#/definitions/holder' 1111 | - in: path 1112 | name: id 1113 | description: The ID of the thread to modify 1114 | - in: path 1115 | name: userId 1116 | description: The user's email address 1117 | responses: 1118 | 200: 1119 | description: OK 1120 | tags: 1121 | - Email Thread 1122 | /{userId}/threads/{id}/trash: 1123 | post: 1124 | summary: Trash Thread 1125 | description: Moves the specified thread to the trash 1126 | operationId: gmail.users.threads.trash 1127 | parameters: 1128 | - in: path 1129 | name: id 1130 | description: The ID of the thread to Trash 1131 | - in: path 1132 | name: userId 1133 | description: The user's email address 1134 | responses: 1135 | 200: 1136 | description: OK 1137 | tags: 1138 | - Email Thread 1139 | /{userId}/threads/{id}/untrash: 1140 | post: 1141 | summary: UnTrash Threat 1142 | description: Removes the specified thread from the trash 1143 | operationId: gmail.users.threads.untrash 1144 | parameters: 1145 | - in: path 1146 | name: id 1147 | description: The ID of the thread to remove from Trash 1148 | - in: path 1149 | name: userId 1150 | description: The user's email address 1151 | responses: 1152 | 200: 1153 | description: OK 1154 | tags: 1155 | - Email Thread 1156 | /{userId}/watch: 1157 | post: 1158 | summary: Send Push Notification 1159 | description: Set up or update a push notification watch on the given user mailbox 1160 | operationId: gmail.users.watch 1161 | parameters: 1162 | - in: body 1163 | name: body 1164 | schema: 1165 | $ref: '#/definitions/holder' 1166 | - in: path 1167 | name: userId 1168 | description: The user's email address 1169 | responses: 1170 | 200: 1171 | description: OK 1172 | tags: 1173 | - Push Notification 1174 | definitions: 1175 | AutoForwarding: 1176 | properties: 1177 | disposition: 1178 | description: This is a default description. 1179 | type: post 1180 | emailAddress: 1181 | description: This is a default description. 1182 | type: post 1183 | enabled: 1184 | description: This is a default description. 1185 | type: post 1186 | BatchDeleteMessagesRequest: 1187 | properties: 1188 | ids: 1189 | description: This is a default description. 1190 | type: post 1191 | BatchModifyMessagesRequest: 1192 | properties: 1193 | addLabelIds: 1194 | description: This is a default description. 1195 | type: post 1196 | ids: 1197 | description: This is a default description. 1198 | type: post 1199 | removeLabelIds: 1200 | description: This is a default description. 1201 | type: post 1202 | Draft: 1203 | properties: 1204 | id: 1205 | description: This is a default description. 1206 | type: post 1207 | Filter: 1208 | properties: 1209 | id: 1210 | description: This is a default description. 1211 | type: post 1212 | FilterAction: 1213 | properties: 1214 | addLabelIds: 1215 | description: This is a default description. 1216 | type: post 1217 | forward: 1218 | description: This is a default description. 1219 | type: post 1220 | removeLabelIds: 1221 | description: This is a default description. 1222 | type: post 1223 | FilterCriteria: 1224 | properties: 1225 | excludeChats: 1226 | description: This is a default description. 1227 | type: post 1228 | from: 1229 | description: This is a default description. 1230 | type: post 1231 | hasAttachment: 1232 | description: This is a default description. 1233 | type: post 1234 | negatedQuery: 1235 | description: This is a default description. 1236 | type: post 1237 | query: 1238 | description: This is a default description. 1239 | type: post 1240 | size: 1241 | description: This is a default description. 1242 | type: post 1243 | sizeComparison: 1244 | description: This is a default description. 1245 | type: post 1246 | subject: 1247 | description: This is a default description. 1248 | type: post 1249 | to: 1250 | description: This is a default description. 1251 | type: post 1252 | ForwardingAddress: 1253 | properties: 1254 | forwardingEmail: 1255 | description: This is a default description. 1256 | type: post 1257 | verificationStatus: 1258 | description: This is a default description. 1259 | type: post 1260 | History: 1261 | properties: 1262 | id: 1263 | description: This is a default description. 1264 | type: post 1265 | labelsAdded: 1266 | description: This is a default description. 1267 | type: post 1268 | labelsRemoved: 1269 | description: This is a default description. 1270 | type: post 1271 | messages: 1272 | description: This is a default description. 1273 | type: post 1274 | messagesAdded: 1275 | description: This is a default description. 1276 | type: post 1277 | messagesDeleted: 1278 | description: This is a default description. 1279 | type: post 1280 | HistoryLabelAdded: 1281 | properties: 1282 | labelIds: 1283 | description: This is a default description. 1284 | type: post 1285 | HistoryLabelRemoved: 1286 | properties: 1287 | labelIds: 1288 | description: This is a default description. 1289 | type: post 1290 | HistoryMessageAdded: 1291 | properties: [] 1292 | HistoryMessageDeleted: 1293 | properties: [] 1294 | ImapSettings: 1295 | properties: 1296 | autoExpunge: 1297 | description: This is a default description. 1298 | type: post 1299 | enabled: 1300 | description: This is a default description. 1301 | type: post 1302 | expungeBehavior: 1303 | description: This is a default description. 1304 | type: post 1305 | maxFolderSize: 1306 | description: This is a default description. 1307 | type: post 1308 | Label: 1309 | properties: 1310 | id: 1311 | description: This is a default description. 1312 | type: post 1313 | labelListVisibility: 1314 | description: This is a default description. 1315 | type: post 1316 | messageListVisibility: 1317 | description: This is a default description. 1318 | type: post 1319 | messagesTotal: 1320 | description: This is a default description. 1321 | type: post 1322 | messagesUnread: 1323 | description: This is a default description. 1324 | type: post 1325 | name: 1326 | description: This is a default description. 1327 | type: post 1328 | threadsTotal: 1329 | description: This is a default description. 1330 | type: post 1331 | threadsUnread: 1332 | description: This is a default description. 1333 | type: post 1334 | type: 1335 | description: This is a default description. 1336 | type: post 1337 | ListDraftsResponse: 1338 | properties: 1339 | drafts: 1340 | description: This is a default description. 1341 | type: post 1342 | nextPageToken: 1343 | description: This is a default description. 1344 | type: post 1345 | resultSizeEstimate: 1346 | description: This is a default description. 1347 | type: post 1348 | ListFiltersResponse: 1349 | properties: 1350 | filter: 1351 | description: This is a default description. 1352 | type: post 1353 | ListForwardingAddressesResponse: 1354 | properties: 1355 | forwardingAddresses: 1356 | description: This is a default description. 1357 | type: post 1358 | ListHistoryResponse: 1359 | properties: 1360 | history: 1361 | description: This is a default description. 1362 | type: post 1363 | historyId: 1364 | description: This is a default description. 1365 | type: post 1366 | nextPageToken: 1367 | description: This is a default description. 1368 | type: post 1369 | ListLabelsResponse: 1370 | properties: 1371 | labels: 1372 | description: This is a default description. 1373 | type: post 1374 | ListMessagesResponse: 1375 | properties: 1376 | messages: 1377 | description: This is a default description. 1378 | type: post 1379 | nextPageToken: 1380 | description: This is a default description. 1381 | type: post 1382 | resultSizeEstimate: 1383 | description: This is a default description. 1384 | type: post 1385 | ListSendAsResponse: 1386 | properties: 1387 | sendAs: 1388 | description: This is a default description. 1389 | type: post 1390 | ListSmimeInfoResponse: 1391 | properties: 1392 | smimeInfo: 1393 | description: This is a default description. 1394 | type: post 1395 | ListThreadsResponse: 1396 | properties: 1397 | nextPageToken: 1398 | description: This is a default description. 1399 | type: post 1400 | resultSizeEstimate: 1401 | description: This is a default description. 1402 | type: post 1403 | threads: 1404 | description: This is a default description. 1405 | type: post 1406 | Message: 1407 | properties: 1408 | historyId: 1409 | description: This is a default description. 1410 | type: post 1411 | id: 1412 | description: This is a default description. 1413 | type: post 1414 | internalDate: 1415 | description: This is a default description. 1416 | type: post 1417 | labelIds: 1418 | description: This is a default description. 1419 | type: post 1420 | raw: 1421 | description: This is a default description. 1422 | type: post 1423 | sizeEstimate: 1424 | description: This is a default description. 1425 | type: post 1426 | snippet: 1427 | description: This is a default description. 1428 | type: post 1429 | threadId: 1430 | description: This is a default description. 1431 | type: post 1432 | MessagePart: 1433 | properties: 1434 | filename: 1435 | description: This is a default description. 1436 | type: post 1437 | headers: 1438 | description: This is a default description. 1439 | type: post 1440 | mimeType: 1441 | description: This is a default description. 1442 | type: post 1443 | partId: 1444 | description: This is a default description. 1445 | type: post 1446 | parts: 1447 | description: This is a default description. 1448 | type: post 1449 | MessagePartBody: 1450 | properties: 1451 | attachmentId: 1452 | description: This is a default description. 1453 | type: post 1454 | data: 1455 | description: This is a default description. 1456 | type: post 1457 | size: 1458 | description: This is a default description. 1459 | type: post 1460 | MessagePartHeader: 1461 | properties: 1462 | name: 1463 | description: This is a default description. 1464 | type: post 1465 | value: 1466 | description: This is a default description. 1467 | type: post 1468 | ModifyMessageRequest: 1469 | properties: 1470 | addLabelIds: 1471 | description: This is a default description. 1472 | type: post 1473 | removeLabelIds: 1474 | description: This is a default description. 1475 | type: post 1476 | ModifyThreadRequest: 1477 | properties: 1478 | addLabelIds: 1479 | description: This is a default description. 1480 | type: post 1481 | removeLabelIds: 1482 | description: This is a default description. 1483 | type: post 1484 | PopSettings: 1485 | properties: 1486 | accessWindow: 1487 | description: This is a default description. 1488 | type: post 1489 | disposition: 1490 | description: This is a default description. 1491 | type: post 1492 | Profile: 1493 | properties: 1494 | emailAddress: 1495 | description: This is a default description. 1496 | type: post 1497 | historyId: 1498 | description: This is a default description. 1499 | type: post 1500 | messagesTotal: 1501 | description: This is a default description. 1502 | type: post 1503 | threadsTotal: 1504 | description: This is a default description. 1505 | type: post 1506 | SendAs: 1507 | properties: 1508 | displayName: 1509 | description: This is a default description. 1510 | type: post 1511 | isDefault: 1512 | description: This is a default description. 1513 | type: post 1514 | isPrimary: 1515 | description: This is a default description. 1516 | type: post 1517 | replyToAddress: 1518 | description: This is a default description. 1519 | type: post 1520 | sendAsEmail: 1521 | description: This is a default description. 1522 | type: post 1523 | signature: 1524 | description: This is a default description. 1525 | type: post 1526 | treatAsAlias: 1527 | description: This is a default description. 1528 | type: post 1529 | verificationStatus: 1530 | description: This is a default description. 1531 | type: post 1532 | SmimeInfo: 1533 | properties: 1534 | encryptedKeyPassword: 1535 | description: This is a default description. 1536 | type: post 1537 | expiration: 1538 | description: This is a default description. 1539 | type: post 1540 | id: 1541 | description: This is a default description. 1542 | type: post 1543 | isDefault: 1544 | description: This is a default description. 1545 | type: post 1546 | issuerCn: 1547 | description: This is a default description. 1548 | type: post 1549 | pem: 1550 | description: This is a default description. 1551 | type: post 1552 | pkcs12: 1553 | description: This is a default description. 1554 | type: post 1555 | SmtpMsa: 1556 | properties: 1557 | host: 1558 | description: This is a default description. 1559 | type: post 1560 | password: 1561 | description: This is a default description. 1562 | type: post 1563 | port: 1564 | description: This is a default description. 1565 | type: post 1566 | securityMode: 1567 | description: This is a default description. 1568 | type: post 1569 | username: 1570 | description: This is a default description. 1571 | type: post 1572 | Thread: 1573 | properties: 1574 | historyId: 1575 | description: This is a default description. 1576 | type: post 1577 | id: 1578 | description: This is a default description. 1579 | type: post 1580 | messages: 1581 | description: This is a default description. 1582 | type: post 1583 | snippet: 1584 | description: This is a default description. 1585 | type: post 1586 | VacationSettings: 1587 | properties: 1588 | enableAutoReply: 1589 | description: This is a default description. 1590 | type: post 1591 | endTime: 1592 | description: This is a default description. 1593 | type: post 1594 | responseBodyHtml: 1595 | description: This is a default description. 1596 | type: post 1597 | responseBodyPlainText: 1598 | description: This is a default description. 1599 | type: post 1600 | responseSubject: 1601 | description: This is a default description. 1602 | type: post 1603 | restrictToContacts: 1604 | description: This is a default description. 1605 | type: post 1606 | restrictToDomain: 1607 | description: This is a default description. 1608 | type: post 1609 | startTime: 1610 | description: This is a default description. 1611 | type: post 1612 | WatchRequest: 1613 | properties: 1614 | labelFilterAction: 1615 | description: This is a default description. 1616 | type: post 1617 | labelIds: 1618 | description: This is a default description. 1619 | type: post 1620 | topicName: 1621 | description: This is a default description. 1622 | type: post 1623 | WatchResponse: 1624 | properties: 1625 | expiration: 1626 | description: This is a default description. 1627 | type: post 1628 | historyId: 1629 | description: This is a default description. 1630 | type: post ```