Every endpoint in this group: what it needs, the fields it accepts (type, required, limits), what it returns and its errors.
List bounded retained operation status metadata for one customer/connection, newest first. Defaults to unresolved work; no native request, payload/receipt content, upload capability or acknowledgment note. Caller/query-bound cursor expires after15minutes; changing statuses and retention prevent sna…
Gmail-only senders is one bounded collection of at most100 configured sender metadata records. No SMTP details, display names or signatures. Omit limit (only default20 accepted), cursor, body and listing options. Read-only metadata never authorizes a send. Exact message_mime requires message_id, in…
message_mime only, with include_body:true. Full untrusted headers/Bcc/body/files/embedded data; provider serialization, not guaranteed original-wire archive. At most1MiB decoded bytes, never truncated.
include_item_content
true
No
Required for attached_event/contact with include_nested_content:true. Selected embedded fields only; no separate calendar/contact permission or action. Native event local time and timezone are preserved without conversi…
include_nested_content
true
No
Required for Outlook attached_message with include_body:true, or attached_event/contact with include_item_content:true. Native expansion may retrieve nested content; unselected data is suppressed. No body_format or curs…
body_format
enum
No
one of: "text", "html"Requires message/draft and include_body=true. Gmail selects the requested native alternative, or returns null; default prefers text with HTML fallback. Graph requests native conversion. Gmail body.charset reports the se…
search
string
No
length 1–512Native Gmail q or Outlook KQL; Microsoft returns at most 1000 search matches.
Explicitly enable whole-mailbox Gmail push and automatic renewal on an existing resolved active tracker. Same user/key as tracker creator; authenticated Pub/Sub configured by operator. Preserves checkpoints and polling fallback; no send permission.
POST/api/v1/projects/{project_id}/email/syncs/{sync_id}/pushemail:read and email:sync:write
Parameters
Field
Type
Required
Rules
sync_id path
uuid
Yes
Request body
Field
Type
Required
Rules
customer_id
uuid
Yes
expected_revision
integer
Yes
1–2147483646
watch_scope
"whole_mailbox"
Yes
enable_automatic_renewal
true
Yes
Response 202
Field
Type
Required
Rules
push
object
Yes
Errors
400 Invalid request
401 Authentication required
402 Billing activation or published usage allowance required
403 Project, role or scope denied
409 State, ownership, idempotency or configuration conflict
429 Rate limit; respect Retry-After
502 Invalid stored result or inconsistent project/customer/operation binding; no private data returned
503 Maintenance mode or required service configuration unavailable
Explicitly enable whole-mailbox Outlook push and automatic renewal on an existing resolved active tracker. Same user/key as tracker creator; Microsoft Graph basic notifications configured by operator; delegated Mail.Read required. Preserves checkpoints and polling fallback; no send permission.
POST/api/v1/projects/{project_id}/email/syncs/{sync_id}/outlook-pushemail:read and email:sync:write
Parameters
Field
Type
Required
Rules
sync_id path
uuid
Yes
Request body
Field
Type
Required
Rules
customer_id
uuid
Yes
expected_revision
integer
Yes
1–2147483646
watch_scope
"whole_mailbox"
Yes
enable_automatic_renewal
true
Yes
Response 202
Field
Type
Required
Rules
push
object
Yes
Errors
400 Invalid request
401 Authentication required
402 Billing activation or published usage allowance required
403 Project, role or scope denied
409 State, ownership, idempotency or configuration conflict
429 Rate limit; respect Retry-After
502 Invalid stored result or inconsistent project/customer/operation binding; no private data returned
503 Maintenance mode or required service configuration unavailable
Start bounded metadata/reference polling, up to8 scopes per connection; resolves native folder/label IDs and fences credentials. All scopes share100 unacknowledged batches/10MiB. Explicit legacy replacement required; no provider push subscription
POST/api/v1/projects/{project_id}/email/syncsemail:read and email:sync:write
Request body
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
folder_id
string
No
length 1–1000 · pattern ^[A-Za-z0-9_+=/-]+$
interval_seconds
integer
No
300–86400
page_size
integer
No
1–50
expired_history_policy
enum
No
one of: "stop", "resnapshot"Gmail only: opt-in bounded snapshot restart after expired history, with reset/gap markers and a new generation; never recover missing events
Response 202
Field
Type
Required
Rules
sync
object
Yes
Errors
400 Invalid request
401 Authentication required
402 Billing activation or published usage allowance required
403 Project, role or scope denied
409 State, ownership, idempotency or configuration conflict
429 Rate limit; respect Retry-After
502 Invalid stored result or inconsistent project/customer/operation binding; no private data returned
503 Maintenance mode or required service configuration unavailable
402 Billing activation or published usage allowance required
403 Project, role or scope denied
409 State, ownership, idempotency or configuration conflict
429 Rate limit; respect Retry-After
502 Invalid stored result or inconsistent project/customer/operation binding; no private data returned
503 Maintenance mode or required service configuration unavailable
Request
curl -X GET "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/email/uploads/$ID" \
-H "Authorization: Bearer $TECHRACE_API_KEY"
Explicitly abandon local upload tracking after native investigation and acknowledgement of unknown operations. Pending/leased operations block this. Does not confirm native cleanup.
Queue mail, draft lifecycle, reply/forward, message-state or folder changes. Folder operations need email:read+email:modify and use a mailbox-wide ordered lane. Non-create folder actions need metadata expected_revision; Outlook delete/move/copy explicitly confirm contents; Gmail label deletion neve…
POST/api/v1/projects/{project_id}/email/operationsemail:send or email:drafts:write; reply/forward and existing-draft actions additionally require email:read; state/label/move mutations require email:modify
Parameters
Field
Type
Required
Rules
Idempotency-Key header
string
Yes
length 8–200 · pattern ^[A-Za-z0-9_.:-]+$
Request body
The body takes one of 24 shapes, chosen by the field shown.
action = "begin_attachment_upload"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"begin_attachment_upload"
Yes
upload_id
uuid
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
filename
string
Yes
length 1–120Maximum180 UTF-8 bytes; no controls, path separators, dot or dot-dot
size_bytes
integer
Yes
3000000–150000000
action = "put_attachment_chunk"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"put_attachment_chunk"
Yes
upload_id
uuid
Yes
draft_id
string
Yes
length 1–1000
offset
integer
Yes
0–149999999
content_base64
string
Yes
length 4–1398104Canonical base64 for1–1048576 bytes. Offset must equal committed next_offset; wait for each successful receipt.
action = "cancel_attachment_upload"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"cancel_attachment_upload"
Yes
upload_id
uuid
Yes
draft_id
string
Yes
length 1–1000
confirm_cancel
true
Yes
action = "add_draft_attachment"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"add_draft_attachment"
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
attachment
object
Yes
attachment.content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
attachment.filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
attachment.content_type
string
Yes
length 0–120
attachment.content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "remove_draft_attachment"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"remove_draft_attachment"
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
attachment_id
string
Yes
length 1–1000
confirm_delete
true
Yes
action = "create_folder"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"create_folder"
Yes
name
string
Yes
length 1–225Maximum225 UTF-8 bytes; trimmed; no controls
parent_folder_id
string
No
length 1–1000
is_hidden
boolean
No
action = "rename_folder"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"rename_folder"
Yes
folder_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
name
string
Yes
length 1–225
action = "delete_folder"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"delete_folder"
Yes
folder_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
confirm_delete
true
Yes
confirm_delete_contents
true
No
Required for Outlook; omitted for Gmail
action = "move_folder"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"move_folder"
Yes
folder_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
destination_folder_id
string
Yes
length 1–1000
confirm_move_contents
true
Yes
action = "copy_folder"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"copy_folder"
Yes
folder_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
destination_folder_id
string
Yes
length 1–1000
confirm_copy_contents
true
Yes
action = "send_gmail_alias"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"send_gmail_alias"
Yes
from_email
string (email)
Yes
length 0–254 · pattern ^[\x21-\x7e]+$
expected_reply_to
string | null
Yes
length 0–254 · pattern ^[\x21-\x7e]+$
expected_external_relay
boolean
Yes
confirm_sender
true
Yes
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.subject
string
Yes
length 0–998
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "send"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"send"
Yes
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.subject
string
Yes
length 0–998
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "create_draft"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"create_draft"
Yes
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.subject
string
Yes
length 0–998
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "create_reply_draft"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"create_reply_draft"
Yes
message_id
string
Yes
length 1–1000
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "reply"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"reply"
Yes
message_id
string
Yes
length 1–1000
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
action = "forward"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"forward"
Yes
message_id
string
Yes
length 1–1000
to
string (email)[]
Yes
1–20 items
text
string
Yes
length 0–10000
include_original_attachments
boolean
No
include_original_html
true
No
Gmail-only explicit original HTML quotation; literal owned CID images also require independent attachment consent. No remote fetch or rendering. Existing body/file bounds and final current authority apply.
action = "send_draft"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"send_draft"
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
action = "update_draft"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"update_draft"
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
message
object
Yes
message.to
string (email)[]
Yes
1–20 items
message.cc
string (email)[]
No
0–20 items
message.bcc
string (email)[]
No
0–20 items
message.subject
string
Yes
length 0–998
message.text
string
Yes
length 1–100000
message.html
string
No
length 1–100000Optional untrusted HTML; combined text+HTML maximum100000 characters. Gmail preserves a MIME text alternative; Graph JSON selects HTML body.
message.attachments
object[]
No
0–6 items
message.attachments[].content_id
string
No
length 3–240 · pattern ^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$Optional inline PNG/JPEG/GIF Content-ID. Unique within the message and referenced literally as cid:ID in HTML. No remote fetch.
message.attachments[].filename
string
Yes
length 1–120No control characters or path separators; at most180 UTF8 bytes
message.attachments[].content_type
string
Yes
length 0–120
message.attachments[].content_base64
string
Yes
length 0–4000000Canonical padded base64; at most2999999 aggregate decoded bytes across at most6 files
preserve_attachments
true
No
Outlook-only; retain existing attachments during content update; replacement attachments must be empty
action = "delete_draft"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"delete_draft"
Yes
draft_id
string
Yes
length 1–1000
expected_revision
string
Yes
length 1–1000
confirm_delete
true
Yes
action = "trash_message"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"trash_message"
Yes
expected_provider
"gmail"
Yes
message_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
confirm_trash
true
Yes
action = "restore_message"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"restore_message"
Yes
expected_provider
"gmail"
Yes
message_id
string
Yes
length 1–1000
expected_revision
string
Yes
pattern ^[A-Za-z0-9_-]{43}$
confirm_restore
true
Yes
action = "set_read_state"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"set_read_state"
Yes
message_id
string
Yes
length 1–1000
is_read
boolean
Yes
action = "move_message"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"move_message"
Yes
message_id
string
Yes
length 1–1000
destination_folder_id
string
Yes
length 1–1000Outlook destination folder id or well-known folder name
action = "modify_labels"
Field
Type
Required
Rules
customer_id
uuid
Yes
connection_id
uuid
Yes
action
"modify_labels"
Yes
message_id
string
Yes
length 1–1000
add_label_ids
string[]
No
0–100 items
remove_label_ids
string[]
No
0–100 items
Response 202
Field
Type
Required
Rules
operation
object
Yes
delivery_confirmed
false
Yes
Errors
400 Invalid request
401 Authentication required
402 Billing activation or published usage allowance required
403 Project, role or scope denied
409 State, ownership, idempotency or configuration conflict
429 Rate limit; respect Retry-After
503 Maintenance mode or required service configuration unavailable