Read and send email through a connected Google account.
List or search messages (Gmail search syntax), read one message in full and download its attachments, with the same envelopes and message fields as the Outlook endpoints. Reading needs Gmail read access on the user's Google connection; without it the endpoints return 412 gmail_not_connected. Gmail always stores sent mail in SENT, so send has no save_to_sent_items option.
Base URL: https://api.sheetgo.com. Paths are complete, version included (/rest/beta/...): append them to the base URL exactly as shown. Start page: https://api.sheetgo.com/rest/reference.md
This page documents every endpoint of the group. Request and response shapes link to model pages; fetch the model pages an endpoint links before building a body.
Guide: Rate Limiting
Every endpoint is rate limited; see the guide Rate Limiting.
Batch Messages
Fetch several messages in full in one call, in the order asked.
A missing or malformed id comes back as {id, error: "message_not_found"} inside
values.messages instead of failing the call. At most 50 ids, or 10 with
include_attachments (whose content may total at most 25 MB).
Authentication, any one of: default; Developer Access; sheetgo-api-key.
Request body
Content type application/json. Required.
Body: GmailBatchBody
Responses
200 Successful Response401 Auth failed422 Validation Error. Schema: HTTPValidationErrorRead next: GmailBatchBody, HTTPValidationError.
List Messages
List or search messages, newest first, one page at a time.
Each message is a summary (no body): ids, subject, sender, recipients, dates, snippet, labels, read state and attachment metadata. Fetch the body with GET /messages/{message_id}.
Authentication, any one of: default; Developer Access; sheetgo-api-key.
Parameters
| Name | In | Type | Required | Description | Allowed values / default / constraints |
|---|---|---|---|---|---|
limit |
query | integer | no | Messages per page, 1-100. Outside that range returns 400 before any call to Google is made. | default: 25 |
label |
query | string, nullable | no | Gmail label to list: a system label (INBOX, SENT, STARRED, UNREAD, ...), a label id, or a user label's name (e.g. Invoices). Pass an empty value to list all mail. Ignored when q is given. |
default: "INBOX" |
q |
query | string, nullable | no | Gmail search query (the syntax of Gmail's search box), e.g. from:ana@acme.com has:attachment newer_than:7d. Searches all mail; narrow it inside the query (in:inbox, label:invoices). |
|
page_token |
query | string, nullable | no | next_page_token from a previous response. Omit for the first page. |
Responses
200 Successful Response401 Auth failed422 Validation Error. Schema: HTTPValidationErrorRead next: HTTPValidationError.
Get Message
Fetch one message in full: date, from, to, cc, bcc, subject, Message-ID,
labels with their names, the body (HTML when the message has one, plus the
plain-text version in body_text) and attachment metadata — plus attachment
content with include_attachments=true.
Authentication, any one of: default; Developer Access; sheetgo-api-key.
Parameters
| Name | In | Type | Required | Description | Allowed values / default / constraints |
|---|---|---|---|---|---|
message_id |
path | string | yes | Id of the message (from a list or search). | |
include_attachments |
query | boolean | no | Include each attachment's content (base64). Capped at 25 MB in total — a larger message returns 413, so fetch those attachments one at a time instead. | default: false |
Responses
200 Successful Response401 Auth failed422 Validation Error. Schema: HTTPValidationErrorRead next: HTTPValidationError.
Get Attachment
Download one attachment as its native bytes (not base64), with
Content-Disposition: attachment; filename="...".
Authentication, any one of: default; Developer Access; sheetgo-api-key.
Parameters
| Name | In | Type | Required | Description | Allowed values / default / constraints |
|---|---|---|---|---|---|
message_id |
path | string | yes | Id of the message the attachment belongs to. | |
attachment_id |
path | string | yes | Id of the attachment, from the message's attachments list. |
Responses
200 Successful Response401 Auth failed422 Validation Error. Schema: HTTPValidationErrorRead next: HTTPValidationError.
Send
Send a message through the connected Google account.
Gmail always stores the sent message in SENT — there is no
save_to_sent_items equivalent. Total attachment bytes are capped at 3 MB
and recipients at 50, matching the Outlook contract.
Authentication, any one of: default; Developer Access; sheetgo-api-key.
Request body
Content type application/json. Required.
Body: GmailSendBody
Responses
202 Successful Response401 Auth failed422 Validation Error. Schema: HTTPValidationErrorRead next: GmailSendBody, HTTPValidationError.
More: start page https://api.sheetgo.com/rest/reference.md, everything in one file https://api.sheetgo.com/rest/llms-full.txt, OpenAPI https://api.sheetgo.com/rest/openapi.json.