Stay organized with collections
Save and categorize content based on your preferences.
The Gmail API is a RESTful API that can be used to access Gmail mailboxes and
send mail. For most web applications the Gmail API is the best choice for
authorized access to a user's Gmail data and is suitable for various
applications, such as:
Read-only mail extraction, indexing, and backup
Automated or programmatic message sending
Email account migration
Email organization including filtering and sorting of messages
Standardization of email signatures across an organization
Following is a list of common terms used in the Gmail API:
Message
An email message containing the sender, recipients, subject, and body. After a
message has been created, a message cannot be changed. A message is represented
by a message resource.
Thread
A collection of related messages forming a conversation. In an email client
app, a thread is formed when one or more recipients respond to a message with
their own message.
Label
A mechanism for organizing messages and threads. For example,
the label "taxes" might be created and applied to all messages and threads
having to do with a user's taxes. There are two types of labels:
System labels
Internally-created labels, such as INBOX, TRASH, or SPAM. These labels
cannot be deleted or modified. However, some system labels, such as INBOX
can be applied to, or removed from, messages and threads.
User labels
Labels created by a user. These labels can be deleted or modified by the
user or an application. A user label is represented by a
label resource.
Draft
An unsent message. A message contained within the draft can be replaced.
Sending a draft automatically deletes the draft and creates a message with
the SENT system label. A draft is represented by a
draft resource.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[],null,["The Gmail API is a RESTful API that can be used to access Gmail mailboxes and\nsend mail. For most web applications the Gmail API is the best choice for\nauthorized access to a user's Gmail data and is suitable for various\napplications, such as:\n\n- Read-only mail extraction, indexing, and backup\n- Automated or programmatic message sending\n- Email account migration\n- Email organization including filtering and sorting of messages\n- Standardization of email signatures across an organization\n\nFollowing is a list of common terms used in the Gmail API:\n\n*Message*\n: An email message containing the sender, recipients, subject, and body. After a\n message has been created, a message cannot be changed. A message is represented\n by a [message resource](/workspace/gmail/api/reference/rest/v1/users.messages#Message).\n\n*Thread*\n: A collection of related messages forming a conversation. In an email client\n app, a thread is formed when one or more recipients respond to a message with\n their own message.\n\n*Label*\n\n: A mechanism for organizing messages and threads. For example,\n the label \"taxes\" might be created and applied to all messages and threads\n having to do with a user's taxes. There are two types of labels:\n\n *System labels*\n : Internally-created labels, such as `INBOX`, `TRASH`, or `SPAM`. These labels\n cannot be deleted or modified. However, some system labels, such as `INBOX`\n can be applied to, or removed from, messages and threads.\n\n *User labels*\n : Labels created by a user. These labels can be deleted or modified by the\n user or an application. A user label is represented by a\n [label resource](/workspace/gmail/api/reference/rest/v1/users.labels).\n\n*Draft*\n\n: An unsent message. A message contained within the draft can be replaced.\n Sending a draft automatically deletes the draft and creates a message with\n the `SENT` system label. A draft is represented by a\n [draft resource](/workspace/gmail/api/reference/rest/v1/users.drafts).\n\nNext steps\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer\n to [Get started as a Google Workspace developer](/workspace/guides/getstarted-overview).\n\n- To learn how to configure and run a simple Gmail API app, read the\n [Quickstarts overview](/workspace/gmail/api/guides/quickstarts-overview)."]]