Update mailbox config
const url = 'https://app.docstosheets.com/api/Mailboxes/example/config';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","hint":"example","fields":[{"key":"example","label":"example","type":"text","hint":"example","unit":"example","values":["example"],"required":true,"formula":"example","validator":{"kind":"email","pattern":"example","expression":"example","message":"example"},"validate":"example"}],"groups":[{"id":"example","name":"example","fields":[{"key":"example","label":"example","type":"text","hint":"example","unit":"example","values":["example"],"required":true,"formula":"example","validator":{"kind":"email","pattern":"example","expression":"example","message":"example"},"validate":"example"}]}],"splitKeys":[{"fieldKey":"example","interval":"year"}],"layout":{"label":"example","children":[{"type":"grid","span":1,"children":[],"level":1,"key":"example","label":"example","control":"text","group":"example","tableColumns":["example"]}]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.docstosheets.com/api/Mailboxes/example/config \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "hint": "example", "fields": [ { "key": "example", "label": "example", "type": "text", "hint": "example", "unit": "example", "values": [ "example" ], "required": true, "formula": "example", "validator": { "kind": "email", "pattern": "example", "expression": "example", "message": "example" }, "validate": "example" } ], "groups": [ { "id": "example", "name": "example", "fields": [ { "key": "example", "label": "example", "type": "text", "hint": "example", "unit": "example", "values": [ "example" ], "required": true, "formula": "example", "validator": { "kind": "email", "pattern": "example", "expression": "example", "message": "example" }, "validate": "example" } ] } ], "splitKeys": [ { "fieldKey": "example", "interval": "year" } ], "layout": { "label": "example", "children": [ { "type": "grid", "span": 1, "children": [], "level": 1, "key": "example", "label": "example", "control": "text", "group": "example", "tableColumns": [ "example" ] } ] } }'Replaces the mailbox’s extraction config (fields and repeating groups).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
object
Canonical field type vocabulary, serialized lowercase (text, number, integer, currency, date, time, datetime, boolean, enum, address) — identical tokens in C#, TypeScript, the renderer, and the extraction prompt. Integer/Time/Datetime/Enum semantics (normalization, prompts, controls) land in a later phase.
object
object
object
Canonical field type vocabulary, serialized lowercase (text, number, integer, currency, date, time, datetime, boolean, enum, address) — identical tokens in C#, TypeScript, the renderer, and the extraction prompt. Integer/Time/Datetime/Enum semantics (normalization, prompts, controls) land in a later phase.
object
object
Granularity used to bucket date/datetime split-key values.
object
object
For Table nodes: the repeating section (group id) this table renders. May be omitted when the config has exactly one section.
Responses
Section titled “ Responses ”object
object
object
Canonical field type vocabulary, serialized lowercase (text, number, integer, currency, date, time, datetime, boolean, enum, address) — identical tokens in C#, TypeScript, the renderer, and the extraction prompt. Integer/Time/Datetime/Enum semantics (normalization, prompts, controls) land in a later phase.
object
object
object
Canonical field type vocabulary, serialized lowercase (text, number, integer, currency, date, time, datetime, boolean, enum, address) — identical tokens in C#, TypeScript, the renderer, and the extraction prompt. Integer/Time/Datetime/Enum semantics (normalization, prompts, controls) land in a later phase.
object
object
Granularity used to bucket date/datetime split-key values.
object
object
object
For Table nodes: the repeating section (group id) this table renders. May be omitted when the config has exactly one section.
The export provider for a mailbox’s extracted data.
URL to the export folder in the provider (Google Drive or OneDrive).
URL to the export spreadsheet (Google Sheets or Excel Online). Only set for mailboxes without split keys; split mailboxes expose per-split workbook URLs via the splits endpoint.
State of the mailbox’s workbook synchronization (full-rewrite export).
When the workbook was last fully rewritten by sync.
Last sync failure message (null when the last sync succeeded).
The mailbox-config draft session this mailbox was created from, if any. Its sample documents feed the layout agent (“Adjust with AI”) and future re-inference.
object
object
object
object
Example
{ "config": { "fields": [ { "type": "text", "validator": { "kind": "email" } } ], "groups": [ { "fields": [ { "type": "text", "validator": { "kind": "email" } } ] } ], "splitKeys": [ { "interval": "year" } ], "layout": { "definition": { "children": [ { "type": "grid", "control": "text" } ] } } }, "accessType": "owned", "exportProvider": "none", "syncStatus": "idle"}object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}