SheetgoDevelopers

Developers › REST API › Forms & Integrations

REST API · 5 endpoints

outlook

Complete for this group. Each operation below lists its parameters, request body, responses and errors. Every model they use is documented under Models used on this page, so you do not need another page to build a request. Base URL https://dev-api.sheetgo.com; send Authorization: Bearer sg_…. Latest version: https://dev-api.sheetgo.com/rest/reference/outlook (Markdown).

Conventions for every endpoint. Lists take page (from 1) and per_page (1-100, default 50), and total counts pages, not items. Collection URLs end with /. POST …/run returns 200 when the run is queued; poll GET …/run. Google Sheets use provider: "drive"; column fields take letters ("E"). Error bodies and status codes: api.html#api-errors.

Python recipes. API client helper.

Integration endpoints used by the Sheetgo add-in for Microsoft Outlook to connect mailbox data to workflows.

Operations

GET/rest/beta/outlook/messagesList Messages

Page through messages in a folder.

folder is a snake-case name (e.g. "inbox") mapped to a well-known mail folder; unknown values return 400. limit is bounded to [1, 100]; a value outside the range returns 400 before any upstream call is made.

Parameters
NameInTypeDescription
folderquerystringoptionalWell-known mail folder to read, snake_case (for example inbox, sent_items, drafts). An unknown name returns 400.
Default: "inbox"
limitqueryintegeroptionalMessages per page, 1-100. Outside that range returns 400 before any call to Microsoft is made.
Default: 25
page_tokenquerystringoptionalOpaque token from a previous response's paging cursor. Omit for the first page.
Responses
StatusMeaningBody
200Successful Responseany
401Auth failed—
422Validation ErrorHTTPValidationError
Example request
curl -s -X GET "https://dev-api.sheetgo.com/rest/beta/outlook/messages" \
  -H "Authorization: Bearer $SHEETGO_API_KEY"
POST/rest/beta/outlook/messages/batchBatch Messages

Resolve a list of message ids to message bodies in one shot.

Missing or cross-owner ids come back as {id, error: "message_not_found"} entries inside values.messages rather than failing the whole call.

Request body (required)

application/json · BatchBody

FieldTypeDescription
idsarray of stringrequiredMessage ids to fetch. At most 50, or 10 when include_attachments is true.
Min items: 1
include_attachmentsbooleanoptionalWhether to return each message's attachment content as well as its metadata. Lowers the batch cap to 10.
Default: false
Responses
StatusMeaningBody
200Successful Responseany
401Auth failed—
422Validation ErrorHTTPValidationError
Example request
curl -s -X POST "https://dev-api.sheetgo.com/rest/beta/outlook/messages/batch" \
  -H "Authorization: Bearer $SHEETGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json
GET/rest/beta/outlook/messages/{message_id}Get Message

Fetch one message by id.

include_attachments=true opts the response into the $expand=attachments Graph path; the controller enforces the 25 MB total cap and raises 413 AttachmentsTooLarge if exceeded. For larger attachments, fall back to the per-attachment binary endpoint below.

Parameters
NameInTypeDescription
message_idpathstringrequiredId of the message to fetch.
include_attachmentsquerybooleanoptionalInclude each attachment's content in the response. Capped at 25 MB in total — a larger message returns 413, so fetch those attachments one at a time instead.
Default: false
Responses
StatusMeaningBody
200Successful Responseany
401Auth failed—
422Validation ErrorHTTPValidationError
Example request
curl -s -X GET "https://dev-api.sheetgo.com/rest/beta/outlook/messages/MESSAGE_ID" \
  -H "Authorization: Bearer $SHEETGO_API_KEY"
GET/rest/beta/outlook/messages/{message_id}/attachments/{attachment_id}Get Attachment

Stream a single attachment as its native bytes (NOT base64-wrapped).

Returns application/<original mime> with a Content-Disposition: attachment; filename="..." header. Filenames are escaped for the " delimiter — a malicious upload couldn't smuggle extra header fields via a crafted name.

Parameters
NameInTypeDescription
message_idpathstringrequiredId of the message the attachment belongs to.
attachment_idpathstringrequiredId of the attachment to download.
Responses
StatusMeaningBody
200Successful Responseany
401Auth failed—
422Validation ErrorHTTPValidationError
Example request
curl -s -X GET "https://dev-api.sheetgo.com/rest/beta/outlook/messages/MESSAGE_ID/attachments/ATTACHMENT_ID" \
  -H "Authorization: Bearer $SHEETGO_API_KEY"
POST/rest/beta/outlook/sendSend

Send a message through the connected Microsoft account.

Body validation (recipient count, attachment count, attachment total size) runs before this handler; invalid input returns 422 with the field-level reason. An address rejected upstream returns 400.

Defaults: save_to_sent_items=True.

Request body (required)

application/json · SendBody

FieldTypeDescription
attachmentsarray of AttachmentInoptionalFiles to attach: at most 10, totalling no more than 3 MB once decoded.
Default: []
bccarray of stringoptionalBlind-carbon-copy recipients, hidden from other recipients.
Default: []
bodyBodyContentrequiredThe message body and whether it is plain text or HTML.
ccarray of stringoptionalCarbon-copy recipients, visible to everyone.
Default: []
save_to_sent_itemsbooleanoptionalWhether to keep a copy in the account's Sent Items folder. Set false to send without recording it.
Default: true
subjectstringoptionalSubject line. Optional; defaults to an empty subject.
Default: ""
toarray of stringrequiredPrimary recipients. At least one is required; to, cc and bcc together may not exceed 50 addresses.
Min items: 1
Responses
StatusMeaningBody
202Successful Responseany
401Auth failed—
422Validation ErrorHTTPValidationError
Example request
curl -s -X POST "https://dev-api.sheetgo.com/rest/beta/outlook/send" \
  -H "Authorization: Bearer $SHEETGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json

Models used on this page

Every request and response model referenced above, including nested ones (6). The full catalogue is on api-models.html.

AttachmentIn

FieldTypeDescription
content_base64stringrequiredThe file's bytes, base64-encoded. All attachments on one message must total no more than 3 MB decoded.
content_typestringrequiredMIME type of the attachment, e.g. application/pdf.
filenamestringrequiredFile name the recipient will see, including the extension.

BatchBody

Fetch several messages in one request, by id.

FieldTypeDescription
idsarray of stringrequiredMessage ids to fetch. At most 50, or 10 when include_attachments is true.
Min items: 1
include_attachmentsbooleanoptionalWhether to return each message's attachment content as well as its metadata. Lowers the batch cap to 10.
Default: false

Used by: POST /rest/beta/outlook/messages/batch

BodyContent

FieldTypeDescription
contentstringrequiredThe message body itself, in the format named by content_type.
content_typeone of "text", "html"optionalHow content should be interpreted: text for plain text, html for an HTML body.
Default: "text"

HTTPValidationError

FieldTypeDescription
detailarray of ValidationErroroptional

Used by: GET /rest/beta/workflows/, POST /rest/beta/workflows/, POST /rest/beta/workflows/run/{id}, GET /rest/beta/workflows/{id}, PATCH /rest/beta/workflows/{id}, DELETE /rest/beta/workflows/{id}, GET /rest/beta/workflows/{id}/collaborators, POST /rest/beta/workflows/{id}/collaborators, DELETE /rest/beta/workflows/{id}/collaborators, PATCH /rest/beta/workflows/{id}/collaborators/{email}, DELETE /rest/beta/workflows/{id}/collaborators/{email}, GET /rest/beta/workflows/{id}/destinations, GET /rest/beta/workflows/{id}/files, GET /rest/beta/workflows/{id}/general-access, PUT /rest/beta/workflows/{id}/general-access, DELETE /rest/beta/workflows/{id}/general-access, POST /rest/beta/workflows/{id}/leave, POST /rest/beta/workflows/{id}/request-access, GET /rest/beta/workflows/{id}/run, POST /rest/beta/workflows/{id}/run, GET /rest/beta/workflows/{id}/sources, GET /rest/beta/automations/, POST /rest/beta/automations/run/{id}, GET /rest/beta/automations/{id}, DELETE /rest/beta/automations/{id}, GET /rest/beta/automations/{id}/destinations, GET /rest/beta/automations/{id}/files, GET /rest/beta/automations/{id}/run, POST /rest/beta/automations/{id}/run, GET /rest/beta/automations/{id}/sources, GET /rest/beta/workflows/{id}/trigger, DELETE /rest/beta/workflows/{id}/trigger, GET /rest/beta/workflows/{id}/dashboard, DELETE /rest/beta/workflows/{id}/dashboard/elements/{element_id}, GET /rest/beta/workflows/{id}/dashboard/elements/{element_id}/data, PUT /rest/beta/workflows/{id}/dashboard/publish, GET /rest/beta/workflows/{workflow_id}/forms/, POST /rest/beta/workflows/{workflow_id}/forms/, GET /rest/beta/workflows/{workflow_id}/forms/{form_id}, PATCH /rest/beta/workflows/{workflow_id}/forms/{form_id}, DELETE /rest/beta/workflows/{workflow_id}/forms/{form_id}, GET /rest/beta/workflows/{workflow_id}/forms/{form_id}/responses, HEAD /rest/beta/workflows/{workflow_id}/forms/{form_id}/responses, GET /rest/beta/automations/{automation_id}/webhook, GET /rest/beta/workflows/{workflow_id}/webhooks, GET /rest/beta/api-destination/{public_id}, HEAD /rest/beta/api-destination/{public_id}, GET /rest/beta/integrations/{provider}/options, GET /rest/beta/outlook/messages, POST /rest/beta/outlook/messages/batch, GET /rest/beta/outlook/messages/{message_id}, GET /rest/beta/outlook/messages/{message_id}/attachments/{attachment_id}, POST /rest/beta/outlook/send, POST /rest/beta/gmail/send, GET /rest/beta/files/{provider}, GET /rest/beta/files/{provider}/roots, GET /rest/beta/files/{provider}/search, GET /rest/beta/files/{provider}/{file_id}, GET /rest/beta/bigquery/projects, GET /rest/beta/bigquery/projects/{project}/datasets, GET /rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables, GET /rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables/{table}, POST /rest/beta/bigquery/projects/{project}/validate-query, POST /rest/auth/refresh, POST /rest/auth/token

SendBody

One message to send through the authorized Outlook account.

FieldTypeDescription
attachmentsarray of AttachmentInoptionalFiles to attach: at most 10, totalling no more than 3 MB once decoded.
Default: []
bccarray of stringoptionalBlind-carbon-copy recipients, hidden from other recipients.
Default: []
bodyBodyContentrequiredThe message body and whether it is plain text or HTML.
ccarray of stringoptionalCarbon-copy recipients, visible to everyone.
Default: []
save_to_sent_itemsbooleanoptionalWhether to keep a copy in the account's Sent Items folder. Set false to send without recording it.
Default: true
subjectstringoptionalSubject line. Optional; defaults to an empty subject.
Default: ""
toarray of stringrequiredPrimary recipients. At least one is required; to, cc and bcc together may not exceed 50 addresses.
Min items: 1

Used by: POST /rest/beta/outlook/send

ValidationError

FieldTypeDescription
locarray of string or integerrequired
msgstringrequired
typestringrequired