{"openapi":"3.1.0","info":{"title":"Sheetgo API","description":"This API is the starting point to interact with Sheetgo services — manage your workflows, automations, and forms, and read the data they produce.\n\n## Authentication\nThe easiest way to use the API is with an **API key**. Generate one on your **Account** page in Sheetgo, then send it as a Bearer token on every request:\n\n```\nAuthorization: Bearer sg_your_api_key\n```\n\nYou can authorize this interactive page directly: click **Authorize** (top right) and paste your API key, or use OAuth2 `Client ID` / `Client Secret` for developer and customer integrations (contact support to enable those).\n\n## Trying it here\nThis is the interactive **Swagger UI** — expand an endpoint and use **Try it out** to send real requests against your account. For a cleaner, read-only reference with per-resource guides, see the **[ReDoc documentation](/rest/redoc)**. The raw OpenAPI spec is at **[/rest/openapi.json](/rest/openapi.json)**.\n\n## Support\n[support@sheetgo.com](mailto:support@sheetgo.com)\n","contact":{"name":"Sheetgo Support","url":"https://www.sheetgo.com/contact-support/","email":"support@sheetgo.com"},"version":"0.0.1","x-logo":{"url":"https://static.sheetgo.com/wp-content/uploads/2020/05/sheetgo-logo-20200521.svg","altText":"Sheetgo"}},"servers":[{"url":"https://dev-api.sheetgo.com"}],"paths":{"/rest/beta/automations/run/{id}":{"post":{"tags":["automations"],"summary":"(Obsolete) Use /automations/<id>/run instead","description":"This endpoint will be removed","operationId":"automation_run_deprecated_rest_beta_automations_run__id__post","deprecated":true,"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{id}/run":{"post":{"tags":["automations"],"summary":"Run an automation","description":"Given an automation Id, the automation will start its execution","operationId":"automation_run_rest_beta_automations__id__run_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["automations"],"summary":"Get an automation's last-run status","description":"Last-run execution status of a single automation (latest only — no history).","operationId":"automation_run_status_rest_beta_automations__id__run_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"Automation last-run status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunStatus"}}}},"404":{"description":"Automation not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{id}/files":{"get":{"tags":["automations"],"summary":"Get file sources and destinations of an automation","description":"Return the sources and destinations of an automation.\n\nEvery source type is included (file, folder, api, webhook, integration,\nbigquery, outlook); write-only fields such as an api source's headers\nare omitted.\n\nDestinations include generated-document and PDF destinations, which are\nbacked by a Drive folder (and, for documents, the Docs template).","operationId":"automation_files_rest_beta_automations__id__files_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"File sources and destinations of the automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{id}/sources":{"get":{"tags":["automations"],"summary":"Get file sources of an automation","description":"Return the sources of an automation.\n\nEvery source type is included (file, folder, api, webhook, integration,\nbigquery, outlook), in the shape `GET /automations/{id}` returns;\nwrite-only fields such as an api source's headers are omitted.","operationId":"automation_sources_rest_beta_automations__id__sources_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"File sources of the automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{id}/destinations":{"get":{"tags":["automations"],"summary":"Get file destinations of an automation","description":"Return the file/folder destinations of an automation.\n\nDestinations include generated-document and PDF destinations, which are\nbacked by a Drive folder (and, for documents, the Docs template).","operationId":"automation_destinations_rest_beta_automations__id__destinations_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"File destinations of the automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{id}":{"get":{"tags":["automations"],"summary":"Get a single automation","description":"Given an automation id, returns the automation model data","operationId":"automation_get_rest_beta_automations__id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"The automation model data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["automations"],"summary":"Replace an existing automation entirely","description":"**Column letters.** Every column field — `filter` (`columns`, `expressions[].column`), `split.column`, `left_join.column`, `remove_duplicates.columns` and `anonymize.columns` keys — takes the spreadsheet column LETTER (`D`), not the header name (`Status`), because the engine addresses columns by position. A header name is rejected with 422 `invalid_column`.\n\nTo find the letter, read the source file's header row first:\n\n1. `GET /files/{provider}/{file_id}/structure?include=columns&tab=Orders&header_row=1` — use the source's `id` and `provider`, the tab you import and its `offset_header` as `header_row`. A folder id reads its newest spreadsheet.\n2. Pick the letter from `tabs[].columns`, e.g. `{\"letter\": \"D\", \"index\": 3, \"header\": \"Status\"}`.\n3. Use it in the automation:\n\n```json\n\"filter\": {\"type\": \"condition\", \"condition_type\": \"and\",\n           \"expressions\": [{\"column\": \"D\", \"criteria\": \"text_is_exactly\", \"value\": \"open\"}]}\n```\n\nThe structure call works for Google Sheets, Excel, CSV and TSV on every provider. It reads the file, so call it once per source and reuse the result; repeat calls are cached until the file changes.\n\n**Processor combinations.** `ai`, `filter`, `remove_duplicates` and `anonymize` can each be used on their own, and `merge` / `left_join` combine with them. These combinations are **not allowed today because the features are incompatible** in the engine, and are rejected with 422 `invalid_processor_combination`:\n\n| Combination | Why |\n|---|---|\n| `ai` + `remove_duplicates` / `anonymize` | the engine runs the AI step or the transformers, never both — the transformer would be silently skipped |\n| `filter` + `remove_duplicates` / `anonymize` | the header row is lost and the first data row is corrupted |\n| `remove_duplicates` + `anonymize` | same — and a row could be left unmasked |\n\nAutomations created before this rule keep running unchanged.","operationId":"automation_replace_rest_beta_automations__id__put","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationReplace","description":"Automation arguments"}}}},"responses":{"200":{"description":"The automation model updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"The plan does not include this destination type"},"422":{"description":"Invalid destination combination, recipient format, api-source shape, integration source, endpoint, api destination or bigquery combination, documents automation (invalid_documents_automation), file_filter (invalid_file_filter), Outlook automation (invalid_outlook_automation), email_filter (invalid_email_filter), or a processor combination that is not allowed (invalid_processor_combination), or a column that is not a spreadsheet letter (invalid_column)"},"412":{"description":"`send_from` names an Outlook account that is not connected or cannot send mail (`outlook_not_connected`), or `ai.model` / `ai.model_settings` without your own OpenAI account (`openai_not_connected`), or an Outlook source whose account cannot read mail (`outlook_not_connected`, Mail.Read)"}}},"patch":{"tags":["automations"],"summary":"Rename an automation","description":"**Renames only.** The body is `{\"name\": \"…\"}`; any other field is rejected with 422. To change sources, destinations or processors (`filter`, `merge`, `ai`, `left_join`, `remove_duplicates`, `split`, `anonymize`), `GET` the automation, edit it and send it back with `PUT` — GET returns everything PUT accepts, so the rest of the automation is kept.","operationId":"automation_patch_rest_beta_automations__id__patch","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPatch","description":"The new name"}}}},"responses":{"200":{"description":"The automation model updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"`name` missing or empty, or a field other than `name` (PATCH only renames)"}}},"delete":{"tags":["automations"],"summary":"Archive an automation","description":"Given a workflow id, archive the workflow","operationId":"automation_archive_rest_beta_automations__id__delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Automation identification","title":"Id"},"description":"Automation identification"}],"responses":{"200":{"description":"The automation was successfully archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/":{"get":{"tags":["automations"],"summary":"Get a paginated list of automations","description":"Return a list of automations following the pagination parameters","operationId":"automation_list_rest_beta_automations__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based","default":1,"title":"Page"},"description":"Page number, 1-based"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)","default":50,"title":"Per Page"},"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)"}],"responses":{"200":{"description":"A paginated list of automations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AutomationModel_"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["automations"],"summary":"Create a new automation","description":"**Column letters.** Every column field — `filter` (`columns`, `expressions[].column`), `split.column`, `left_join.column`, `remove_duplicates.columns` and `anonymize.columns` keys — takes the spreadsheet column LETTER (`D`), not the header name (`Status`), because the engine addresses columns by position. A header name is rejected with 422 `invalid_column`.\n\nTo find the letter, read the source file's header row first:\n\n1. `GET /files/{provider}/{file_id}/structure?include=columns&tab=Orders&header_row=1` — use the source's `id` and `provider`, the tab you import and its `offset_header` as `header_row`. A folder id reads its newest spreadsheet.\n2. Pick the letter from `tabs[].columns`, e.g. `{\"letter\": \"D\", \"index\": 3, \"header\": \"Status\"}`.\n3. Use it in the automation:\n\n```json\n\"filter\": {\"type\": \"condition\", \"condition_type\": \"and\",\n           \"expressions\": [{\"column\": \"D\", \"criteria\": \"text_is_exactly\", \"value\": \"open\"}]}\n```\n\nThe structure call works for Google Sheets, Excel, CSV and TSV on every provider. It reads the file, so call it once per source and reuse the result; repeat calls are cached until the file changes.\n\n**Processor combinations.** `ai`, `filter`, `remove_duplicates` and `anonymize` can each be used on their own, and `merge` / `left_join` combine with them. These combinations are **not allowed today because the features are incompatible** in the engine, and are rejected with 422 `invalid_processor_combination`:\n\n| Combination | Why |\n|---|---|\n| `ai` + `remove_duplicates` / `anonymize` | the engine runs the AI step or the transformers, never both — the transformer would be silently skipped |\n| `filter` + `remove_duplicates` / `anonymize` | the header row is lost and the first data row is corrupted |\n| `remove_duplicates` + `anonymize` | same — and a row could be left unmasked |\n\nAutomations created before this rule keep running unchanged.","operationId":"automation_create_rest_beta_automations__post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"x-run","in":"header","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to true to run the automation immediately after creating it. The run is queued, so the response returns before it finishes — poll `GET /rest/beta/automations/{id}/run` for the outcome.","default":false,"title":"X-Run"},"description":"Set to true to run the automation immediately after creating it. The run is queued, so the response returns before it finishes — poll `GET /rest/beta/automations/{id}/run` for the outcome."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreate","description":"Automation arguments"}}}},"responses":{"200":{"description":"The automation model created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"The plan does not include this destination type"},"422":{"description":"Invalid destination combination, recipient format, api-source shape, integration source, endpoint, api destination or bigquery combination, documents automation (invalid_documents_automation), file_filter (invalid_file_filter), Outlook automation (invalid_outlook_automation), email_filter (invalid_email_filter), or a processor combination that is not allowed (invalid_processor_combination), or a column that is not a spreadsheet letter (invalid_column)"},"412":{"description":"`send_from` names an Outlook account that is not connected or cannot send mail (`outlook_not_connected`), or `ai.model` / `ai.model_settings` without your own OpenAI account (`openai_not_connected`), or an Outlook source whose account cannot read mail (`outlook_not_connected`, Mail.Read)"}}}},"/rest/beta/workflows/run/{id}":{"post":{"tags":["workflows"],"summary":"(Obsolete) Use /workflows/<id>/run instead","description":"This endpoint will be removed","operationId":"workflow_run_deprecated_rest_beta_workflows_run__id__post","deprecated":true,"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Workflow was successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/run":{"post":{"tags":["workflows"],"summary":"Run a single workflow","description":"Given a workflow id, the workflow will start its execution","operationId":"workflow_run_rest_beta_workflows__id__run_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Workflow was successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workflows"],"summary":"Get a workflow's last-run status","description":"Last-run execution status of the workflow, with a per-automation breakdown.\n\nReflects each automation's most recent execution (latest only — no history).","operationId":"workflow_run_status_rest_beta_workflows__id__run_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Workflow last-run status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunStatus"}}}},"404":{"description":"Workflow not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/files":{"get":{"tags":["workflows"],"summary":"Get file sources and destinations of all automations in a workflow","description":"Return the sources and destinations of each automation in a workflow.\n\nEvery source type is included (file, folder, api, webhook, integration,\nbigquery, outlook); write-only fields such as an api source's headers\nare omitted.\n\nDestinations include generated-document and PDF destinations, which are\nbacked by a Drive folder (and, for documents, the Docs template).","operationId":"workflow_files_rest_beta_workflows__id__files_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"File sources and destinations per automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/sources":{"get":{"tags":["workflows"],"summary":"Get file sources of all automations in a workflow","description":"Return the sources of each automation in a workflow.\n\nEvery source type is included (file, folder, api, webhook, integration,\nbigquery, outlook); write-only fields such as an api source's headers\nare omitted.","operationId":"workflow_sources_rest_beta_workflows__id__sources_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"File sources per automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/destinations":{"get":{"tags":["workflows"],"summary":"Get file destinations of all automations in a workflow","description":"Return the file/folder destinations of each automation in a workflow.\n\nDestinations include generated-document and PDF destinations, which are\nbacked by a Drive folder (and, for documents, the Docs template).","operationId":"workflow_destinations_rest_beta_workflows__id__destinations_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"File destinations per automation","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}":{"get":{"tags":["workflows"],"summary":"Get a single workflow","description":"Given a workflow id, returns the workflow model data","operationId":"workflow_get_rest_beta_workflows__id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"The workflow model data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workflows"],"summary":"Update an existing workflow","description":"Updates a workflow identified by id with the given arguments","operationId":"workflow_patch_rest_beta_workflows__id__patch","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPatch","description":"Workflow arguments"}}}},"responses":{"200":{"description":"The workflow model updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Archive a workflow","description":"Given a workflow id, archive the workflow","operationId":"workflow_archive_rest_beta_workflows__id__delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowArchive","description":"Extra parameters for workflow archive"}}}},"responses":{"200":{"description":"The workflow was successfully archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/":{"get":{"tags":["workflows"],"summary":"Get a paginated list of workflows","description":"Return a list of workflows following the pagination parameters","operationId":"workflow_list_rest_beta_workflows__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based","default":1,"title":"Page"},"description":"Page number, 1-based"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)","default":50,"title":"Per Page"},"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)"}],"responses":{"200":{"description":"A paginated list of workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_WorkflowModel_"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflows"],"summary":"Create a new workflow","description":"Create a new workflow with the given arguments","operationId":"workflow_create_rest_beta_workflows__post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreate","description":"Workflow arguments"}}}},"responses":{"200":{"description":"The workflow model created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/collaborators":{"get":{"tags":["workflows"],"summary":"List a workflow's collaborators","description":"Members and their roles (owner included).","operationId":"workflow_collaborators_rest_beta_workflows__id__collaborators_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Workflow collaborators","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorsOut"}}}},"404":{"description":"Workflow not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflows"],"summary":"Add collaborators to a workflow","description":"Invite one or more collaborators. Sends an invitation email unless skip_invitation.","operationId":"workflow_collaborators_add_rest_beta_workflows__id__collaborators_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorsAdd","description":"Collaborators to add"}}}},"responses":{"200":{"description":"Updated collaborators","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorsOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Permission or plan restriction"},"409":{"description":"Collaborator limit reached"},"429":{"description":"Daily invitation limit reached"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Remove all collaborators from a workflow","description":"Remove every collaborator at once. The owner is always kept.\n\nReports per-email outcomes; a partial failure does not abort the rest. Does not\nchange general (domain/team) access - use DELETE /general-access for that.","operationId":"workflow_collaborators_remove_all_rest_beta_workflows__id__collaborators_delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","description":"Must be true - removes every collaborator","default":false,"title":"Confirm"},"description":"Must be true - removes every collaborator"},{"name":"remove_file_access","in":"query","required":false,"schema":{"type":"boolean","description":"Also revoke their access to the files","default":false,"title":"Remove File Access"},"description":"Also revoke their access to the files"}],"responses":{"200":{"description":"Collaborators removed (owner kept)","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"400":{"description":"Missing confirmation"},"403":{"description":"Permission restriction"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/collaborators/{email}":{"patch":{"tags":["workflows"],"summary":"Change a collaborator's role","description":"Promote or demote a collaborator (manager | collaborator).","operationId":"workflow_collaborator_role_rest_beta_workflows__id__collaborators__email__patch","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"email","in":"path","required":true,"schema":{"type":"string","description":"Collaborator email","title":"Email"},"description":"Collaborator email"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorRoleUpdate","description":"New role"}}}},"responses":{"200":{"description":"Updated collaborators","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorsOut"}}}},"404":{"description":"Workflow or member not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Remove a collaborator","description":"Remove a collaborator, optionally revoking their file permissions.","operationId":"workflow_collaborator_remove_rest_beta_workflows__id__collaborators__email__delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"email","in":"path","required":true,"schema":{"type":"string","description":"Collaborator email","title":"Email"},"description":"Collaborator email"},{"name":"remove_file_access","in":"query","required":false,"schema":{"type":"boolean","description":"Also revoke their access to the files","default":false,"title":"Remove File Access"},"description":"Also revoke their access to the files"}],"responses":{"200":{"description":"Updated collaborators","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorsOut"}}}},"404":{"description":"Workflow or member not found"},"401":{"description":"Authentication failed or token is invalid"},"409":{"description":"The owner cannot be removed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/general-access":{"get":{"tags":["workflows"],"summary":"Get a workflow's general (domain/team) access","description":"Whether the workflow is restricted, domain-wide, or team-wide.","operationId":"workflow_general_access_rest_beta_workflows__id__general_access_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Domain/team access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralAccessOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workflows"],"summary":"Set a workflow's general (domain/team) access","description":"restrict clears domain/team; domain/team are derived from the owner's account.","operationId":"workflow_general_access_set_rest_beta_workflows__id__general_access_put","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralAccessSet","description":"Access type and role"}}}},"responses":{"200":{"description":"Updated access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralAccessOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Permission or plan restriction"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Revoke a workflow's general (domain/team) access","description":"Reset general access to `restrict` - the same as PUT {\"access_type\": \"restrict\"}.\n\nNote: because scopes derive from the HTTP method, this requires workflows.delete\nwhile the equivalent PUT requires workflows.write.","operationId":"workflow_general_access_reset_rest_beta_workflows__id__general_access_delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"General access reset to restrict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralAccessOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Permission restriction"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/leave":{"post":{"tags":["workflows"],"summary":"Leave a shared workflow","description":"Remove yourself from a workflow shared with you.","operationId":"workflow_leave_rest_beta_workflows__id__leave_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"You left the workflow","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"409":{"description":"The owner cannot leave"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/request-access":{"post":{"tags":["workflows"],"summary":"Ask a workflow's owner for access","description":"Email the owner an access request. Approval happens in the Sheetgo app.","operationId":"workflow_request_access_rest_beta_workflows__id__request_access_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"202":{"description":"Access request sent to the owner","content":{"application/json":{"schema":{}}}},"404":{"description":"Workflow not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/change-owner":{"post":{"tags":["workflows"],"summary":"Transfer workflow ownership","description":"Transfer ownership to another Sheetgo user. Owner only; irreversible.","operationId":"workflow_change_owner_rest_beta_workflows__id__change_owner_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","description":"Must be true - this cannot be undone","default":false,"title":"Confirm"},"description":"Must be true - this cannot be undone"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeOwnerIn","description":"New owner"}}}},"responses":{"200":{"description":"Ownership transferred","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"400":{"description":"Missing confirmation"},"403":{"description":"Only the owner can transfer ownership"},"422":{"description":"The new owner is not a Sheetgo user"}}}},"/rest/beta/workflows/{workflow_id}/forms/{form_id}":{"get":{"tags":["forms"],"summary":"Get a form","description":"Returns the form model data","operationId":"form_get_rest_beta_workflows__workflow_id__forms__form_id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","description":"Form identification","title":"Form Id"},"description":"Form identification"}],"responses":{"200":{"description":"The form model data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["forms"],"summary":"Update an existing form","description":"Patches form data","operationId":"form_patch_rest_beta_workflows__workflow_id__forms__form_id__patch","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","description":"Form identification","title":"Form Id"},"description":"Form identification"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPatch","description":"Form arguments"}}}},"responses":{"200":{"description":"The form model patched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["forms"],"summary":"Delete a form","description":"Deletes a form","operationId":"form_delete_rest_beta_workflows__workflow_id__forms__form_id__delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","description":"Form identification","title":"Form Id"},"description":"Form identification"}],"responses":{"200":{"description":"The form was successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{workflow_id}/forms/{form_id}/responses":{"get":{"tags":["forms"],"summary":"Get a form's responses (paginated)","description":"Return the form's responses (from its first target spreadsheet), paginated.","operationId":"form_responses_rest_beta_workflows__workflow_id__forms__form_id__responses_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","description":"Form identification","title":"Form Id"},"description":"Form identification"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"strip_tags","in":"query","required":false,"schema":{"type":"boolean","description":"Strip trailing ' [config]' tags from response headers","default":false,"title":"Strip Tags"},"description":"Strip trailing ' [config]' tags from response headers"}],"responses":{"200":{"description":"Paginated form responses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"404":{"description":"Form or workflow not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["forms"],"summary":"Inspect a form's responses metadata without downloading them","description":"Return response count / columns / last-modified in headers, no body.","operationId":"form_responses_head_rest_beta_workflows__workflow_id__forms__form_id__responses_head","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","description":"Form identification","title":"Form Id"},"description":"Form identification"},{"name":"strip_tags","in":"query","required":false,"schema":{"type":"boolean","description":"Strip trailing ' [config]' tags from response headers","default":false,"title":"Strip Tags"},"description":"Strip trailing ' [config]' tags from response headers"}],"responses":{"200":{"description":"Response metadata in X-Sheetgo-* headers","content":{"application/json":{"schema":{}}}},"404":{"description":"Form or workflow not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{workflow_id}/forms/":{"get":{"tags":["forms"],"summary":"Get a paginated list of forms","description":"Return a list of forms following the pagination parameters","operationId":"form_list_rest_beta_workflows__workflow_id__forms__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based","default":1,"title":"Page"},"description":"Page number, 1-based"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)","default":50,"title":"Per Page"},"description":"Number of items per page (1-100; values above 100 are clamped to 100 and the effective size is echoed in the response)"}],"responses":{"200":{"description":"A paginated list of forms","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_FormModel_"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["forms"],"summary":"Create a new form","description":"Create a new form","operationId":"form_create_rest_beta_workflows__workflow_id__forms__post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Workflow Id"},"description":"Workflow identification"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormCreate","description":"Form arguments"}}}},"responses":{"200":{"description":"The form model created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormModel"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/webhook/{public_id}":{"post":{"tags":["webhook"],"summary":"Push values to a webhook and trigger its bound automation","description":"Sends rows into a workflow through an automation's webhook source, and starts a run.\n\nAnswers **202 Accepted** as soon as the data is stored and the run is queued — the run itself happens asynchronously, so a 202 means *accepted*, not *finished*. Poll `GET /rest/beta/automations/{automation_id}/run` for the outcome.\n\n**Safe retries.** Send an `Idempotency-Key` header (any unique string, 1-255 printable characters) and reuse it when you retry the same push. Sheetgo then runs the automation once and answers the retry with the first response plus `Idempotent-Replayed: true`, for 24 hours. A server error (5xx) is not remembered, so retrying it runs again.\n\nGet the `public_id` from `GET /rest/beta/automations/{automation_id}/webhook`. Treat it as a secret.","operationId":"webhook_push_rest_beta_webhook__public_id__post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"public_id","in":"path","required":true,"schema":{"type":"string","description":"The webhook's public identifier, from the automation's webhook endpoint.","title":"Public Id"},"description":"The webhook's public identifier, from the automation's webhook endpoint."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional. Reuse the same value when retrying a push so it is processed only once.","title":"Idempotency-Key"},"description":"Optional. Reuse the same value when retrying a push so it is processed only once."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBody"}}}},"responses":{"202":{"description":"Accepted; dispatch started","content":{"application/json":{"schema":{}}}},"404":{"description":"Webhook not found or not owned by caller"},"400":{"description":"Malformed body, invalid `Idempotency-Key`, or webhook not bound to a webhook-source automation"},"401":{"description":"Auth failed"},"409":{"description":"A request with the same `Idempotency-Key` is still being processed (`idempotency_in_progress`)"},"413":{"description":"Values exceed row/byte cap"},"422":{"description":"Invalid request body (FastAPI validation error), or the `Idempotency-Key` was already used with a different body (`idempotency_key_reused`)"}}}},"/rest/beta/outlook/messages/batch":{"post":{"tags":["outlook"],"summary":"Batch Messages","description":"Resolve a list of message ids to message bodies in one shot.\n\nMissing or cross-owner ids come back as ``{id, error: \"message_not_found\"}``\nentries inside ``values.messages`` rather than failing the whole call.","operationId":"batch_messages_rest_beta_outlook_messages_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}]}},"/rest/beta/outlook/messages":{"get":{"tags":["outlook"],"summary":"List Messages","description":"Page through messages in a folder.\n\n`folder` is a snake-case name (e.g. \"inbox\") mapped to a well-known mail\nfolder; unknown values return 400. `limit` is bounded to [1, 100]; a value\noutside the range returns 400 before any upstream call is made.","operationId":"list_messages_rest_beta_outlook_messages_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"folder","in":"query","required":false,"schema":{"type":"string","description":"Well-known mail folder to read, snake_case (for example `inbox`, `sent_items`, `drafts`). An unknown name returns 400.","default":"inbox","title":"Folder"},"description":"Well-known mail folder to read, snake_case (for example `inbox`, `sent_items`, `drafts`). An unknown name returns 400."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Messages per page, 1-100. Outside that range returns 400 before any call to Microsoft is made.","default":25,"title":"Limit"},"description":"Messages per page, 1-100. Outside that range returns 400 before any call to Microsoft is made."},{"name":"page_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's paging cursor. Omit for the first page.","title":"Page Token"},"description":"Opaque token from a previous response's paging cursor. Omit for the first page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/outlook/messages/{message_id}":{"get":{"tags":["outlook"],"summary":"Get Message","description":"Fetch one message by id.\n\n``include_attachments=true`` opts the response into the\n``$expand=attachments`` Graph path; the controller enforces the 25 MB\ntotal cap and raises 413 ``AttachmentsTooLarge`` if exceeded. For larger\nattachments, fall back to the per-attachment binary endpoint below.","operationId":"get_message_rest_beta_outlook_messages__message_id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","description":"Id of the message to fetch.","title":"Message Id"},"description":"Id of the message to fetch."},{"name":"include_attachments","in":"query","required":false,"schema":{"type":"boolean","description":"Include 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,"title":"Include Attachments"},"description":"Include 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."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/outlook/messages/{message_id}/attachments/{attachment_id}":{"get":{"tags":["outlook"],"summary":"Get Attachment","description":"Stream a single attachment as its native bytes (NOT base64-wrapped).\n\nReturns ``application/<original mime>`` with a\n``Content-Disposition: attachment; filename=\"...\"`` header. Filenames are\nescaped for the ``\"`` delimiter — a malicious upload couldn't smuggle\nextra header fields via a crafted name.","operationId":"get_attachment_rest_beta_outlook_messages__message_id__attachments__attachment_id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","description":"Id of the message the attachment belongs to.","title":"Message Id"},"description":"Id of the message the attachment belongs to."},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","description":"Id of the attachment to download.","title":"Attachment Id"},"description":"Id of the attachment to download."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/outlook/send":{"post":{"tags":["outlook"],"summary":"Send","description":"Send a message through the connected Microsoft account.\n\nBody validation (recipient count, attachment count, attachment total size)\nruns before this handler; invalid input returns 422 with the field-level\nreason. An address rejected upstream returns 400.\n\nDefaults: ``save_to_sent_items=True``.","operationId":"send_rest_beta_outlook_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}]}},"/rest/beta/gmail/send":{"post":{"tags":["gmail"],"summary":"Send","description":"Send a message through the connected Google account.\n\nGmail always stores the sent message in SENT — there is no\n``save_to_sent_items`` equivalent. Total attachment bytes are capped at 3 MB\nand recipients at 50, matching the Outlook contract.","operationId":"send_rest_beta_gmail_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailSendBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Auth failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}]}},"/rest/beta/api-destination/{public_id}":{"get":{"tags":["api-destination"],"summary":"Read data from an API-as-Destination endpoint","description":"Reads the rows a workflow published through its `api` destination. Each workflow run refreshes the data; this endpoint serves whatever the last run produced.\n\nSupports pagination (`page`, `page_size`), sorting (`order_by`, `direction`), a single-tab filter (`tab`) and two output shapes (`format`). Responses carry `ETag` and `Last-Modified`, so a conditional request with `If-None-Match` gets a **304** and no body — use it when polling.\n\nBefore the workflow's first run the endpoint exists but has no data, and answers 200 with an empty result rather than a 404.\n\nRequires an API key with **both** the `automations` and `api-destination` scopes.","operationId":"api_destination_get_rest_beta_api_destination__public_id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"public_id","in":"path","required":true,"schema":{"type":"string","description":"The destination's public identifier, returned when the automation's `api` destination was created. It is stable across updates to the automation.","title":"Public Id"},"description":"The destination's public identifier, returned when the automation's `api` destination was created. It is stable across updates to the automation."},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Response format: 'dict' or 'array'","default":"dict","title":"Format"},"description":"Response format: 'dict' or 'array'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","description":"Rows per page (1–1000; > 1000 is clamped to 1000)","default":100,"title":"Page Size"},"description":"Rows per page (1–1000; > 1000 is clamped to 1000)"},{"name":"order_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column name to sort by","title":"Order By"},"description":"Column name to sort by"},{"name":"direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort direction","default":"asc","title":"Direction"},"description":"Sort direction"},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"**Reserved for a future version — NOT IMPLEMENTED today.** The parameter is accepted so that a future filter-aware client can call this endpoint without a hard failure, but it has no effect: the value is ignored and the **full, unfiltered** dataset is returned. Do not use it to scope a response — filter client-side, or narrow the data in the automation itself. This description will change when filtering ships.","title":"Filter"},"description":"**Reserved for a future version — NOT IMPLEMENTED today.** The parameter is accepted so that a future filter-aware client can call this endpoint without a hard failure, but it has no effect: the value is ignored and the **full, unfiltered** dataset is returned. Do not use it to scope a response — filter client-side, or narrow the data in the automation itself. This description will change when filtering ships."},{"name":"tab","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return only this source tab (by name); omit for all tabs","title":"Tab"},"description":"Return only this source tab (by name); omit for all tabs"}],"responses":{"200":{"description":"Data served (or empty-state pre-publish)","content":{"application/json":{"schema":{}}}},"404":{"description":"Destination missing / deleted / unbound"},"304":{"description":"Not modified — ETag or Last-Modified matched"},"400":{"description":"Invalid query params"},"401":{"description":"Auth failed"},"500":{"description":"Internal error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["api-destination"],"summary":"Inspect API-as-Destination metadata without downloading data","description":"Same as the `GET`, but returns headers only — use it to check whether the data changed before paying for the body.\n\nCarries the same `ETag` and `Last-Modified` as the `GET`, plus `X-Sheetgo-*` headers describing the row count and columns.","operationId":"api_destination_head_rest_beta_api_destination__public_id__head","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"public_id","in":"path","required":true,"schema":{"type":"string","description":"The destination's public identifier, returned when the automation's `api` destination was created. It is stable across updates to the automation.","title":"Public Id"},"description":"The destination's public identifier, returned when the automation's `api` destination was created. It is stable across updates to the automation."}],"responses":{"200":{"description":"Headers populated (or empty-state if pre-publish)","content":{"application/json":{"schema":{}}}},"404":{"description":"Destination missing / deleted / unbound"},"401":{"description":"Auth failed"},"500":{"description":"Internal error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/trigger":{"get":{"tags":["triggers"],"summary":"Get a workflow's automation trigger","description":"Returns the workflow's current trigger — what makes it run without anyone pressing a button.\n\nOnly the fields belonging to the active `type` are populated; the rest are null. A workflow with no trigger returns `{\"active\": false, \"type\": null}` with HTTP 200, not a 404.","operationId":"get_trigger_rest_beta_workflows__id__trigger_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow id","title":"Id"},"description":"Workflow id"}],"responses":{"200":{"description":"Current trigger configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerOut"}}}},"401":{"description":"Authentication failed or token is invalid"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["triggers"],"summary":"Set or replace a workflow's automation trigger","description":"Sets the workflow's trigger, replacing any existing one — this is a full replacement, not a merge.\n\nPick one of three `type` values:\n\n* `time` — run on a schedule. Use the friendly fields (`frequency`, `every`, `time`, `weekday`, `day_of_month`) **or** a raw `cron`, never both. Schedules run on the hour, so the cron minute must be `0`, `*/15` or `*/30`.\n* `workflow_finished` — run when another workflow finishes, named by `after_workflow_id`. Chains that would form a loop are rejected with **409**.\n* `form_submission` — run whenever a bound form receives a response.\n\nThe response echoes the stored trigger, including the resolved `cron`.","operationId":"put_trigger_rest_beta_workflows__id__trigger_put","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow id","title":"Id"},"description":"Workflow id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","discriminator":{"mapping":{"form_submission":"#/components/schemas/FormSubmissionTriggerIn","time":"#/components/schemas/TimeTriggerIn","workflow_finished":"#/components/schemas/WorkflowFinishedTriggerIn"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TimeTriggerIn"},{"$ref":"#/components/schemas/WorkflowFinishedTriggerIn"},{"$ref":"#/components/schemas/FormSubmissionTriggerIn"}]}}},"description":"One of three trigger types, discriminated by `type`: `time`, `workflow_finished` or `form_submission`."},"responses":{"200":{"description":"Trigger set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerOut"}}}},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Permission / plan / owner restriction"},"404":{"description":"Workflow (or parent) not found"},"409":{"description":"Circular trigger"},"422":{"description":"Invalid trigger configuration"}}},"delete":{"tags":["triggers"],"summary":"Turn off a workflow's automation trigger","description":"Disables the workflow's trigger, so it runs only on demand. Returns the trigger in its disabled state (`active: false`). Safe to call on a workflow that has no trigger.","operationId":"delete_trigger_rest_beta_workflows__id__trigger_delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow id","title":"Id"},"description":"Workflow id"}],"responses":{"200":{"description":"Trigger disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerOut"}}}},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Permission restriction"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/automations/{automation_id}/webhook":{"get":{"tags":["webhook"],"summary":"Retrieve an automation's webhook","description":"Returns the webhook bound to this automation's webhook source — most importantly its `url`, which is the address an external system POSTs data to.\n\nA webhook is minted automatically when an automation is created with a `webhook` source; there is no endpoint to create one separately, and no way to rotate it. Deleting the automation deletes the webhook with it. Automations without a webhook source return **404**.","operationId":"get_automation_webhook_rest_beta_automations__automation_id__webhook_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation id","title":"Automation Id"},"description":"Automation id"}],"responses":{"200":{"description":"The automation's webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"401":{"description":"Authentication failed or token is invalid"},"404":{"description":"Automation has no webhook"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{workflow_id}/webhooks":{"get":{"tags":["webhook"],"summary":"List a workflow's webhooks","description":"Lists every webhook across the workflow's automations, so you can find the right `url` without knowing which automation owns it. Paginated with the standard `page` / `per_page` envelope. A workflow with no webhook sources returns an empty list, not a 404.","operationId":"list_workflow_webhooks_rest_beta_workflows__workflow_id__webhooks_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Workflow id","title":"Workflow Id"},"description":"Workflow id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based.","default":1,"title":"Page"},"description":"Page number, 1-based."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Webhooks per page (1-100).","default":50,"title":"Per Page"},"description":"Webhooks per page (1-100)."}],"responses":{"200":{"description":"Webhooks in the workflow","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/bigquery/projects":{"get":{"tags":["bigquery"],"summary":"List BigQuery projects","description":"Every GCP project the authorized Google account can see.\n\n`id` is the string project id — the value an automation's `project` field\nexpects. `numeric_id` is the same project's numeric form, accepted too.\n\nAn empty list means the account genuinely has no BigQuery projects. A\nmissing authorization is a `412`, never an empty list.","operationId":"list_projects_rest_beta_bigquery_projects_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, max 100","default":50,"title":"Per Page"},"description":"Items per page, max 100"}],"responses":{"200":{"description":"Projects visible to the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigQueryProjectListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"BigQuery is not authorized for this account"},"403":{"description":"The account lacks BigQuery permission"},"502":{"description":"BigQuery could not complete the request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/bigquery/projects/{project}/datasets":{"get":{"tags":["bigquery"],"summary":"List a project's datasets","description":"Datasets in one project. `id` is what an automation's `dataset` expects.\n\nA `bigquery` destination writes into an existing dataset — Sheetgo creates\nthe *table* if it is missing, but never the dataset.","operationId":"list_datasets_rest_beta_bigquery_projects__project__datasets_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string","description":"Project id, as returned by GET /bigquery/projects","title":"Project"},"description":"Project id, as returned by GET /bigquery/projects"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, max 100","default":50,"title":"Per Page"},"description":"Items per page, max 100"}],"responses":{"200":{"description":"Datasets in the project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigQueryDatasetListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"BigQuery is not authorized for this account"},"403":{"description":"The account lacks BigQuery permission"},"502":{"description":"BigQuery could not complete the request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables":{"get":{"tags":["bigquery"],"summary":"List a dataset's tables","description":"Tables in one dataset. `id` is what an automation's `table` expects.\n\nA destination may also name a table that does not exist yet — it is created\non the first run — so this listing is a convenience, not a constraint.","operationId":"list_tables_rest_beta_bigquery_projects__project__datasets__dataset__tables_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string","description":"Project id, as returned by GET /bigquery/projects","title":"Project"},"description":"Project id, as returned by GET /bigquery/projects"},{"name":"dataset","in":"path","required":true,"schema":{"type":"string","description":"Dataset id","title":"Dataset"},"description":"Dataset id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, max 100","default":50,"title":"Per Page"},"description":"Items per page, max 100"}],"responses":{"200":{"description":"Tables in the dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigQueryTableListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"BigQuery is not authorized for this account"},"403":{"description":"The account lacks BigQuery permission"},"502":{"description":"BigQuery could not complete the request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables/{table}":{"get":{"tags":["bigquery"],"summary":"Read one table's schema","description":"One table's column types, row and byte counts, and partitioning.\n\nThe types matter for a `bigquery` destination: `partition.field` must name a\ncolumn, and BigQuery infers the partition type from that column rather than\ntaking it from the payload.\n\n`partitioning` describes the table as it exists today. An existing table\nkeeps its own partitioning no matter what a destination payload asks for —\nonly `write_mode: \"recreate\"` replaces it.","operationId":"get_table_rest_beta_bigquery_projects__project__datasets__dataset__tables__table__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string","description":"Project id, as returned by GET /bigquery/projects","title":"Project"},"description":"Project id, as returned by GET /bigquery/projects"},{"name":"dataset","in":"path","required":true,"schema":{"type":"string","description":"Dataset id","title":"Dataset"},"description":"Dataset id"},{"name":"table","in":"path","required":true,"schema":{"type":"string","description":"Table id","title":"Table"},"description":"Table id"}],"responses":{"200":{"description":"The table's typed schema and stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigQueryTableDetail"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"BigQuery is not authorized for this account"},"403":{"description":"The account lacks BigQuery permission"},"502":{"description":"BigQuery could not complete the request"},"404":{"description":"No such table"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/bigquery/projects/{project}/validate-query":{"post":{"tags":["bigquery"],"summary":"Validate a query without running it","description":"Dry-run a query: check it parses, see what it would return and cost.\n\nNothing is scanned and nothing can be mutated, so this is safe to call\nfreely — which is why it needs only the `bigquery.read` scope despite being\na POST.\n\n**Invalid SQL answers `200` with `valid: false`**, not a 4xx: \"is this\nquery valid?\" has *no* as a legitimate answer. A `4xx`/`5xx` here means the\nrequest could not be answered at all — missing authorization, no\npermission, or BigQuery being unreachable.\n\nUse `total_bytes_processed` to size an uncapped source query before creating\nthe automation. A `bigquery` source's generated SQL has no `LIMIT`, so this\nis how you find out what a full scan will cost.","operationId":"validate_query_rest_beta_bigquery_projects__project__validate_query_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string","description":"Project id, as returned by GET /bigquery/projects","title":"Project"},"description":"Project id, as returned by GET /bigquery/projects"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateQueryRequest"}}}},"responses":{"200":{"description":"The dry run's verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateQueryResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"BigQuery is not authorized for this account"},"403":{"description":"The account lacks BigQuery permission"},"502":{"description":"BigQuery could not complete the request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/files/{provider}":{"get":{"tags":["files"],"summary":"Browse a folder","description":"List the direct contents of one folder, files and folders interleaved.","operationId":"browse_files_rest_beta_files__provider__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Provider","description":"Storage provider: drive, onedrive, sharepoint or dropbox"},"description":"Storage provider: drive, onedrive, sharepoint or dropbox"},{"name":"parent","in":"query","required":false,"schema":{"type":"string","description":"Folder id to list. Defaults to the provider root. Use `/files/{provider}/roots` to discover valid starting points (SharePoint sites, Drive shared drives, Shared with me).","default":"root","title":"Parent"},"description":"Folder id to list. Defaults to the provider root. Use `/files/{provider}/roots` to discover valid starting points (SharePoint sites, Drive shared drives, Shared with me)."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of file types to include: `gsheets`, `xlsx`, `csv`, `tsv`, `folder`, `gdocs`. Omit for every supported type **except** `gdocs`: Google Docs are not returned by default, so request `type=gdocs` to find a document template (Google Drive only).","examples":["gsheets,xlsx"],"title":"Type"},"description":"Comma-separated list of file types to include: `gsheets`, `xlsx`, `csv`, `tsv`, `folder`, `gdocs`. Omit for every supported type **except** `gdocs`: Google Docs are not returned by default, so request `type=gdocs` to find a document template (Google Drive only)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based","default":1,"title":"Page"},"description":"Page number, 1-based"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"}],"responses":{"200":{"description":"Folder contents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"Provider account not connected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/files/{provider}/search":{"get":{"tags":["files"],"summary":"Search files and folders by name","description":"Search the whole connected account by name.\n\nResults keep the provider's relevance order rather than being sorted\nalphabetically, so the best match stays on the first page.","operationId":"search_files_rest_beta_files__provider__search_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Provider","description":"Storage provider: drive, onedrive, sharepoint or dropbox"},"description":"Storage provider: drive, onedrive, sharepoint or dropbox"},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Name to search for, across the whole connected account. Drive and SharePoint also accept a pasted file URL and resolve it to that exact item.","title":"Q"},"description":"Name to search for, across the whole connected account. Drive and SharePoint also accept a pasted file URL and resolve it to that exact item."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of file types to include: `gsheets`, `xlsx`, `csv`, `tsv`, `folder`, `gdocs`. Omit for every supported type **except** `gdocs`: Google Docs are not returned by default, so request `type=gdocs` to find a document template (Google Drive only).","examples":["gsheets,xlsx"],"title":"Type"},"description":"Comma-separated list of file types to include: `gsheets`, `xlsx`, `csv`, `tsv`, `folder`, `gdocs`. Omit for every supported type **except** `gdocs`: Google Docs are not returned by default, so request `type=gdocs` to find a document template (Google Drive only)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number, 1-based","default":1,"title":"Page"},"description":"Page number, 1-based"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"Provider account not connected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/files/{provider}/roots":{"get":{"tags":["files"],"summary":"List browsable entry points","description":"Where browsing can start for this provider.\n\nSharePoint ids are site-qualified, so its sites are only reachable through\nthis endpoint. Drive adds its shared drives and virtual containers here.\nEach entry's `id` can be passed straight back as `parent`.","operationId":"list_roots_rest_beta_files__provider__roots_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Provider","description":"Storage provider: drive, onedrive, sharepoint or dropbox"},"description":"Storage provider: drive, onedrive, sharepoint or dropbox"}],"responses":{"200":{"description":"Entry points","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"412":{"description":"Provider account not connected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/files/{provider}/{file_id}":{"get":{"tags":["files"],"summary":"Get one file or folder","description":"Resolve a single id — useful to validate one before building an automation.","operationId":"get_file_rest_beta_files__provider___file_id__get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Provider","description":"Storage provider: drive, onedrive, sharepoint or dropbox"},"description":"Storage provider: drive, onedrive, sharepoint or dropbox"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"Provider file or folder id","title":"File Id"},"description":"Provider file or folder id"}],"responses":{"200":{"description":"Item metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileItem"}}}},"401":{"description":"Authentication failed or token is invalid"},"404":{"description":"Item not found or not accessible"},"412":{"description":"Provider account not connected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/files/{provider}/{file_id}/structure":{"get":{"tags":["files"],"summary":"Describe what is inside a file","description":"Tabs, column letters, named ranges and charts of a spreadsheet.\n\n`include=columns` returns, per tab, the letter → header map that automation\ncolumn fields (`filter`, `split`, `remove_duplicates`, `left_join`,\n`anonymize`) need: they take the LETTER (`D`), not the header (`Status`).\n\nCost: this reads the file. Google Sheets and Excel on SharePoint cost a\nprovider read per call; other files (CSV/TSV, and Excel on Drive, Dropbox or\nOneDrive) are downloaded and parsed, and the first read of a large file takes\nseconds. Pass `tab=` and reuse the result: repeat reads of the same file,\n`header_row` and tabs are answered from a cache without reopening the file,\nuntil it changes.\n\nThe ids returned are what a dashboard element needs: `tabs[].id` is the\nnumeric `tab_id` (Google Sheets only), `charts[].chart_id` the `chart_id`.","operationId":"file_structure_rest_beta_files__provider___file_id__structure_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Provider","description":"Storage provider: drive, onedrive, sharepoint or dropbox"},"description":"Storage provider: drive, onedrive, sharepoint or dropbox"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"Provider file id, or a folder id (its newest spreadsheet is read)","title":"File Id"},"description":"Provider file id, or a folder id (its newest spreadsheet is read)"},{"name":"include","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated sections: `tabs`, `columns`, `named_ranges`, `charts`. Default: `tabs,named_ranges,charts` for Google Sheets, `tabs` for Excel/CSV/TSV. `columns` (the letter → header map automation column fields need) is never in the default and implies `tabs`. `named_ranges` and `charts` exist only in Google Sheets.","title":"Include"},"description":"Comma-separated sections: `tabs`, `columns`, `named_ranges`, `charts`. Default: `tabs,named_ranges,charts` for Google Sheets, `tabs` for Excel/CSV/TSV. `columns` (the letter → header map automation column fields need) is never in the default and implies `tabs`. `named_ranges` and `charts` exist only in Google Sheets."},{"name":"tab","in":"query","required":false,"schema":{"type":"string","description":"`columns` for this tab only (by name). Cannot be combined with `all_tabs`.","title":"Tab"},"description":"`columns` for this tab only (by name). Cannot be combined with `all_tabs`."},{"name":"all_tabs","in":"query","required":false,"schema":{"type":"boolean","description":"`columns` for every tab. Without it and without `tab`, only the first 10 tabs are read and `columns_truncated` is true.","default":false,"title":"All Tabs"},"description":"`columns` for every tab. Without it and without `tab`, only the first 10 tabs are read and `columns_truncated` is true."},{"name":"header_row","in":"query","required":false,"schema":{"type":"integer","description":"Row holding the headers (1-based). Must match the source's `offset_header`.","default":1,"title":"Header Row"},"description":"Row holding the headers (1-based). Must match the source's `offset_header`."}],"responses":{"200":{"description":"What is inside the file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileStructureResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"400":{"description":"Unknown include value, or invalid tab / all_tabs / header_row"},"404":{"description":"File, folder content or tab not found"},"412":{"description":"Provider account not connected"},"422":{"description":"Not a spreadsheet (unsupported_file_type), a section the file cannot have (section_not_available), or a downloaded file above the size limit (file_too_large)"}}}},"/rest/beta/workflows/{id}/dashboard":{"get":{"tags":["dashboards"],"summary":"Get a workflow's dashboard","description":"Elements and publish state in one call. Two Mongo reads, no Sheets access.\n\n`elements[].error` is usually null even for a broken element: render errors\nare written during a build and not persisted\n(workflow/controller.py:759). Read an element's `/data` to be certain it\nrenders.","operationId":"dashboard_get_rest_beta_workflows__id__dashboard_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"responses":{"200":{"description":"Elements and publish state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Not a member of the workflow"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/dashboard/elements/{element_id}/data":{"get":{"tags":["dashboards"],"summary":"Read one dashboard element's current values","description":"Build and return one element's values.\n\nBounded to a single element: `get_workflow_dashboard` filters\n`dashboard['data']` down to the requested id, so this is one or two Sheets\ncalls regardless of dashboard size. The element's `controlKey` is read from\nstorage, never taken from the caller — `get_chart_instance` matches on it\n(workflow/dashboard/utils.py:20) and would find nothing without it.\n\n`page`/`per_page` apply to `table` elements only.","operationId":"element_data_rest_beta_workflows__id__dashboard_elements__element_id__data_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"element_id","in":"path","required":true,"schema":{"type":"string","description":"Element identification","title":"Element Id"},"description":"Element identification"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Table elements only","default":1,"title":"Page"},"description":"Table elements only"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Table elements only","default":50,"title":"Per Page"},"description":"Table elements only"}],"responses":{"200":{"description":"The element's current values","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementDataOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Not a member of the workflow"},"502":{"description":"The values could not be read"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/dashboard/elements":{"post":{"tags":["dashboards"],"summary":"Add elements to a workflow's dashboard","description":"Create one or more dashboard elements, atomically.\n\nThe dashboard itself needs no creating — `add_charts` brings it into being\nwith the first element (workflow/models.py:1806).\n\nEvery element is validated against the real spreadsheet before anything is\nwritten, and a single failure rejects the whole batch: a partial write would\nleave the caller diffing what landed. Validation uses the workflow owner's\ncredentials, since those are what render the dashboard later.","operationId":"elements_create_rest_beta_workflows__id__dashboard_elements_post","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"One element to create.\n\nExactly one of `tab` / `tab_id`, and exactly one of `range` / `chart_id`.\n`tab_id` lets a caller that already read `/structure` skip the tab-name\nresolution, saving a Sheets call and a failure mode.","properties":{"type":{"$ref":"#/components/schemas/ElementType","description":"indicator | table | chart"},"title":{"description":"Element title, as shown on the dashboard","maxLength":120,"minLength":1,"title":"Title","type":"string"},"file_id":{"description":"Google Sheets file id on Drive","title":"File Id","type":"string"},"tab":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tab name; resolved server-side to its numeric id","title":"Tab"},"tab_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Numeric Google sheetId, as returned by /structure","title":"Tab Id"},"range":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A1 range, e.g. `B4` or `A1:D50`. Required for indicator and table.","title":"Range"},"chart_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Numeric chart id from /structure. Required for chart.","title":"Chart Id"}},"required":["type","title","file_id"],"title":"ElementIn"},"description":"One or more elements to create","title":"Elements","minItems":1}}},"description":"One or more elements to create."},"responses":{"201":{"description":"The created elements","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ElementOut"},"title":"Response 201 Elements Create Rest Beta Workflows  Id  Dashboard Elements Post"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"400":{"description":"Malformed element"},"403":{"description":"Requires manager or owner"},"409":{"description":"Chart limit reached"},"422":{"description":"Source could not be validated"}}}},"/rest/beta/workflows/{id}/dashboard/elements/{element_id}":{"delete":{"tags":["dashboards"],"summary":"Delete one dashboard element","description":"Remove one element.\n\nDeleting the LAST element removes the dashboard and takes it offline:\n`remove_chart` sets `workflow.dashboard = None` and marks the publishing\nrecord deleted (workflow/models.py:1920, :1932). Adding an element later\nrevives it with the same `public_id`, so the viewer URL survives.","operationId":"element_delete_rest_beta_workflows__id__dashboard_elements__element_id__delete","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"},{"name":"element_id","in":"path","required":true,"schema":{"type":"string","description":"Element identification","title":"Element Id"},"description":"Element identification"}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"403":{"description":"Requires manager or owner"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/workflows/{id}/dashboard/publish":{"put":{"tags":["dashboards"],"summary":"Publish or unpublish a workflow's dashboard","description":"Set `shared`, `require_auth` and `auth_config.domain`.\n\n`specific_users` and `visual_schema` are rejected. The internal PUT emails\nevery address in `authConfig.specificUsers` via SendGrid\n(dashboard/models.py:190); refusing the field is what keeps an API key from\nmailing arbitrary recipients. Both remain editable in the Sheetgo UI.\n\nStricter than the internal route, which requires only workflow access\n(workflow/views.py:936) and so lets a collaborator publish publicly.","operationId":"publish_set_rest_beta_workflows__id__dashboard_publish_put","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Workflow identification","title":"Id"},"description":"Workflow identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"description":"Publish settings","title":"PublishIn","properties":{"shared":{"description":"public | private","title":"Shared","type":"string"},"require_auth":{"default":false,"description":"Require a signed-in viewer","title":"Require Auth","type":"boolean"},"auth_config":{"anyOf":[{"$ref":"#/components/schemas/AuthConfigIn"},{"type":"null"}]}},"required":["shared"]}}},"description":"Publish settings."},"responses":{"200":{"description":"Publish state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishOut"}}}},"404":{"description":"Not found"},"401":{"description":"Authentication failed or token is invalid"},"400":{"description":"Malformed or unsupported field"},"403":{"description":"Requires manager or owner, or plan upgrade"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/beta/integrations":{"get":{"tags":["integrations"],"summary":"List integrations and connected accounts","description":"Every integration, whether or not you have authorized it.\n\n`accounts[].account` is what an automation's `sources[].account` expects.\nWith exactly one account for a provider you can omit that field and Sheetgo\nresolves it; with several, naming one is required.\n\nAuthorization itself happens in the Sheetgo web app — it is a browser OAuth\nflow and cannot be driven from an API key.","operationId":"list_integrations_rest_beta_integrations_get","responses":{"200":{"description":"Providers and your authorized accounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationListResponse"}}}},"401":{"description":"Authentication failed or token is invalid"}},"security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}]}},"/rest/beta/integrations/{provider}/options":{"get":{"tags":["integrations"],"summary":"List a provider's data sources","description":"What you can ask this provider for.\n\nStatic per provider and identical for every account, so this answers even\nbefore you have authorized one — useful for exploring first. `id` is what\n`sources[].data_source` expects; `parameters` is what `sources[].parameters`\naccepts, and only QuickBooks reports declare any.\n\nRetired data sources are omitted: they would raise mid-run rather than\nreturn data.","operationId":"integration_options_rest_beta_integrations__provider__options_get","security":[{"default":[]},{"Developer Access":[]},{"sheetgo-api-key":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/IntegrationProvider","description":"Integration provider: shopify or quickbooks"},"description":"Integration provider: shopify or quickbooks"}],"responses":{"200":{"description":"Selectable data sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationOptionsResponse"}}}},"401":{"description":"Authentication failed or token is invalid"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/auth/token":{"post":{"tags":["auth"],"summary":"Exchange authentication code for a access token and a refresh token","description":"Second leg of the OAuth2 authorization-code flow: trades the one-time `code` your redirect URI received for an access token and a refresh token.\n\nThe body is **form-encoded** (`application/x-www-form-urlencoded`), not JSON. `grant_type` must be `authorization_code`, and `redirect_uri` must match the one used to obtain the code.\n\nCodes are single-use and short-lived. Bad credentials, a reused code or a mismatched redirect URI all answer **401**.","operationId":"auth_token_rest_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_token_rest_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Access and refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangedToken"}}}},"404":{"description":"Not found"},"401":{"description":"Invalid code, client credentials or redirect_uri"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/auth/refresh":{"post":{"tags":["auth"],"summary":"Creates a new access token from a refresh token","description":"Exchanges a refresh token for a fresh access token, so a long-running integration never has to send the user back through the authorize screen.\n\n`grant_type` must be `refresh_token`. A token that has expired, been revoked or is unknown answers **401** — restart the authorization-code flow from the beginning.\n\n`client_id` and `client_secret` are verified: a refresh token alone is not sufficient. A deleted or disabled application is refused.","operationId":"auth_refresh_token_rest_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenRequest"}}},"required":true},"responses":{"200":{"description":"A new access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangedToken"}}}},"404":{"description":"Not found"},"401":{"description":"Refresh token expired, revoked or unknown"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rest/developer/authorize":{"post":{"tags":["developer"],"summary":"A developer endpoint for self-authorization. It returns Access Token and Refresh Token or 404 if the request is invalid.","description":"Shortcut that issues a token pair straight from an application's `client_id` and `client_secret`, skipping the user-consent leg — for testing your own integration against your own account.\n\n**Non-production environments only**: the route is not registered in production. Invalid credentials return 404, not 401, so the endpoint reveals nothing about which half was wrong.","operationId":"developer_self_auth_rest_developer_authorize_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_developer_self_auth_rest_developer_authorize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIProcessor":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"The AI prompt: what the AI step should do with the data. For a documents folder source it says what to extract, and its wording is the column contract."},"on_processing_error":{"anyOf":[{"$ref":"#/components/schemas/OnProcessingError"},{"type":"null"}],"description":"Documents folder only: `continue` (default) keeps going when a document cannot be read; `stop` fails the run."},"model":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Model","description":"OpenAI model id (e.g. `gpt-5.2`) or Assistant id (`asst_…`). Needs your own OpenAI account connected in the Sheetgo web app (412 `openai_not_connected` otherwise). Without it, a connected key still runs Sheetgo's default model."},"model_settings":{"anyOf":[{"$ref":"#/components/schemas/ModelSettings"},{"type":"null"}],"description":"Model parameters. Same OpenAI-account requirement as `model`."}},"type":"object","required":["prompt"],"title":"AIProcessor"},"AnonymizeMethod":{"type":"string","enum":["salted_hash","hash","nullify","redact","partial_email","partial_start","partial_end","generalization"],"title":"AnonymizeMethod","description":"The web app's masking methods (core-lib v1/dataframe/anonymizer.py)."},"AnonymizeMode":{"type":"string","enum":["automatic","custom"],"title":"AnonymizeMode","description":"`automatic`: Google DLP (Sheetgo's project) detects personal data and\nhashes it. `custom`: a masking method per column."},"AnonymizeProcessor":{"properties":{"mode":{"$ref":"#/components/schemas/AnonymizeMode","description":"`automatic`: personal data is detected (Google DLP, on Sheetgo's account) and hashed. `custom`: you choose a method per column. Not combinable today with `ai`, `filter` or `remove_duplicates` (features incompatible in the engine) — see Processor combinations.","default":"custom"},"columns":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AnonymizeMethod"},"type":"object"},{"type":"null"}],"title":"Columns","description":"Custom mode only: column LETTER (`A`, `B`, …) → method: salted_hash, hash, nullify, redact, partial_email, partial_start (first 2 characters + ***), partial_end (*** + last 4), generalization (numbers grouped into ranges)."}},"additionalProperties":false,"type":"object","title":"AnonymizeProcessor","description":"Mask personal data before it reaches the destination (the web app's\nAnonymize step)."},"AttachmentIn":{"properties":{"filename":{"type":"string","title":"Filename","description":"File name the recipient will see, including the extension."},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the attachment, e.g. `application/pdf`."},"content_base64":{"type":"string","title":"Content Base64","description":"The file's bytes, base64-encoded. All attachments on one message must total no more than 3 MB decoded."}},"type":"object","required":["filename","content_type","content_base64"],"title":"AttachmentIn"},"AutomationCreate":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Id of the workflow this automation belongs to"},"name":{"type":"string","title":"Name","description":"Name of the automation"},"sources":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceFile"},{"$ref":"#/components/schemas/SourceFolder-Input"},{"$ref":"#/components/schemas/SourceWebhook"},{"$ref":"#/components/schemas/SourceAPI"},{"$ref":"#/components/schemas/SourceIntegration"},{"$ref":"#/components/schemas/SourceBigQuery"},{"$ref":"#/components/schemas/SourceOutlook-Input"}]},"type":"array","title":"Sources","description":"List of sources to connect to"},"merge":{"anyOf":[{"$ref":"#/components/schemas/MergeProcessor"},{"type":"null"}],"description":"Merge step options"},"filter":{"anyOf":[{"$ref":"#/components/schemas/FilterCondition-Input"},{"$ref":"#/components/schemas/FilterColumn"},{"$ref":"#/components/schemas/FilterQuery"},{"type":"null"}],"title":"Filter","description":"Filter step options. Columns are spreadsheet LETTERS — get them from `GET /files/{provider}/{file_id}/structure?include=columns` on the source file (see Column letters). Not combinable today with `remove_duplicates` or `anonymize` (features incompatible in the engine) — see Processor combinations."},"ai":{"anyOf":[{"$ref":"#/components/schemas/AIProcessor"},{"type":"null"}],"description":"AI step options"},"left_join":{"anyOf":[{"$ref":"#/components/schemas/LeftJoinProcessor"},{"type":"null"}],"description":"Left join step options"},"destinations":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Input"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Input","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},"type":"array"},{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Input"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Input","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},{"type":"null"}],"title":"Destinations","description":"Destinations to connect to"},"number_format":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Number Format","description":"Number format","default":false},"transfer_format":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Format","description":"Transfer format","default":false},"remove_duplicates":{"anyOf":[{"$ref":"#/components/schemas/RemoveDuplicatesProcessor"},{"type":"null"}],"description":"Remove duplicate rows. Not combinable today with `ai`, `filter` or `anonymize` (features incompatible in the engine) — see Processor combinations."},"anonymize":{"anyOf":[{"$ref":"#/components/schemas/AnonymizeProcessor"},{"type":"null"}],"description":"Anonymize step options. Not combinable today with `ai`, `filter` or `remove_duplicates` (features incompatible in the engine) — see Processor combinations."},"split":{"anyOf":[{"$ref":"#/components/schemas/Split"},{"type":"null"}],"description":"Split step options"}},"type":"object","required":["workflow_id","name","sources"],"title":"AutomationCreate"},"AutomationModel":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the automation"},"name":{"type":"string","title":"Name","description":"Name of the automation"},"owner":{"type":"string","title":"Owner","description":"Owner of the automation"},"status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status","description":"Execution result code: 0 = never executed, 1 = executed successfully, > 1 = error (inspect status_message / status_docs_link).","default":0},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","description":"Human-readable error description when status > 1."},"status_docs_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Docs Link","description":"Documentation link for the error when status > 1."},"last_updating_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updating User","description":"Last updated user of the automation"},"execution":{"anyOf":[{"$ref":"#/components/schemas/ExecutionStatus"},{"type":"null"}],"description":"Execution status of the automation","default":"completed"},"input_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Count","description":"Number of inputs of the automation","default":0},"output_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Count","description":"Number of outputs of the automation","default":0},"sources":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceFile"},{"$ref":"#/components/schemas/SourceFolder-Output"},{"$ref":"#/components/schemas/SourceWebhook"},{"$ref":"#/components/schemas/SourceAPI"},{"$ref":"#/components/schemas/SourceIntegration"},{"$ref":"#/components/schemas/SourceBigQuery"},{"$ref":"#/components/schemas/SourceOutlook-Output"}]},"type":"array","title":"Sources","description":"Sources of the automation"},"destinations":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Output"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Output","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},"type":"array"},{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Output"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Output","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},{"type":"null"}],"title":"Destinations","description":"Destinations of the automation"},"ai":{"anyOf":[{"$ref":"#/components/schemas/AIProcessor"},{"type":"null"}],"description":"The AI step, when the automation has one."},"anonymize":{"anyOf":[{"$ref":"#/components/schemas/AnonymizeProcessor"},{"type":"null"}],"description":"The Anonymize step, when the automation has one."},"merge":{"anyOf":[{"$ref":"#/components/schemas/MergeProcessor"},{"type":"null"}],"description":"The Merge step, when the automation has one."},"filter":{"anyOf":[{"$ref":"#/components/schemas/FilterCondition-Output"},{"$ref":"#/components/schemas/FilterColumn"},{"$ref":"#/components/schemas/FilterQuery"},{"type":"null"}],"title":"Filter","description":"The Filter step, when the automation has one the API can represent (nested groups, colour filters and conditions combined with a column selection read back as null)."},"left_join":{"anyOf":[{"$ref":"#/components/schemas/LeftJoinProcessor"},{"type":"null"}],"description":"The Left join step, when the automation has one."},"remove_duplicates":{"anyOf":[{"$ref":"#/components/schemas/RemoveDuplicatesProcessor"},{"type":"null"}],"description":"The Remove duplicates step, when the automation has one."},"split":{"anyOf":[{"$ref":"#/components/schemas/Split"},{"type":"null"}],"description":"The Split step, when the automation has one."}},"type":"object","required":["id","name","owner"],"title":"AutomationModel"},"AutomationPatch":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"New name of the automation"}},"additionalProperties":false,"type":"object","required":["name"],"title":"AutomationPatch","description":"Rename only. Unknown fields are rejected (SG-14706): they used to be dropped\nwith a 200, and a missing `name` was saved as null, blanking the automation."},"AutomationReplace":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Id of the workflow this automation belongs to"},"name":{"type":"string","title":"Name","description":"Name of the automation"},"sources":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceFile"},{"$ref":"#/components/schemas/SourceFolder-Input"},{"$ref":"#/components/schemas/SourceWebhook"},{"$ref":"#/components/schemas/SourceAPI"},{"$ref":"#/components/schemas/SourceIntegration"},{"$ref":"#/components/schemas/SourceBigQuery"},{"$ref":"#/components/schemas/SourceOutlook-Input"}]},"type":"array","title":"Sources","description":"List of sources to connect to"},"merge":{"anyOf":[{"$ref":"#/components/schemas/MergeProcessor"},{"type":"null"}],"description":"Merge step options"},"filter":{"anyOf":[{"$ref":"#/components/schemas/FilterCondition-Input"},{"$ref":"#/components/schemas/FilterColumn"},{"$ref":"#/components/schemas/FilterQuery"},{"type":"null"}],"title":"Filter","description":"Filter step options. Columns are spreadsheet LETTERS — get them from `GET /files/{provider}/{file_id}/structure?include=columns` on the source file (see Column letters). Not combinable today with `remove_duplicates` or `anonymize` (features incompatible in the engine) — see Processor combinations."},"ai":{"anyOf":[{"$ref":"#/components/schemas/AIProcessor"},{"type":"null"}],"description":"AI step options"},"left_join":{"anyOf":[{"$ref":"#/components/schemas/LeftJoinProcessor"},{"type":"null"}],"description":"Left join step options"},"destinations":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Input"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Input","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},"type":"array"},{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Input"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Input","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},{"type":"null"}],"title":"Destinations","description":"Destinations to connect to"},"number_format":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Number Format","description":"Number format","default":false},"transfer_format":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Format","description":"Transfer format","default":false},"remove_duplicates":{"anyOf":[{"$ref":"#/components/schemas/RemoveDuplicatesProcessor"},{"type":"null"}],"description":"Remove duplicate rows. Not combinable today with `ai`, `filter` or `anonymize` (features incompatible in the engine) — see Processor combinations."},"anonymize":{"anyOf":[{"$ref":"#/components/schemas/AnonymizeProcessor"},{"type":"null"}],"description":"Anonymize step options. Not combinable today with `ai`, `filter` or `remove_duplicates` (features incompatible in the engine) — see Processor combinations."},"split":{"anyOf":[{"$ref":"#/components/schemas/Split"},{"type":"null"}],"description":"Split step options"},"id":{"type":"string","title":"Id","description":"Id of the automation"}},"type":"object","required":["workflow_id","name","sources","id"],"title":"AutomationReplace"},"AutomationRunStatus":{"properties":{"automation_id":{"type":"string","title":"Automation Id","description":"Id of the automation this status belongs to."},"execution":{"type":"string","title":"Execution","description":"Live phase: `running` while the run is enqueued, executing or cancelling; `completed` once it has stopped. Poll until this is `completed` before trusting `result`."},"result":{"type":"string","title":"Result","description":"Outcome of the last finished run: `never_run` (it has not run yet), `success`, or `error`. While `execution` is `running`, this still describes the PREVIOUS run."},"status_code":{"type":"integer","title":"Status Code","description":"Sheetgo result code behind `result`: 0 = never run, 1 = success, anything greater = the specific error. Useful when you want to branch on the exact failure.","default":0},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Human-readable explanation of the run's outcome — the stored run message when there is one, otherwise the standard description for `status_code`. Null on success and before the first run."},"docs_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Link","description":"URL of the help article for this error, when one exists. Null unless `result` is `error`."},"error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Error Count","description":"Number of individual errors recorded during the run (a run can fail on several rows or files). Null when not tracked."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"How long the last run took, in seconds. Null before the first run completes."}},"type":"object","required":["automation_id","execution","result"],"title":"AutomationRunStatus","description":"The outcome of an automation's LAST run. There is no run history."},"BatchBody":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ids","description":"Message ids to fetch. At most 50, or 10 when `include_attachments` is true."},"include_attachments":{"type":"boolean","title":"Include Attachments","description":"Whether to return each message's attachment content as well as its metadata. Lowers the batch cap to 10.","default":false}},"type":"object","required":["ids"],"title":"BatchBody","description":"Fetch several messages in one request, by id."},"BigQueryDataset":{"properties":{"id":{"type":"string","title":"Id","description":"Dataset id. Pass this back as `dataset`."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"}},"type":"object","required":["id"],"title":"BigQueryDataset"},"BigQueryDatasetListResponse":{"properties":{"truncated":{"type":"boolean","title":"Truncated","description":"True when the listing hit `BIGQUERY_DISCOVERY_MAX_ITEMS`, so items past it are not reachable by paging.","default":false},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/BigQueryDataset"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"BigQueryDatasetListResponse"},"BigQueryPartition":{"properties":{"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"Column to partition by. It must exist in the transferred data -- check with `GET /rest/beta/bigquery/.../tables/{table}`. Omit for ingestion-time partitioning."},"granularity":{"$ref":"#/components/schemas/BigQueryPartitionGranularity","description":"Partition size: HOUR, DAY, MONTH or YEAR.","default":"DAY"},"require_filter":{"type":"boolean","title":"Require Filter","description":"Require queries against the table to filter on the partition column. Applied only when the table is created.","default":false}},"type":"object","title":"BigQueryPartition","description":"Partitioning for a table Sheetgo creates.\n\nOmit `field` for ingestion-time partitioning; name a column for\nfield-based. There is no third setting: BigQuery infers the partition\ncolumn's *type* from the table schema, so presence of `field` is the whole\ndistinction.\n\nOnly applied when the table is created. An existing table keeps its own\npartitioning, so change it with `write_mode: \"recreate\"`."},"BigQueryPartitionGranularity":{"type":"string","enum":["HOUR","DAY","MONTH","YEAR"],"title":"BigQueryPartitionGranularity"},"BigQueryPartitioningInfo":{"properties":{"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"Partition column; null for ingestion-time partitioning"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The column's BigQuery type"},"granularity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granularity","description":"HOUR, DAY, MONTH or YEAR"},"is_ingestion_time":{"type":"boolean","title":"Is Ingestion Time","description":"True when partitioned by ingestion time","default":false}},"type":"object","title":"BigQueryPartitioningInfo","description":"How an existing table is partitioned.\n\nAn existing table keeps its own partitioning regardless of what a\ndestination payload asks for, so this is what a destination will actually\nwrite into."},"BigQueryProject":{"properties":{"id":{"type":"string","title":"Id","description":"Project id. Pass this back as `project` in an automation source or destination."},"numeric_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numeric Id","description":"The project's numeric id. Accepted as `project` too, but the string id above is the readable form."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"}},"type":"object","required":["id"],"title":"BigQueryProject","description":"One GCP project visible to the authorized account."},"BigQueryProjectListResponse":{"properties":{"truncated":{"type":"boolean","title":"Truncated","description":"True when the listing hit `BIGQUERY_DISCOVERY_MAX_ITEMS`, so items past it are not reachable by paging.","default":false},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/BigQueryProject"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"BigQueryProjectListResponse"},"BigQueryTable":{"properties":{"id":{"type":"string","title":"Id","description":"Table id. Pass this back as `table`."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"}},"type":"object","required":["id"],"title":"BigQueryTable"},"BigQueryTableDetail":{"properties":{"project":{"type":"string","title":"Project","description":"Google Cloud project the table belongs to."},"dataset":{"type":"string","title":"Dataset","description":"Dataset the table belongs to."},"table":{"type":"string","title":"Table","description":"The table's own id, unqualified."},"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Schema","description":"Column name to BigQuery type, e.g. `{\"Rank\": \"INTEGER\", \"created_at\": \"TIMESTAMP\"}`. A destination's `partition.field` must name one of these, and its type is inferred from here."},"num_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Rows","description":"Row count as BigQuery reports it"},"num_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Bytes","description":"Size in bytes"},"partitioning":{"anyOf":[{"$ref":"#/components/schemas/BigQueryPartitioningInfo"},{"type":"null"}],"description":"Null when the table is not partitioned"}},"type":"object","required":["project","dataset","table"],"title":"BigQueryTableDetail","description":"One table, with the typed schema a destination's `partition.field` needs."},"BigQueryTableListResponse":{"properties":{"truncated":{"type":"boolean","title":"Truncated","description":"True when the listing hit `BIGQUERY_DISCOVERY_MAX_ITEMS`, so items past it are not reachable by paging.","default":false},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/BigQueryTable"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"BigQueryTableListResponse"},"BigQueryWriteMode":{"type":"string","enum":["append","truncate","recreate"],"title":"BigQueryWriteMode","description":"What happens to data already in the destination table.\n\nRead by ``BigQueryManager.merge_temporary_to_destination``."},"BodyContent":{"properties":{"content_type":{"type":"string","enum":["text","html"],"title":"Content Type","description":"How `content` should be interpreted: `text` for plain text, `html` for an HTML body.","default":"text"},"content":{"type":"string","title":"Content","description":"The message body itself, in the format named by `content_type`."}},"type":"object","required":["content"],"title":"BodyContent"},"Body_auth_token_rest_auth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type","description":"OAuth2 grant type. Must be `authorization_code`."},"code":{"type":"string","title":"Code","description":"The single-use authorization code returned to your redirect URI by the authorize step."},"redirect_uri":{"type":"string","title":"Redirect Uri","description":"The same redirect URI that was used to obtain `code`. It must match your application's registered URI exactly."},"client_id":{"type":"string","title":"Client Id","description":"Your application's client id."},"client_secret":{"type":"string","title":"Client Secret","description":"Your application's client secret. Never expose it in a browser or mobile client."}},"type":"object","required":["grant_type","code","redirect_uri","client_id","client_secret"],"title":"Body_auth_token_rest_auth_token_post"},"Body_developer_self_auth_rest_developer_authorize_post":{"properties":{"client_id":{"type":"string","title":"Client Id","description":"Client id supplied application for the developer was created"},"client_secret":{"type":"string","title":"Client Secret","description":"Client Secret supplied application for the developer was created"}},"type":"object","required":["client_id","client_secret"],"title":"Body_developer_self_auth_rest_developer_authorize_post"},"ChangeOwnerIn":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email of the collaborator to transfer ownership to. They must already be a collaborator on the workflow; the current owner becomes a manager."}},"type":"object","required":["email"],"title":"ChangeOwnerIn"},"ChartItem":{"properties":{"chart_id":{"type":"integer","title":"Chart Id","description":"Numeric chart id. Pass as `chart_id` when creating a dashboard element."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The chart's title as set in the spreadsheet, when it has one."},"chart_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chart Type","description":"Normalized chart type, e.g. column, line, pie"},"tab_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tab Id","description":"Numeric id of the tab the chart is drawn on."},"tab_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab Name","description":"Name of that tab."},"supported":{"type":"boolean","title":"Supported","description":"False when Sheetgo cannot render this chart type on a dashboard","default":true}},"type":"object","required":["chart_id"],"title":"ChartItem","description":"One chart already drawn in the spreadsheet."},"CollaboratorOut":{"properties":{"email":{"type":"string","title":"Email","description":"The collaborator's email address, which identifies them everywhere in this API."},"role":{"type":"string","title":"Role","description":"owner | manager | collaborator"},"is_owner":{"type":"boolean","title":"Is Owner","description":"True for the workflow's owner. The owner cannot be removed or have their role changed — transfer ownership instead.","default":false}},"type":"object","required":["email","role"],"title":"CollaboratorOut"},"CollaboratorRoleUpdate":{"properties":{"role":{"type":"string","enum":["collaborator","manager"],"title":"Role","description":"The role to move this collaborator to: `collaborator` or `manager`. The owner's role cannot be changed here."},"update_file_access":{"type":"boolean","title":"Update File Access","description":"Also grant/revoke file access to match the role","default":false}},"type":"object","required":["role"],"title":"CollaboratorRoleUpdate"},"CollaboratorsAdd":{"properties":{"emails":{"items":{"type":"string","format":"email"},"type":"array","minItems":1,"title":"Emails","description":"Emails to invite"},"role":{"type":"string","enum":["collaborator","manager"],"title":"Role","description":"collaborator | manager"},"skip_invitation":{"type":"boolean","title":"Skip Invitation","description":"Add silently, without the invitation email","default":false},"share_files":{"type":"boolean","title":"Share Files","description":"Also grant access to the workflow's files","default":false},"file_access":{"type":"string","enum":["reader","commenter","writer"],"title":"File Access","description":"File permission when share_files is true","default":"writer"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Optional note included in the invitation"}},"type":"object","required":["emails","role"],"title":"CollaboratorsAdd"},"CollaboratorsOut":{"properties":{"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner","description":"Email of the workflow's owner."},"collaborators":{"items":{"$ref":"#/components/schemas/CollaboratorOut"},"type":"array","title":"Collaborators","description":"Everyone with access to the workflow, the owner included."}},"type":"object","title":"CollaboratorsOut"},"ColumnItem":{"properties":{"letter":{"type":"string","title":"Letter","description":"Spreadsheet column letter — the value automation column fields take (`filter`, `split`, `remove_duplicates`, `left_join`, `anonymize`)."},"index":{"type":"integer","title":"Index","description":"Zero-based column position."},"header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header","description":"The header cell exactly as stored (not trimmed — match it verbatim); null when the cell is empty."}},"type":"object","required":["letter","index"],"title":"ColumnItem","description":"One column of a tab's header row."},"ConditionExpression":{"properties":{"column":{"type":"string","title":"Column","description":"Spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":["D"]},"criteria":{"$ref":"#/components/schemas/ExpressionCriteria","description":"The criteria"},"value":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Value","description":"The value"}},"type":"object","title":"ConditionExpression"},"ConditionType":{"type":"string","enum":["and","or"],"title":"ConditionType"},"ContentType":{"type":"string","enum":["spreadsheets","documents"],"title":"ContentType","description":"What a folder source reads: spreadsheets, or documents for AI extraction."},"DashboardOut":{"properties":{"elements":{"items":{"$ref":"#/components/schemas/ElementOut"},"type":"array","title":"Elements","description":"Every element on the dashboard, in stored order. Empty for a workflow whose dashboard has not been built yet."},"publish":{"$ref":"#/components/schemas/PublishOut","description":"Whether the dashboard is published, and under what access restrictions."}},"type":"object","required":["publish"],"title":"DashboardOut","description":"A workflow's single dashboard: its elements and its publication state."},"DataSourceOut":{"properties":{"id":{"type":"string","title":"Id","description":"Pass this back as `sources[].data_source`"},"name":{"type":"string","title":"Name","description":"Display name"},"description":{"type":"string","title":"Description","description":"What it returns","default":""},"kind":{"type":"string","title":"Kind","description":"`query` for records, `report` for a report"},"parameters":{"additionalProperties":{"$ref":"#/components/schemas/DataSourceParameter"},"type":"object","title":"Parameters","description":"Parameters this data source accepts, keyed by name. Empty for everything except QuickBooks reports."}},"type":"object","required":["id","name","kind"],"title":"DataSourceOut","description":"One thing you can ask a provider for."},"DataSourceParameter":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What it controls"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"`date` or `string`"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Expected format when the type is `date`"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options","description":"Accepted values. When present, the only accepted values."},"optional_for":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Optional For","description":"Advisory: supplying this parameter makes those alternatives unnecessary. Nothing is enforced as required."}},"type":"object","title":"DataSourceParameter","description":"One parameter a data source accepts.\n\nWhen `options` is present it is the authority: `date_macro` declares\n`type: date` but its options are macro strings like \"Last Month\", so a\nvalue is checked against `options` first and against `type` only when no\noptions are declared."},"DestinationApiPublish":{"properties":{"type":{"type":"string","const":"api","title":"Type","description":"Publishes the rows as a read-only JSON **API endpoint** hosted by Sheetgo."},"append":{"type":"boolean","title":"Append","description":"Add each run's rows under the previous ones instead of replacing them. The column headers must match the existing ones or the run fails.","default":false},"public_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Id","description":"Read-only. Assigned by Sheetgo when the automation is created; ignored if you send it."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Read-only. Where to fetch the published data. Requires an API key with the `api-destination` scope."}},"type":"object","required":["type"],"title":"DestinationApiPublish","description":"Publish the automation's rows to a Sheetgo-hosted endpoint you can poll.\n\nRead it back with `GET /rest/beta/api-destination/{public_id}`, which needs\nan API key carrying the `api-destination` scope."},"DestinationBigQuery-Input":{"properties":{"type":{"type":"string","const":"bigquery","title":"Type","description":"Writes the rows into a **BigQuery** table. Must be the only destination."},"project":{"type":"string","title":"Project","description":"GCP project id"},"dataset":{"type":"string","title":"Dataset","description":"Existing BigQuery dataset id. Sheetgo does not create datasets."},"table":{"type":"string","title":"Table","description":"Table id. Created on the first run if it does not exist."},"write_mode":{"$ref":"#/components/schemas/BigQueryWriteMode","description":"`append` adds rows; `truncate` clears the data but keeps the schema and partitioning; `recreate` drops and rebuilds the table from the transferred data.","default":"append"},"schema_evolution":{"type":"boolean","title":"Schema Evolution","description":"Add columns to the destination table when the transferred data has new ones. With the default `false`, extra columns fail the run instead. Only ever adds -- never removes, renames or retypes.","default":false},"partition":{"anyOf":[{"$ref":"#/components/schemas/BigQueryPartition"},{"type":"null"}],"description":"Omit for an unpartitioned table."}},"type":"object","required":["type","project","dataset","table"],"title":"DestinationBigQuery","description":"Load the automation's rows into a BigQuery table.\n\nThe table is created on the first run if it does not exist; the **dataset**\nis not, and must already exist.\n\nMust be the automation's only destination, and at most one per automation --\nsee validate_bigquery_automation."},"DestinationBigQuery-Output":{"properties":{"type":{"type":"string","const":"bigquery","title":"Type","description":"Writes the rows into a **BigQuery** table. Must be the only destination."},"project":{"type":"string","title":"Project","description":"GCP project id"},"dataset":{"type":"string","title":"Dataset","description":"Existing BigQuery dataset id. Sheetgo does not create datasets."},"table":{"type":"string","title":"Table","description":"Table id. Created on the first run if it does not exist."},"write_mode":{"$ref":"#/components/schemas/BigQueryWriteMode","description":"`append` adds rows; `truncate` clears the data but keeps the schema and partitioning; `recreate` drops and rebuilds the table from the transferred data.","default":"append"},"schema_evolution":{"type":"boolean","title":"Schema Evolution","description":"Add columns to the destination table when the transferred data has new ones. With the default `false`, extra columns fail the run instead. Only ever adds -- never removes, renames or retypes.","default":false},"partition":{"anyOf":[{"$ref":"#/components/schemas/BigQueryPartition"},{"type":"null"}],"description":"Omit for an unpartitioned table."}},"type":"object","required":["type","project","dataset","table"],"title":"DestinationBigQuery","description":"Load the automation's rows into a BigQuery table.\n\nThe table is created on the first run if it does not exist; the **dataset**\nis not, and must already exist.\n\nMust be the automation's only destination, and at most one per automation --\nsee validate_bigquery_automation."},"DestinationDocument":{"properties":{"type":{"type":"string","const":"document","title":"Type","description":"Generates a Google **Docs document** per row from a template (docs-merge)."},"provider":{"type":"string","const":"drive","title":"Provider","description":"Storage provider. Generated documents and PDFs are Google Drive only.","default":"drive"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Id of an existing folder to write into. Provide this or `folder_name`."},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name","description":"Name of a new folder to create instead of using an existing one. Provide this or `id`."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Folder to create `folder_name` inside. Defaults to the drive root. Only valid together with `folder_name`."},"template_id":{"type":"string","title":"Template Id","description":"Id of the Google Docs file used as the template. Google Drive only. Google Docs are **not returned by default** by the file endpoints — find one with `GET /rest/beta/files/drive?type=gdocs`."},"file_name":{"type":"string","title":"File Name","description":"Name pattern for each generated document. Supports {{Column}} smart tags, which are replaced with that row's value — e.g. \"Invoice {{Customer}} {{Month}}\". See the Smart Tags section."},"unused_fields":{"$ref":"#/components/schemas/UnusedFields","description":"What to do when a {{Tag}} in the template matches no source column: `error` fails the run, `ignore` leaves it blank.","default":"error"},"generator_controller":{"type":"boolean","title":"Generator Controller","description":"Add a column to the source data holding a link to each generated document.","default":true},"generator_controller_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generator Controller Prefix","description":"Prefix for the control column's header. Defaults to the automation name."},"markdown_formatting":{"type":"boolean","title":"Markdown Formatting","description":"Render markdown found in cell values as formatted text in the document.","default":false}},"type":"object","required":["type","template_id","file_name"],"title":"DestinationDocument","description":"Generate one Google Docs file per row from a template (docs-merge)."},"DestinationFile":{"properties":{"type":{"type":"string","const":"file","title":"Type","description":"Writes the result into an existing **file**."},"provider":{"$ref":"#/components/schemas/Provider","description":"The storage provider that hosts the file or folder"},"id":{"type":"string","title":"Id","description":"Id of the destination file or folder"},"file_type":{"$ref":"#/components/schemas/FileType","description":"The file type"},"sheet_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Name","description":"The sheet name"},"append":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Append","description":"Data will be added under previous entries to track historical changes","default":false},"lock_destination_tab":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lock Destination Tab","description":"Lock the destination tab and clear added columns with each transfer","default":true},"parse_data":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parse Data","description":"Convert text to numbers, dates, and formulas","default":true},"identify_data":{"anyOf":[{"$ref":"#/components/schemas/IdentifyDataType"},{"type":"null"}],"description":"It will create an extra column in the destination tab, identifying the latest transfers of your new sheet and/or the source file of each row of data, making data traceable when merging sources."},"one_tab_per_document":{"type":"boolean","title":"One Tab Per Document","description":"Documents folder source only: one tab per document (up to 100) instead of all documents in one tab.","default":false},"write_summary_tab":{"type":"boolean","title":"Write Summary Tab","description":"Documents folder source only: add a `Files` tab listing each document read, its status and row count.","default":false},"enforce_header_match":{"type":"boolean","title":"Enforce Header Match","description":"Documents folder source only: line documents' columns up by position instead of by name. Ignored with `one_tab_per_document`.","default":false}},"type":"object","required":["type","provider","id","file_type"],"title":"DestinationFile"},"DestinationFolder":{"properties":{"type":{"type":"string","const":"folder","title":"Type","description":"Writes into a **folder**: new files per split value, or the files an Outlook source saves."},"provider":{"$ref":"#/components/schemas/Provider","description":"The storage provider that hosts the file or folder"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Id of an existing folder. Provide this or `folder_name`."},"file_type":{"type":"string","const":"folder","title":"File Type","description":"Always `folder`. Fixed by the destination type; present so folder and file destinations share one shape.","default":"folder"},"sheet_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Name","description":"The sheet name"},"append":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Append","description":"Data will be added under previous entries to track historical changes","default":false},"lock_destination_tab":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lock Destination Tab","description":"Lock the destination tab and clear added columns with each transfer","default":true},"parse_data":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parse Data","description":"Convert text to numbers, dates, and formulas","default":true},"identify_data":{"anyOf":[{"$ref":"#/components/schemas/IdentifyDataType"},{"type":"null"}],"description":"It will create an extra column in the destination tab, identifying the latest transfers of your new sheet and/or the source file of each row of data, making data traceable when merging sources."},"one_tab_per_document":{"type":"boolean","title":"One Tab Per Document","description":"Documents folder source only: one tab per document (up to 100) instead of all documents in one tab.","default":false},"write_summary_tab":{"type":"boolean","title":"Write Summary Tab","description":"Documents folder source only: add a `Files` tab listing each document read, its status and row count.","default":false},"enforce_header_match":{"type":"boolean","title":"Enforce Header Match","description":"Documents folder source only: line documents' columns up by position instead of by name. Ignored with `one_tab_per_document`.","default":false},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name","description":"Outlook source only: name of a new folder Sheetgo creates when the automation is saved. Provide this or `id`. Each create makes a new folder (a repeated POST makes another); GET then returns its `id`."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Folder to create `folder_name` inside. Defaults to the provider's root. Only valid with `folder_name`."}},"type":"object","required":["type","provider"],"title":"DestinationFolder"},"DestinationMailMerge":{"properties":{"type":{"type":"string","const":"mail_merge","title":"Type","description":"Sends one personalized email per row (**mail merge**)."},"subject":{"type":"string","title":"Subject","description":"Email subject. Supports {{Column}} smart tags."},"body":{"type":"string","title":"Body","description":"Email body template as plain text. Each line becomes one paragraph. {{Column}} smart tags are replaced per row."},"to":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"}],"title":"To","description":"Recipients: a list of addresses, one address, or a \"{{Header}}\" reference to read the address from a column."},"cc":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Cc","description":"Cc recipients. Same forms as `to`."},"bcc":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Bcc","description":"Bcc recipients. Same forms as `to`."},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To: one address, or a \"{{Header}}\" reference."},"use_plain_text":{"type":"boolean","title":"Use Plain Text","description":"Send the body as plain text instead of formatted HTML.","default":false},"track_open":{"type":"boolean","title":"Track Open","description":"Track when a recipient opens the email.","default":false},"track_click":{"type":"boolean","title":"Track Click","description":"Track when a recipient clicks a link.","default":false},"remove_sheetgo_layout":{"type":"boolean","title":"Remove Sheetgo Layout","description":"Send without the Sheetgo email layout.","default":false},"multiple_email_split":{"type":"boolean","title":"Multiple Email Split","description":"Send a separate email per address when a column holds several.","default":false},"send_from":{"$ref":"#/components/schemas/SendFrom","description":"Which mailbox sends the emails: `gmail` (default), `outlook_personal` (a personal Microsoft account) or `outlook_work` (a work or school Microsoft account). An Outlook account must be connected in Sheetgo with permission to send mail, or the request is rejected with 412 `outlook_not_connected`.","default":"gmail"},"unused_fields":{"$ref":"#/components/schemas/UnusedFields","description":"What to do when a {{Tag}} matches no source column: `error` fails the run, `ignore` leaves it blank.","default":"error"},"generator_controller":{"type":"boolean","title":"Generator Controller","description":"Add a column to the source data tracking each email sent.","default":true},"generator_controller_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generator Controller Prefix","description":"Prefix for the control column's header. Defaults to the automation name."},"markdown_formatting":{"type":"boolean","title":"Markdown Formatting","description":"Render markdown found in cell values as formatted text.","default":false}},"type":"object","required":["type","subject","body","to"],"title":"DestinationMailMerge","description":"Send one personalized email per row, rendered from `body`."},"DestinationPDF":{"properties":{"type":{"type":"string","const":"pdf","title":"Type","description":"Generates a **PDF** per row, by converting the merged document."},"provider":{"type":"string","const":"drive","title":"Provider","description":"Storage provider. Generated documents and PDFs are Google Drive only.","default":"drive"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Id of an existing folder to write into. Provide this or `folder_name`."},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name","description":"Name of a new folder to create instead of using an existing one. Provide this or `id`."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Folder to create `folder_name` inside. Defaults to the drive root. Only valid together with `folder_name`."},"paper_size":{"$ref":"#/components/schemas/PaperSize","description":"Page size of the generated PDF.","default":"letter"},"page_orientation":{"$ref":"#/components/schemas/PageOrientation","description":"Page orientation of the generated PDF.","default":"portrait"},"scale":{"type":"integer","enum":[1,2,3,4],"title":"Scale","description":"Fit-to-page scaling: 1 normal, 2 fit to width, 3 fit to height, 4 fit to page.","default":1},"merge_files":{"type":"boolean","title":"Merge Files","description":"Combine every generated PDF into a single file.","default":false}},"type":"object","required":["type"],"title":"DestinationPDF","description":"Export the automation's output to PDF into a Drive folder (converter).\n\nWhat gets converted depends on the automation's other destinations: with a\n`document` destination the generated documents are converted; with a file\ndestination the file written by the automation is converted; with neither,\nthe automation's source files are."},"DestinationShare":{"properties":{"type":{"type":"string","const":"share","title":"Type","description":"**Emails** the automation's output as an attachment or link."},"subject":{"type":"string","title":"Subject","description":"Email subject. Supports {{Column}} smart tags."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Email body as plain text. Each line becomes one paragraph. Supports {{Column}} smart tags."},"to":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"}],"title":"To","description":"Recipients: a list of addresses, one address, or a \"{{Header}}\" reference to read the address from a column."},"cc":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Cc","description":"Cc recipients. Same forms as `to`."},"bcc":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Bcc","description":"Bcc recipients. Same forms as `to`."},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To: one address, or a \"{{Header}}\" reference."},"use_plain_text":{"type":"boolean","title":"Use Plain Text","description":"Send the body as plain text instead of formatted HTML.","default":false},"track_open":{"type":"boolean","title":"Track Open","description":"Track when a recipient opens the email.","default":false},"track_click":{"type":"boolean","title":"Track Click","description":"Track when a recipient clicks a link.","default":false},"remove_sheetgo_layout":{"type":"boolean","title":"Remove Sheetgo Layout","description":"Send without the Sheetgo email layout.","default":false},"multiple_email_split":{"type":"boolean","title":"Multiple Email Split","description":"Send a separate email per address when a column holds several.","default":false},"send_from":{"$ref":"#/components/schemas/SendFrom","description":"Alpha — sending share emails from Outlook is not offered in the Sheetgo web app yet and may change. Which mailbox sends the emails: `gmail` (default), `outlook_personal` (a personal Microsoft account) or `outlook_work` (a work or school Microsoft account). An Outlook account must be connected in Sheetgo with permission to send mail, or the request is rejected with 412 `outlook_not_connected`.","default":"gmail"},"file_sending_method":{"$ref":"#/components/schemas/FileSendingMethod","description":"Send the files as shared links or as attachments.","default":"shared_link"},"file_access_role":{"$ref":"#/components/schemas/FileAccessRole","description":"Access granted by a shared link. Ignored for attachments.","default":"writer"},"group_files_by_recipient":{"type":"boolean","title":"Group Files By Recipient","description":"Send one email per recipient covering all their files, instead of one email per file.","default":true}},"type":"object","required":["type","subject","to"],"title":"DestinationShare","description":"Email the files this automation produced."},"DestinationWebhook":{"properties":{"type":{"type":"string","const":"webhook","title":"Type","description":"POSTs the resulting rows to **your endpoint** (outgoing webhook). Must be the only destination."},"endpoint":{"type":"string","title":"Endpoint","description":"URL that receives the request."},"method":{"type":"string","enum":["post","put","patch","delete"],"title":"Method","description":"HTTP method used to send the data.","default":"post"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"HTTP headers sent with the request. **Write-only** — never returned by a read, and a PUT that omits it clears it."},"body":{"type":"string","title":"Body","description":"Body template. `{{DATA}}` is every row including the header, `{{ROWS}}` is the rows as objects keyed by header; `{{for}}`, `{{if}}` and `{{except-last}}` are also available. This is a different syntax from smart tags and from cell references.","default":"{{DATA}}"}},"type":"object","required":["type","endpoint"],"title":"DestinationWebhook","description":"POST the automation's rows to an endpoint you own.\n\nNote the direction: as a **source**, `webhook` means Sheetgo mints a URL\nyou POST *into*; as a **destination** it means Sheetgo POSTs *out* to a URL\nyou own.\n\nMust be the automation's only destination — see validate_api_automation."},"ElementDataOut":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the element these values belong to."},"type":{"$ref":"#/components/schemas/ElementType","description":"The element's kind, which determines the shape of `data`."},"data":{"title":"Data","description":"The element's current values, read live from the spreadsheet. A single value for `indicator`, a list of rows for `table`, and the chart's image or reference for `chart`."},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Current page of rows, 1-based. Populated for `table` only."},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Rows per page in this response. Populated for `table` only."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total rows, for table elements"}},"type":"object","required":["id","type"],"title":"ElementDataOut","description":"One element's current values.\n\n`page`/`per_page`/`total` are populated for `table` only; the other types\nhave nothing to paginate."},"ElementOut":{"properties":{"id":{"type":"string","title":"Id","description":"Element id. Use it for delete and data reads."},"type":{"$ref":"#/components/schemas/ElementType","description":"Element kind: `indicator` (a single value), `table` (a range of rows) or `chart` (a reference to a chart already in the spreadsheet). `other` means an element the web app created that this API does not model — see `stored_type`."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Label shown above the element on the dashboard."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"Id of the Google Sheets file the element reads from."},"tab_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tab Id","description":"Numeric id of the tab the element reads from. Null for `chart` elements, which point at a chart rather than a tab."},"tab_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab Name","description":"Name of that tab at the time the element was stored. Null for `chart` elements. Renaming the tab does not update this."},"range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range","description":"A1 range the element reads, without the tab name (for example `B2:D50`). Set for `indicator` and `table`; null for `chart`."},"chart_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chart Id","description":"Numeric id of the referenced chart. Set for `chart` elements only; get it from `GET /files/{provider}/{file_id}/structure`."},"added_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added By","description":"Email of the user who added the element."},"added_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added On","description":"When the element was added, ISO 8601."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Stored render error, when one was persisted. Usually null even for a broken element: errors are written during a build and not saved (workflow/controller.py:759). Read the element's /data to be sure."},"stored_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stored Type","description":"Internal type, echoed when `type` is `other`"},"stored_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stored Role","description":"Internal role, echoed when `type` is `other`"}},"type":"object","required":["id","type"],"title":"ElementOut","description":"One stored element, in public vocabulary."},"ElementType":{"enum":["indicator","table","chart","other"],"title":"ElementType","type":"string"},"EmailFilter-Input":{"properties":{"condition_type":{"type":"string","enum":["and","or"],"title":"Condition Type","description":"`and`: every rule must match; `or`: any rule.","default":"and"},"rules":{"items":{"anyOf":[{"$ref":"#/components/schemas/EmailFilter-Input"},{"$ref":"#/components/schemas/EmailFilterRule"}]},"type":"array","minItems":1,"title":"Rules","description":"Conditions or nested groups."}},"additionalProperties":false,"type":"object","required":["rules"],"title":"EmailFilter","description":"Which emails an Outlook source reads. Groups nest (at most 3 deep)."},"EmailFilter-Output":{"properties":{"condition_type":{"type":"string","enum":["and","or"],"title":"Condition Type","description":"`and`: every rule must match; `or`: any rule.","default":"and"},"rules":{"items":{"anyOf":[{"$ref":"#/components/schemas/EmailFilter-Output"},{"$ref":"#/components/schemas/EmailFilterRule"}]},"type":"array","minItems":1,"title":"Rules","description":"Conditions or nested groups."}},"additionalProperties":false,"type":"object","required":["rules"],"title":"EmailFilter","description":"Which emails an Outlook source reads. Groups nest (at most 3 deep)."},"EmailFilterRule":{"properties":{"field":{"type":"string","enum":["subject","sender","to","cc","attachment_name","attachment_size","has_attachment"],"title":"Field","description":"`subject`, `sender` (from address), `to`, `cc` (addresses), `attachment_name`, `attachment_size` (MB) or `has_attachment`."},"operator":{"type":"string","title":"Operator","description":"Text fields: contains, not_contains, is, is_empty, is_not_empty. `attachment_size`: greater_than, greater_or_equal, less_than, less_or_equal, is_not. `has_attachment`: is."},"value":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Value","description":"Text for text fields (omit for is_empty / is_not_empty); a number of MB for `attachment_size`; true or false for `has_attachment`."}},"additionalProperties":false,"type":"object","required":["field","operator"],"title":"EmailFilterRule","description":"One condition of an Outlook source's `email_filter`."},"ExchangedToken":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"Short-lived bearer token. Send it as `Authorization: Bearer <access_token>` on API calls."},"refresh_token":{"type":"string","title":"Refresh Token","description":"Long-lived token used to obtain a new access token from `POST /rest/auth/refresh` once the access token expires. Store it securely; it is as sensitive as a password."}},"type":"object","required":["access_token","refresh_token"],"title":"ExchangedToken","description":"The token pair returned by the OAuth2 token and refresh endpoints."},"ExecutionStatus":{"type":"string","enum":["completed","running"],"title":"ExecutionStatus"},"ExpressionCriteria":{"type":"string","enum":["number_gt","number_gte","number_lt","number_lte","number_eq","number_neq","date_is","date_is_before","date_is_after","text_contains","text_does_not_contain","text_is_exactly","is_empty","is_not_empty","is_true","is_false"],"title":"ExpressionCriteria"},"FileAccessRole":{"type":"string","enum":["reader","writer"],"title":"FileAccessRole"},"FileFilter-Input":{"properties":{"condition_type":{"type":"string","enum":["and","or"],"title":"Condition Type","description":"`and`: every rule must match; `or`: any rule.","default":"and"},"rules":{"items":{"anyOf":[{"$ref":"#/components/schemas/FileFilter-Input"},{"$ref":"#/components/schemas/FileFilterRule"}]},"type":"array","minItems":1,"title":"Rules","description":"Conditions or nested groups."}},"additionalProperties":false,"type":"object","required":["rules"],"title":"FileFilter","description":"Which files inside a folder source are read. Groups nest."},"FileFilter-Output":{"properties":{"condition_type":{"type":"string","enum":["and","or"],"title":"Condition Type","description":"`and`: every rule must match; `or`: any rule.","default":"and"},"rules":{"items":{"anyOf":[{"$ref":"#/components/schemas/FileFilter-Output"},{"$ref":"#/components/schemas/FileFilterRule"}]},"type":"array","minItems":1,"title":"Rules","description":"Conditions or nested groups."}},"additionalProperties":false,"type":"object","required":["rules"],"title":"FileFilter","description":"Which files inside a folder source are read. Groups nest."},"FileFilterRule":{"properties":{"field":{"type":"string","enum":["file_name","file_type","date_modified","content"],"title":"Field","description":"What to test: `file_name`, `file_type`, `date_modified` or `content` (an emptiness check by size, not a text search)."},"operator":{"type":"string","title":"Operator","description":"`file_name`: contains, not_contains, starts_with, is. `file_type`: is, is_not. `date_modified`: within, before, after, between. `content`: is_empty, is_not_empty, is_near_empty, is_not_near_empty."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"Text for `file_name`; a type for `file_type` (google_sheets, excel, csv, tsv, pdf, google_docs); `today`/`last_week`/`last_month` for `within`; a YYYY-MM-DD date for before / after / between. Omit for `content`."},"value_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value To","description":"End date (YYYY-MM-DD) for `between` only."}},"additionalProperties":false,"type":"object","required":["field","operator"],"title":"FileFilterRule","description":"One condition of a folder source's `file_filter`."},"FileItem":{"properties":{"id":{"type":"string","title":"Id","description":"Provider id. Usable as an automation source/destination id, and as `parent` when browsing."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"},"provider":{"type":"string","title":"Provider","description":"drive | onedrive | sharepoint | dropbox"},"file_type":{"anyOf":[{"$ref":"#/components/schemas/FileTypeFilter"},{"type":"null"}],"description":"Automation file type; null when the item is outside the supported set"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type","description":"Provider mimetype"},"is_folder":{"type":"boolean","title":"Is Folder","description":"True when the item can be used as a `parent`","default":false},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Containing folder id, when the provider reports one"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size","description":"Size in bytes; null or 0 for folders and for providers that omit it"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO-8601 creation time as reported by the provider"},"modified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified At","description":"ISO-8601 last-modified time as reported by the provider"},"web_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Web Url","description":"Link to open the item in the provider UI; null when unavailable"},"kind":{"$ref":"#/components/schemas/ItemKind","description":"file | folder | site | shared_drive | virtual","default":"file"},"supports_structure":{"type":"boolean","title":"Supports Structure","description":"True when `GET /files/{provider}/{file_id}/structure` can describe this item (any spreadsheet: Google Sheets, Excel, CSV, TSV). Not a claim about reading its values.","default":false}},"type":"object","required":["id","provider"],"title":"FileItem","description":"One file or folder, normalized across all four storage providers."},"FileListResponse":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/FileItem"},"type":"array","title":"Results","description":"List of results"},"truncated":{"type":"boolean","title":"Truncated","description":"True when the listing was capped","default":false}},"type":"object","title":"FileListResponse","description":"Standard paginated envelope plus a truncation flag.\n\n``truncated`` is true when the enumeration ceiling\n(``FILE_DISCOVERY_MAX_ITEMS``, or the internal byte ceiling) was reached, so\nitems past it are not reachable by paging. Narrow with ``type`` or search."},"FileSendingMethod":{"type":"string","enum":["shared_link","attachment"],"title":"FileSendingMethod","description":"How the files reach the recipient. Wire values use a hyphen."},"FileStructureResponse":{"properties":{"file_id":{"type":"string","title":"File Id","description":"Id of the file that was inspected."},"provider":{"type":"string","title":"Provider","description":"Storage provider the file lives on."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The file's name."},"file_type":{"type":"string","title":"File Type","description":"Body discriminator, e.g. `spreadsheet`"},"resolved_file":{"anyOf":[{"$ref":"#/components/schemas/ResolvedFile"},{"type":"null"}],"description":"Set when `file_id` was a folder: the newest spreadsheet in it, whose structure is returned."},"spreadsheet":{"anyOf":[{"$ref":"#/components/schemas/SpreadsheetStructure"},{"type":"null"}],"description":"The spreadsheet's tabs, named ranges and charts. Populated when `file_type` is `spreadsheet`, absent otherwise."}},"type":"object","required":["file_id","provider","file_type"],"title":"FileStructureResponse","description":"What is inside one file.\n\nDiscriminated by `file_type`: the matching body key is populated and the\nothers are absent. Today only `spreadsheet` exists; a future document\nvariant adds `document` without changing this URL."},"FileType":{"type":"string","enum":["gsheets","xlsx","csv","tsv","folder"],"title":"FileType"},"FileTypeFilter":{"type":"string","enum":["gsheets","xlsx","csv","tsv","folder","gdocs"],"title":"FileTypeFilter","description":"Public ``type`` vocabulary.\n\nThe spreadsheet and folder values mirror\n:class:`newapi.models.beta.connections.FileType`, so such a value can be\nhanded straight back in an automation payload as ``file_type``.\n\n``gdocs`` is the exception: it has no ``FileType`` counterpart because a\nGoogle Docs id is passed as the ``document`` destination's ``template_id``,\na field that carries no file type. It is also the only value not returned by\ndefault -- ask for it explicitly."},"FilterColumn":{"properties":{"type":{"type":"string","const":"column","title":"Type","description":"A **column** filter: choose which columns are carried through."},"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"The selected columns. Each is a spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":[["A","C"]]}},"type":"object","required":["type"],"title":"FilterColumn"},"FilterCondition-Input":{"properties":{"type":{"type":"string","const":"condition","title":"Type","description":"A **condition** filter: keep rows where a column matches a comparison."},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns","description":"The selected columns. Each is a spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":[["A","C"]]},"condition_type":{"anyOf":[{"$ref":"#/components/schemas/ConditionType"},{"type":"null"}],"description":"The filter condition type"},"expressions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConditionExpression"},"type":"array"},{"type":"null"}],"title":"Expressions","description":"The filter expression"}},"type":"object","required":["type"],"title":"FilterCondition"},"FilterCondition-Output":{"properties":{"type":{"type":"string","const":"condition","title":"Type","description":"A **condition** filter: keep rows where a column matches a comparison."},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns","description":"The selected columns. Each is a spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":[["A","C"]]},"condition_type":{"anyOf":[{"$ref":"#/components/schemas/ConditionType"},{"type":"null"}],"description":"The filter condition type"},"expressions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConditionExpression"},"type":"array"},{"type":"null"}],"title":"Expressions","description":"The filter expression"}},"type":"object","required":["type"],"title":"FilterCondition"},"FilterQuery":{"properties":{"type":{"type":"string","const":"query","title":"Type","description":"A **query** filter: keep rows matching an sgql expression."},"query":{"type":"string","title":"Query","description":"The filter query string"}},"type":"object","required":["type","query"],"title":"FilterQuery"},"FormCreate":{"properties":{"title":{"type":"string","title":"Title","description":"Title for the form","default":"Untitled form"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Form description"},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Message","description":"Confirmation message"},"include_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Header","description":"True if include header","default":false},"limit_responses":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Limit Responses","description":"True if should limit responses","default":false},"require_auth":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Auth","description":"True if it requires authentication","default":false},"source":{"$ref":"#/components/schemas/FormFile","description":"Form fields source file"},"target":{"$ref":"#/components/schemas/FormFile","description":"Response destination file"}},"type":"object","required":["source","target"],"title":"FormCreate","description":"Form creation data"},"FormFile":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the file"},"name":{"type":"string","title":"Name","description":"Name of the file"},"file_type":{"$ref":"#/components/schemas/FileType","description":"Type of the file"},"provider":{"$ref":"#/components/schemas/Provider","description":"Service origin of the file"},"tab_id":{"type":"integer","title":"Tab Id","description":"Tab id of the file"},"tab_name":{"type":"string","title":"Tab Name","description":"Tab name of the file"}},"type":"object","required":["id","name","file_type","provider","tab_id","tab_name"],"title":"FormFile","description":"Used in form creation and update"},"FormFileModel":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the file"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the file"},"file_type":{"anyOf":[{"$ref":"#/components/schemas/FileType"},{"type":"null"}],"description":"Type of the file"},"provider":{"anyOf":[{"$ref":"#/components/schemas/Provider"},{"type":"null"}],"description":"Service origin of the file"},"tab_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tab Id","description":"Tab id of the file"},"tab_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab Name","description":"Tab name of the file"}},"type":"object","required":["id"],"title":"FormFileModel","description":"For displaying data"},"FormModel":{"properties":{"id":{"type":"string","title":"Id","description":"Form identification"},"title":{"type":"string","title":"Title","description":"Title for the form","default":"Untitled form"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Form description"},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Message","description":"Confirmation message"},"include_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Header","description":"True if include header","default":false},"limit_responses":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Limit Responses","description":"True if should limit responses","default":false},"require_auth":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Auth","description":"True if it requires authentication","default":false},"source":{"anyOf":[{"$ref":"#/components/schemas/FormFileModel"},{"type":"null"}],"description":"Form fields source file"},"target":{"anyOf":[{"$ref":"#/components/schemas/FormFileModel"},{"type":"null"}],"description":"Response destination file"}},"type":"object","title":"FormModel","description":"For displaying data"},"FormPatch":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title for the form"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Form description"},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Message","description":"Confirmation message"},"sync_fields_after_submission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Fields After Submission","description":"True it should sync fields after submission"},"require_auth":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Auth","description":"Require respondents to authenticate. SG-14657 — must be sent together with `limit_responses`; sending one alone is a 422. Setting `limit_responses` true forces this on."},"limit_responses":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Limit Responses","description":"Limit each respondent to one response. Must be sent together with `require_auth` — identifying the respondent is how the limit is enforced."},"source":{"anyOf":[{"$ref":"#/components/schemas/FormFile"},{"type":"null"}],"description":"Form fields source file"},"target":{"anyOf":[{"$ref":"#/components/schemas/FormFile"},{"type":"null"}],"description":"Response destination file"}},"type":"object","title":"FormPatch","description":"Form update data"},"GeneralAccessOut":{"properties":{"access_type":{"type":"string","title":"Access Type","description":"restrict | domain | team"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"The role granted to everyone covered by `access_type`. Null when `access_type` is `restrict`, where nobody is covered."}},"type":"object","required":["access_type"],"title":"GeneralAccessOut"},"GeneralAccessSet":{"properties":{"access_type":{"type":"string","enum":["restrict","domain","team"],"title":"Access Type","description":"Who gets access beyond the named collaborators: `restrict` (nobody), `domain` (anyone in the owner's email domain) or `team` (the owner's Sheetgo team)."},"role":{"anyOf":[{"type":"string","enum":["collaborator","manager"]},{"type":"null"}],"title":"Role","description":"Role to grant them — `collaborator` or `manager`. Ignored when `access_type` is `restrict`."}},"type":"object","required":["access_type"],"title":"GeneralAccessSet"},"GmailSendBody":{"properties":{"to":{"items":{"type":"string"},"type":"array","minItems":1,"title":"To","description":"Primary recipients. At least one is required; `to`, `cc` and `bcc` together may not exceed 50 addresses."},"cc":{"items":{"type":"string"},"type":"array","title":"Cc","description":"Carbon-copy recipients, visible to everyone.","default":[]},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc","description":"Blind-carbon-copy recipients, hidden from other recipients.","default":[]},"subject":{"type":"string","title":"Subject","description":"Subject line. Optional; defaults to an empty subject.","default":""},"body":{"$ref":"#/components/schemas/BodyContent","description":"The message body and whether it is plain text or HTML."},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentIn"},"type":"array","title":"Attachments","description":"Files to attach: at most 10, totalling no more than 3 MB once decoded.","default":[]}},"type":"object","required":["to","body"],"title":"GmailSendBody","description":"One message to send through the authorized Gmail account.\n\nGmail always stores a sent message in SENT, so there is no equivalent of\nOutlook's `save_to_sent_items`."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdentifyDataType":{"type":"string","enum":["source_file_location","source_file_name","source_file_creation_date","source_file_update_date","source_tab_name","destination_file_transfer_datetime"],"title":"IdentifyDataType"},"ImportMode":{"type":"string","enum":["all_newest_first","all_oldest_first","newest_file","oldest_file"],"title":"ImportMode","description":"Which files a folder source imports, ordered by modified time."},"IntegrationAccount":{"properties":{"account":{"type":"string","title":"Account","description":"Pass this back as `sources[].account`. The shop domain for Shopify, the realm (company) id for QuickBooks."},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At","description":"When the account was authorized"},"may_be_revoked":{"type":"boolean","title":"May Be Revoked","description":"True when the stored credentials are gone — the account must be re-authorized in the web app before it will run.","default":false}},"type":"object","required":["account"],"title":"IntegrationAccount","description":"One authorized account for a provider."},"IntegrationListResponse":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/IntegrationOut"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"IntegrationListResponse","description":"Standard envelope. The provider list is fixed and short, so there are no\npaging query params -- same as `GET /files/{provider}/roots`."},"IntegrationOptionsResponse":{"properties":{"provider":{"type":"string","title":"Provider","description":"The provider these options belong to, e.g. `shopify` or `quickbooks`."},"data_sources":{"items":{"$ref":"#/components/schemas/DataSourceOut"},"type":"array","title":"Data Sources","description":"Every data source this provider exposes. Use a `key` from here as an integration source's `data_source`."}},"type":"object","required":["provider"],"title":"IntegrationOptionsResponse","description":"Everything selectable for one provider."},"IntegrationOut":{"properties":{"provider":{"type":"string","title":"Provider","description":"Pass this back as `sources[].provider`"},"name":{"type":"string","title":"Name","description":"Display name"},"connected":{"type":"boolean","title":"Connected","description":"True when at least one account is authorized"},"accounts":{"items":{"$ref":"#/components/schemas/IntegrationAccount"},"type":"array","title":"Accounts","description":"Authorized accounts. Empty when not connected — authorization happens in the Sheetgo web app, not here."}},"type":"object","required":["provider","name","connected"],"title":"IntegrationOut","description":"One provider, with whatever the caller has authorized for it."},"IntegrationProvider":{"type":"string","enum":["shopify","quickbooks"],"title":"IntegrationProvider","description":"Third-party services with a pre-configured, server-managed API source.\n\nDistinct from `Provider`, which lists storage backends. The value is also\nthe prefix of the compound `service_origin` a compiled source carries\n(`shopify:<shop>`), which is what makes core-lib's load_provider_manager\npick the provider-specific request manager."},"ItemKind":{"type":"string","enum":["file","folder","site","shared_drive","virtual"],"title":"ItemKind","description":"What a result *is*, beyond its file type.\n\n``site``, ``shared_drive`` and ``virtual`` are only ever emitted by the\n``/roots`` endpoint; browse and search return ``file`` or ``folder``."},"KeepDuplicateType":{"type":"string","enum":["first","last"],"title":"KeepDuplicateType"},"LeftJoinProcessor":{"properties":{"column":{"type":"string","title":"Column","description":"Spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":["A"]}},"type":"object","title":"LeftJoinProcessor"},"MergeProcessor":{"properties":{"offset_header":{"type":"integer","title":"Offset Header","description":"The header position","default":1},"remove_header":{"type":"boolean","title":"Remove Header","description":"Remove header during the merge process","default":false}},"type":"object","title":"MergeProcessor"},"ModelSettings":{"properties":{"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Frequency Penalty"},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Presence Penalty"},"max_completion_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":1.0},{"type":"null"}],"title":"Max Completion Tokens"},"reasoning_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Reasoning Effort","description":"Applied by the engine only to models whose id starts with `o`."}},"additionalProperties":false,"type":"object","title":"ModelSettings","description":"OpenAI settings the AI step passes to the model. Honoured only with the\nuser's own OpenAI key (core-lib ai_processor/processors.py)."},"NamedRangeItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Provider namedRangeId"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name as defined in the spreadsheet"},"tab_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tab Id","description":"Numeric id of the tab the named range lives on."},"tab_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab Name","description":"Name of that tab."},"range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range","description":"A1 range the name resolves to"}},"type":"object","title":"NamedRangeItem","description":"One named range."},"OnProcessingError":{"type":"string","enum":["continue","stop"],"title":"OnProcessingError","description":"What a documents run does when one document cannot be read."},"OutlookAccount":{"type":"string","enum":["personal","work"],"title":"OutlookAccount","description":"Which connected Microsoft account reads the mailbox."},"OutlookExtract":{"type":"string","enum":["attachments","body"],"title":"OutlookExtract"},"OutlookMailbox":{"type":"string","enum":["inbox","archive","sent_items"],"title":"OutlookMailbox","description":"The mailbox folder to read — the three the web app offers."},"PageOrientation":{"type":"string","enum":["portrait","landscape"],"title":"PageOrientation"},"PaginatedResponse":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"PaginatedResponse"},"PaginatedResponse_AutomationModel_":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/AutomationModel"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"PaginatedResponse[AutomationModel]"},"PaginatedResponse_FormModel_":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/FormModel"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"PaginatedResponse[FormModel]"},"PaginatedResponse_WorkflowModel_":{"properties":{"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Page number","default":1},"per_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Page","description":"Number of items per page","default":50},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of pages","default":0},"results":{"items":{"$ref":"#/components/schemas/WorkflowModel"},"type":"array","title":"Results","description":"List of results"}},"type":"object","title":"PaginatedResponse[WorkflowModel]"},"PaginationCursor":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"scope":{"type":"string","enum":["query","body"],"title":"Scope","description":"Where the paging parameters are placed: the query string or the JSON body.","default":"query"},"type":{"type":"string","const":"cursor","title":"Type","description":"Selects **cursor** pagination: the response carries an opaque cursor that is sent back to fetch the next page."},"cursor_param":{"type":"string","title":"Cursor Param","description":"Request parameter carrying the cursor.","default":"cursor"},"has_more_key":{"type":"string","title":"Has More Key","description":"Response key holding the more-pages flag.","default":"has_more"},"next_cursor_key":{"type":"string","title":"Next Cursor Key","description":"Response key holding the next cursor.","default":"next_cursor"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationCursor","description":"Follow a cursor until the response says there is no more."},"PaginationHeaderLink":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"type":{"type":"string","const":"header-link","title":"Type","description":"Selects **header-link** pagination: the next page's URL is read from the response's `Link` header."},"next_link_key":{"type":"string","title":"Next Link Key","description":"Response header holding the next-page URL.","default":"next"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationHeaderLink","description":"Follow a next-page link found in a response header (e.g. RFC 5988 Link)."},"PaginationLink":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"type":{"type":"string","const":"link","title":"Type","description":"Selects **link** pagination: the next page's full URL is read out of the response body."},"next_link_key":{"type":"string","title":"Next Link Key","description":"Response key holding the next-page URL.","default":"next"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationLink","description":"Follow a next-page link found in the response body."},"PaginationOffset":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"scope":{"type":"string","enum":["query","body"],"title":"Scope","description":"Where the paging parameters are placed: the query string or the JSON body.","default":"query"},"type":{"type":"string","const":"offset","title":"Type","description":"Selects **offset** pagination: a row offset is advanced by the page size on each request."},"offset_param":{"type":"string","title":"Offset Param","description":"Request parameter carrying the offset.","default":"offset"},"limit_param":{"type":"string","title":"Limit Param","description":"Request parameter carrying the page size.","default":"limit"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationOffset","description":"Advance an offset by the limit until a short page comes back."},"PaginationPage":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"scope":{"type":"string","enum":["query","body"],"title":"Scope","description":"Where the paging parameters are placed: the query string or the JSON body.","default":"query"},"type":{"type":"string","const":"page","title":"Type","description":"Selects **page-number** pagination: a page counter is incremented until the response runs out of rows."},"page_param":{"type":"string","title":"Page Param","description":"Request parameter carrying the page number.","default":"page"},"per_page_param":{"type":"string","title":"Per Page Param","description":"Request parameter carrying the page size.","default":"per_page"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationPage","description":"Increment a page number until a short page comes back."},"PaginationQueryOffset":{"properties":{"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"Stop once this many items have been collected. Omit (or 0) to keep going until the endpoint runs out."},"rate_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit","description":"Pause between requests. Either \"N/seconds\" — e.g. \"100/10\" for 100 requests per 10 seconds — or a plain number of seconds, e.g. \"0.5\"."},"type":{"type":"string","const":"query-offset","title":"Type","description":"Selects **query-offset** pagination: the offset travels in the query string of the request URL."},"query_key":{"type":"string","title":"Query Key","description":"Request parameter holding the query string.","default":"query"},"query_offset_key":{"type":"string","title":"Query Offset Key","description":"Keyword inside the query that sets the offset.","default":"offset"},"query_limit_key":{"type":"string","title":"Query Limit Key","description":"Keyword inside the query that sets the page size.","default":"limit"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PaginationQueryOffset","description":"Rewrite offset/limit keywords inside a SQL-like query parameter."},"PaperSize":{"type":"string","enum":["letter","tabloid","legal","statement","executive","folio","A3","A4","A5","B4","B5"],"title":"PaperSize"},"Provider":{"type":"string","enum":["drive","onedrive","sharepoint","dropbox"],"title":"Provider"},"PublishOut":{"properties":{"shared":{"type":"string","title":"Shared","description":"`public` if the dashboard is published and reachable at `url`, `private` if it is not."},"require_auth":{"type":"boolean","title":"Require Auth","description":"Whether a viewer must be signed in to open the dashboard. Only meaningful while `shared` is `public`.","default":false},"auth_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Config","description":"The access restriction applied when `require_auth` is true — `{\"domain\": true}` limits viewers to the owner's email domain. Null when unrestricted."},"public_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Id","description":"Stable public identifier minted at first publish; it forms the `url`. Null until the dashboard has been published once."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Viewer URL; null while private and never published"}},"type":"object","required":["shared"],"title":"PublishOut","description":"The dashboard's current publication state."},"RefreshTokenRequest":{"properties":{"grant_type":{"type":"string","title":"Grant Type","description":"OAuth2 grant type. Must be `refresh_token` for this endpoint.","default":"refresh_token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"The refresh token previously issued by `POST /rest/auth/token`."},"client_id":{"type":"string","title":"Client Id","description":"Your application's client id."},"client_secret":{"type":"string","title":"Client Secret","description":"Your application's client secret. Never expose it in a browser or mobile client."}},"type":"object","required":["refresh_token","client_id","client_secret"],"title":"RefreshTokenRequest","description":"The parameters used when refreshing a token"},"RemoveDuplicatesProcessor":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"The selected columns. Each is a spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":[["A","C"]]},"keep":{"$ref":"#/components/schemas/KeepDuplicateType","description":"Keep duplicated rows","default":"first"}},"type":"object","title":"RemoveDuplicatesProcessor"},"ResolvedFile":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the spreadsheet that was read."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Its name."}},"type":"object","required":["id"],"title":"ResolvedFile","description":"The spreadsheet a folder id resolved to."},"SendBody":{"properties":{"to":{"items":{"type":"string"},"type":"array","minItems":1,"title":"To","description":"Primary recipients. At least one is required; `to`, `cc` and `bcc` together may not exceed 50 addresses."},"cc":{"items":{"type":"string"},"type":"array","title":"Cc","description":"Carbon-copy recipients, visible to everyone.","default":[]},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc","description":"Blind-carbon-copy recipients, hidden from other recipients.","default":[]},"subject":{"type":"string","title":"Subject","description":"Subject line. Optional; defaults to an empty subject.","default":""},"body":{"$ref":"#/components/schemas/BodyContent","description":"The message body and whether it is plain text or HTML."},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentIn"},"type":"array","title":"Attachments","description":"Files to attach: at most 10, totalling no more than 3 MB once decoded.","default":[]},"save_to_sent_items":{"type":"boolean","title":"Save To Sent Items","description":"Whether to keep a copy in the account's Sent Items folder. Set false to send without recording it.","default":true}},"type":"object","required":["to","body"],"title":"SendBody","description":"One message to send through the authorized Outlook account."},"SendFrom":{"type":"string","enum":["gmail","outlook_personal","outlook_work"],"title":"SendFrom","description":"Which mailbox sends an email destination's messages.\n\nEach value is one of the three (mimetype, service_origin) pairs Core API's\nvalidator accepts for an email interface (connection/utils.py\n_is_email_interface), which the share service reads to pick the sender\n(sheetgo-microservices/share/mail_provider.py). Mirrors the web app's\nEmailSendFrom (web-app/src/constants/Mail/index.js)."},"SourceAPI":{"properties":{"type":{"type":"string","const":"api","title":"Type","description":"Marks this source as an **API request**: Sheetgo calls your endpoint and turns the response into rows. Cannot be combined with file, folder or webhook sources."},"endpoint":{"type":"string","title":"Endpoint","description":"URL to request. Supports `{{Tab!Ref}}` cell references — see the Cell References section."},"method":{"type":"string","enum":["get","post"],"title":"Method","description":"HTTP method. Only GET and POST can read data.","default":"get"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"HTTP headers sent with the request, e.g. `{\"Authorization\": \"Bearer …\"}`. Supports `{{Tab!Ref}}` cell references. **Write-only** — never returned by a read, and a PUT that omits it clears it."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Request body, sent as JSON when the endpoint expects it. Supports `{{Tab!Ref}}` cell references. Do not put credentials here — unlike `headers`, it is returned by reads."},"data_root":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Root","description":"Dotted path to the list of records inside the response, e.g. `data.orders`. Omit to let Sheetgo detect it."},"header_root":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Root","description":"Dotted path to a list of column names inside the response, used as the header row."},"pagination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/PaginationCursor"},{"$ref":"#/components/schemas/PaginationPage"},{"$ref":"#/components/schemas/PaginationOffset"},{"$ref":"#/components/schemas/PaginationQueryOffset"},{"$ref":"#/components/schemas/PaginationLink"},{"$ref":"#/components/schemas/PaginationHeaderLink"}],"discriminator":{"propertyName":"type","mapping":{"cursor":"#/components/schemas/PaginationCursor","header-link":"#/components/schemas/PaginationHeaderLink","link":"#/components/schemas/PaginationLink","offset":"#/components/schemas/PaginationOffset","page":"#/components/schemas/PaginationPage","query-offset":"#/components/schemas/PaginationQueryOffset"}}},{"type":"null"}],"title":"Pagination","description":"How to walk a paginated endpoint. Omit for a single request."},"auth":{"anyOf":[{"$ref":"#/components/schemas/SourceAuth"},{"type":"null"}],"description":"OAuth2 token refresh. **Write-only** — never returned by a read, and a PUT that omits it clears it."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for this source. Also used as the destination tab name when several sources are transferred without a merge. Defaults to `API`."}},"type":"object","required":["type","endpoint"],"title":"SourceAPI","description":"Request an HTTP endpoint and use the JSON it returns as source data.\n\nCannot be combined with file, folder or webhook sources — see\nvalidate_api_automation."},"SourceAllTabs":{"type":"string","enum":["all_tabs"],"title":"SourceAllTabs"},"SourceAuth":{"properties":{"auth_method":{"type":"string","const":"oauth2","title":"Auth Method","description":"Only `oauth2` is supported. The engine refreshes the token on a 401/403 and retries."},"auth_type":{"type":"string","title":"Auth Type","description":"Scheme used in the Authorization header after a refresh, e.g. `Bearer`.","default":"Bearer"},"refresh_url":{"type":"string","title":"Refresh Url","description":"Token endpoint called to refresh."},"refresh_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Refresh Headers","description":"Extra headers sent with the refresh request."},"refresh_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Refresh Params","description":"Form body of the refresh request, e.g. `client_id`, `client_secret`, `refresh_token`. Write-only: never returned by a read."}},"type":"object","required":["auth_method","refresh_url"],"title":"SourceAuth","description":"OAuth2 refresh for an API source.\n\n⚠️ `refresh_params` typically carries a client secret and a refresh token.\nAutomation interface payloads are NOT encrypted at rest, and the engine\nROTATES the refresh token in place after a successful refresh\n(sheetgo-microservices getvalues/service_api.py:71-77) — so the stored\nvalue can change without any API call."},"SourceBigQuery":{"properties":{"type":{"type":"string","const":"bigquery","title":"Type","description":"Marks this source as **BigQuery**. Only one BigQuery source per automation, and it cannot be mixed with other source kinds."},"project":{"type":"string","title":"Project","description":"GCP project id. List them with `GET /rest/beta/bigquery/projects`."},"dataset":{"type":"string","title":"Dataset","description":"BigQuery dataset id"},"table":{"type":"string","title":"Table","description":"BigQuery table id"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Standard-SQL query to run instead of reading the whole table. Validate it first with `POST /rest/beta/bigquery/projects/{project}/validate-query`. Omit it and Sheetgo reads every row of the table -- there is no implicit row limit, so add your own `LIMIT` here if you want one."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for this source. Also used as the destination tab name. Defaults to the table name."}},"type":"object","required":["type","project","dataset","table"],"title":"SourceBigQuery","description":"Read a BigQuery table, or the results of a query over it.\n\n`project` + `dataset` + `table` are always required -- they form the\ninterface id the engine reads the project back out of, and they match the\nweb app, where selecting a table is mandatory and the SQL is seeded from it.\n\nCannot be combined with any other source, and at most one per automation --\nsee validate_bigquery_automation."},"SourceFile":{"properties":{"type":{"type":"string","const":"file","title":"Type","description":"Marks this source as a single **file** — one spreadsheet, CSV, TSV or Excel workbook."},"provider":{"$ref":"#/components/schemas/Provider","description":"The storage provider that hosts the file or folder"},"id":{"type":"string","title":"Id","description":"Id of the source file or folder"},"file_type":{"$ref":"#/components/schemas/FileType","description":"The file type"},"sheet_tabs":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/SourceAllTabs"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sheet Tabs","description":"One or more sheet tab names or all_tabs"},"data_ranges":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Ranges","description":"The data range"},"offset_header":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset Header","description":"The header position","default":1},"date_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Format","description":"Format for date fields","default":"#month/day/YEAR"}},"type":"object","required":["type","provider","id","file_type"],"title":"SourceFile"},"SourceFolder-Input":{"properties":{"type":{"type":"string","const":"folder","title":"Type","description":"Marks this source as a **folder**: every matching file inside it is read."},"provider":{"$ref":"#/components/schemas/Provider","description":"The storage provider that hosts the file or folder"},"id":{"type":"string","title":"Id","description":"Id of the source file or folder"},"file_type":{"type":"string","const":"folder","title":"File Type","description":"Always `folder`. Fixed by the source type; present so folder and file sources share one shape."},"sheet_tabs":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/SourceAllTabs"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sheet Tabs","description":"One or more sheet tab names or all_tabs"},"data_ranges":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Ranges","description":"The data range"},"offset_header":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset Header","description":"The header position","default":1},"date_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Format","description":"Format for date fields","default":"#month/day/YEAR"},"content_type":{"$ref":"#/components/schemas/ContentType","description":"`spreadsheets` reads Sheets / Excel / CSV / TSV files. `documents` reads Google Docs, PDF, Word (.docx) and text files through the AI step (`ai.prompt` required).","default":"spreadsheets"},"include_subfolders":{"type":"boolean","title":"Include Subfolders","description":"Also read files inside subfolders.","default":false},"import":{"$ref":"#/components/schemas/ImportMode","description":"Which files to import, by modified time: every file newest or oldest first, or only the newest / oldest one. Applied after `file_filter` and `process_once`.","default":"all_newest_first"},"process_once":{"type":"boolean","title":"Process Once","description":"Documents only: skip files already read by an earlier run (new or changed files are read again). Ignored for spreadsheets.","default":true},"file_filter":{"anyOf":[{"$ref":"#/components/schemas/FileFilter-Input"},{"type":"null"}],"description":"Only read the files that match these conditions."}},"type":"object","required":["type","provider","id","file_type"],"title":"SourceFolder"},"SourceFolder-Output":{"properties":{"type":{"type":"string","const":"folder","title":"Type","description":"Marks this source as a **folder**: every matching file inside it is read."},"provider":{"$ref":"#/components/schemas/Provider","description":"The storage provider that hosts the file or folder"},"id":{"type":"string","title":"Id","description":"Id of the source file or folder"},"file_type":{"type":"string","const":"folder","title":"File Type","description":"Always `folder`. Fixed by the source type; present so folder and file sources share one shape."},"sheet_tabs":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/SourceAllTabs"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sheet Tabs","description":"One or more sheet tab names or all_tabs"},"data_ranges":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Ranges","description":"The data range"},"offset_header":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset Header","description":"The header position","default":1},"date_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Format","description":"Format for date fields","default":"#month/day/YEAR"},"content_type":{"$ref":"#/components/schemas/ContentType","description":"`spreadsheets` reads Sheets / Excel / CSV / TSV files. `documents` reads Google Docs, PDF, Word (.docx) and text files through the AI step (`ai.prompt` required).","default":"spreadsheets"},"include_subfolders":{"type":"boolean","title":"Include Subfolders","description":"Also read files inside subfolders.","default":false},"import":{"$ref":"#/components/schemas/ImportMode","description":"Which files to import, by modified time: every file newest or oldest first, or only the newest / oldest one. Applied after `file_filter` and `process_once`.","default":"all_newest_first"},"process_once":{"type":"boolean","title":"Process Once","description":"Documents only: skip files already read by an earlier run (new or changed files are read again). Ignored for spreadsheets.","default":true},"file_filter":{"anyOf":[{"$ref":"#/components/schemas/FileFilter-Output"},{"type":"null"}],"description":"Only read the files that match these conditions."}},"type":"object","required":["type","provider","id","file_type"],"title":"SourceFolder"},"SourceIntegration":{"properties":{"type":{"type":"string","const":"integration","title":"Type","description":"Marks this source as a pre-configured **integration** (Shopify, QuickBooks). URL, auth and pagination are managed by Sheetgo."},"provider":{"$ref":"#/components/schemas/IntegrationProvider","description":"The integration to read from. List them with `GET /rest/beta/integrations`."},"account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account","description":"Which authorized account to use — the shop domain for Shopify, the realm (company) id for QuickBooks. Optional: omit it and Sheetgo uses your only connection for that provider. With several connected, omitting it is a 422."},"data_source":{"type":"string","title":"Data Source","description":"Which data to pull, e.g. `get_products`. Get the list from `GET /rest/beta/integrations/{provider}/options`."},"parameters":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Parameters","description":"Values for the parameters that data source declares. Only QuickBooks reports declare any; sending parameters to anything else is a 422."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for this source. Also used as the destination tab name when several sources are transferred without a merge. Defaults to the provider's display name."}},"type":"object","required":["type","provider","data_source"],"title":"SourceIntegration","description":"A pre-configured third-party source (Shopify, QuickBooks).\n\nEverything an `api` source makes you supply -- URL, headers, token,\npagination, response parsing -- is built server-side per provider from the\nauthorized account's credentials, so only the choice of data source (and,\nfor QuickBooks reports, its parameters) is yours.\n\nUnlike SourceAPI, this round-trips completely on a read: it holds no\ncaller-supplied secret, so nothing has to be write-only.\n\nCounts as an api-like source for the no-mixing rule -- see\nvalidate_api_automation."},"SourceOutlook-Input":{"properties":{"type":{"type":"string","const":"outlook","title":"Type","description":"Marks this source as **Outlook**: emails from a mailbox folder, saved as files into a folder destination."},"account":{"$ref":"#/components/schemas/OutlookAccount","description":"`personal` (a personal Microsoft account) or `work` (work or school). It must be connected in Sheetgo with permission to read mail (412 `outlook_not_connected` otherwise).","default":"personal"},"mailbox":{"$ref":"#/components/schemas/OutlookMailbox","description":"`inbox`, `archive` or `sent_items`.","default":"inbox"},"extract":{"$ref":"#/components/schemas/OutlookExtract","description":"`attachments` saves each email's file attachments; `body` saves each email's body as `<subject>.html`.","default":"attachments"},"process_once":{"type":"boolean","title":"Process Once","description":"Skip emails already saved by an earlier run.","default":true},"email_filter":{"anyOf":[{"$ref":"#/components/schemas/EmailFilter-Input"},{"type":"null"}],"description":"Only read the emails that match these conditions. Omit to read every email (each run scans at most 1000)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for the source. Defaults to `Outlook`."}},"type":"object","required":["type"],"title":"SourceOutlook","description":"Read emails from an Outlook mailbox folder and save their file\nattachments (or bodies as HTML) into one existing folder destination.\n\nMust be the only source, with no processors and exactly one `folder`\ndestination — see validate_outlook_automation."},"SourceOutlook-Output":{"properties":{"type":{"type":"string","const":"outlook","title":"Type","description":"Marks this source as **Outlook**: emails from a mailbox folder, saved as files into a folder destination."},"account":{"$ref":"#/components/schemas/OutlookAccount","description":"`personal` (a personal Microsoft account) or `work` (work or school). It must be connected in Sheetgo with permission to read mail (412 `outlook_not_connected` otherwise).","default":"personal"},"mailbox":{"$ref":"#/components/schemas/OutlookMailbox","description":"`inbox`, `archive` or `sent_items`.","default":"inbox"},"extract":{"$ref":"#/components/schemas/OutlookExtract","description":"`attachments` saves each email's file attachments; `body` saves each email's body as `<subject>.html`.","default":"attachments"},"process_once":{"type":"boolean","title":"Process Once","description":"Skip emails already saved by an earlier run.","default":true},"email_filter":{"anyOf":[{"$ref":"#/components/schemas/EmailFilter-Output"},{"type":"null"}],"description":"Only read the emails that match these conditions. Omit to read every email (each run scans at most 1000)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for the source. Defaults to `Outlook`."}},"type":"object","required":["type"],"title":"SourceOutlook","description":"Read emails from an Outlook mailbox folder and save their file\nattachments (or bodies as HTML) into one existing folder destination.\n\nMust be the only source, with no processors and exactly one `folder`\ndestination — see validate_outlook_automation."},"SourceWebhook":{"properties":{"type":{"type":"string","const":"webhook","title":"Type","description":"Marks this source as a **webhook**: your system pushes data in, rather than Sheetgo pulling it."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional label for the webhook source"}},"type":"object","required":["type"],"title":"SourceWebhook"},"Split":{"properties":{"column":{"type":"string","title":"Column","description":"Spreadsheet column letter (`A`, `B`, … `AA`), uppercase, as in the web app — not the header name. Find letters with `GET /files/{provider}/{file_id}/structure?include=columns`.","examples":["C"]}},"type":"object","title":"Split"},"SpreadsheetStructure":{"properties":{"tabs":{"anyOf":[{"items":{"$ref":"#/components/schemas/TabItem"},"type":"array"},{"type":"null"}],"title":"Tabs","description":"The spreadsheet's tabs, in workbook order. Each carries the `tab_id` a dashboard element needs."},"named_ranges":{"anyOf":[{"items":{"$ref":"#/components/schemas/NamedRangeItem"},"type":"array"},{"type":"null"}],"title":"Named Ranges","description":"Named ranges defined in the spreadsheet."},"charts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChartItem"},"type":"array"},{"type":"null"}],"title":"Charts","description":"Charts already drawn in the spreadsheet. Each carries the `chart_id` a chart-reference dashboard element needs."},"columns_truncated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Columns Truncated","description":"Present when `include=columns` was requested. True when at least one tab's `columns` is null because only the first tabs are read by default (pass `all_tabs=true` or `tab=`) or the read ran out of time."}},"type":"object","title":"SpreadsheetStructure","description":"Spreadsheet body of a structure response.\n\nA section is null when it was not requested via `include`, and an empty list\nwhen it was requested and the spreadsheet has none."},"SuccessResponse":{"properties":{"code":{"type":"integer","title":"Code","description":"Result code. 1 means the operation succeeded.","default":1},"type":{"type":"string","title":"Type","description":"Kind of result — `success` for this envelope.","default":"success"},"message":{"type":"string","title":"Message","description":"Human-readable confirmation of what happened.","default":"OK"}},"type":"object","title":"SuccessResponse","description":"The legacy success envelope, returned by the pre-existing CRUD routes.\n\nIt always carries HTTP 200; the outcome is in `code`/`type`, not the status\nline. Newer endpoints return the resource directly instead."},"TabItem":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"Numeric Google sheetId (Google Sheets only; null for Excel/CSV, whose tabs are identified by `name`). Pass as `tab_id` when creating a dashboard element."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Tab title"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index","description":"Zero-based position"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows","description":"Grid row count"},"cols":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cols","description":"Grid column count"},"hidden":{"type":"boolean","title":"Hidden","description":"True when the tab is hidden in the UI","default":false},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Provider sheet type, e.g. GRID"},"columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ColumnItem"},"type":"array"},{"type":"null"}],"title":"Columns","description":"Letter → header map of this tab, when `include=columns` read it. Null when not requested, or not read (see `columns_truncated`)."}},"type":"object","title":"TabItem","description":"One tab (sheet) of a spreadsheet."},"TriggerOut":{"properties":{"active":{"type":"boolean","title":"Active","description":"Whether a trigger is currently set and enabled. When false, every other field is null and the workflow runs only on demand.","default":false},"type":{"anyOf":[{"type":"string","enum":["time","workflow_finished","form_submission"]},{"type":"null"}],"title":"Type","description":"Which kind of trigger is set, and therefore which fields below are populated. Null when `active` is false."},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency","description":"time triggers only: `minutes`, `hourly`, `daily`, `weekly` or `monthly`. Null when the trigger was set with a raw `cron`."},"every":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Every","description":"time triggers only: the interval within `frequency` — minutes: 15 or 30; hourly: 1, 2, 4, 6, 8 or 12."},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"time triggers only: `HH:MM` in `timezone`, for daily, weekly and monthly frequencies. The minute is always `:00`."},"weekday":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Weekday","description":"time triggers, weekly only: a day name (`sunday`..`saturday`), or a list of them when the schedule repeats on several days."},"day_of_month":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Day Of Month","description":"time triggers, monthly only: the day of the month (1..31), or the string `last` for the final day of each month."},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron","description":"time triggers only: the effective five-field cron expression the schedule resolved to. Always present for a time trigger, whether it was created from `cron` or from the friendly fields."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"time triggers only: the IANA timezone the schedule is evaluated in (for example `Europe/Madrid`)."},"after_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Workflow Id","description":"workflow_finished triggers only: the id of the parent workflow whose completion starts this one."},"form_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Id","description":"form_submission triggers only: the id of the form whose new responses start this workflow."}},"type":"object","title":"TriggerOut","description":"Read model echoed by GET and returned by PUT.\n\nOnly the fields belonging to the active trigger `type` are populated; all\nothers are `null`. When `active` is false, `type` is `null` too and every\nother field is empty — that is the shape of a workflow with no trigger."},"UnusedFields":{"type":"string","enum":["ignore","error"],"title":"UnusedFields","description":"What happens to a `{{Tag}}` in the template that no source column matches."},"ValidateQueryRequest":{"properties":{"query":{"type":"string","title":"Query","description":"The SQL to check. Standard SQL; legacy SQL is not used."}},"type":"object","required":["query"],"title":"ValidateQueryRequest"},"ValidateQueryResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"False when BigQuery rejected the SQL"},"statement_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement Type","description":"`SELECT`, `INSERT`, `DELETE`, … as BigQuery classifies it. Note a valid `DELETE` reports `valid: true` — this endpoint reports what the statement *is*, it does not refuse writes."},"total_bytes_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Bytes Processed","description":"Bytes the query would scan. Use it to size the cost of an uncapped source query before creating the automation."},"schema":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Schema","description":"Columns the query would return, with their types"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"BigQuery's explanation when `valid` is false"}},"type":"object","required":["valid"],"title":"ValidateQueryResponse","description":"The dry run's verdict. Nothing was scanned and nothing was mutated.\n\nA query that will not parse is a legitimate answer here, not an error: this\nendpoint returns `200` with `valid: false`."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookBody":{"properties":{"values":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","minItems":1,"title":"Values","description":"Tabular values to push (rows of strings)"},"run_workflow":{"type":"boolean","title":"Run Workflow","description":"If True, after this automation finishes, the parent workflow's *other* automations are re-run synchronously.","default":false},"async_dispatch":{"type":"boolean","title":"Async Dispatch","description":"Default False — the automation is dispatched synchronously and the 202 is returned once dispatch has started. Pass True to dispatch asynchronously and return 202 as soon as the request is accepted; useful for high-throughput producers.","default":false}},"type":"object","required":["values"],"title":"WebhookBody"},"WebhookOut":{"properties":{"automation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Automation Id","description":"Id of the automation this webhook feeds. Null only for a webhook that is not yet bound to one."},"public_id":{"type":"string","title":"Public Id","description":"The webhook's public identifier — the `{public_id}` path segment in `url`. Treat it as a secret: anyone holding it can push data to the automation."},"url":{"type":"string","title":"Url","description":"Full URL to POST your JSON payload to. This is the value to configure in the external system that will push data."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the webhook was minted, ISO 8601."},"active":{"type":"boolean","title":"Active","description":"False once the webhook has been deleted. A deleted webhook stops accepting pushes; webhooks are removed with their automation, never on their own.","default":true}},"type":"object","required":["public_id","url"],"title":"WebhookOut","description":"A webhook endpoint bound to one automation's webhook source."},"WorkflowArchive":{"properties":{"delete_automations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Delete Automations","description":"All automations for the workflow should also be archived","default":false}},"type":"object","title":"WorkflowArchive","description":"Workflow archive"},"WorkflowAutomationModel":{"properties":{"id":{"type":"string","title":"Id","description":"Id of the automation"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the automation"},"owner":{"type":"string","title":"Owner","description":"Owner of the automation"},"status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status","description":"Execution status of the automation","default":1},"last_updating_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updating User","description":"Last updated user of the automation"},"input_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Count","description":"Number of inputs of the automation","default":0},"output_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Count","description":"Number of outputs of the automation","default":0},"sources":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceFile"},{"$ref":"#/components/schemas/SourceFolder-Output"},{"$ref":"#/components/schemas/SourceWebhook"},{"$ref":"#/components/schemas/SourceAPI"},{"$ref":"#/components/schemas/SourceIntegration"},{"$ref":"#/components/schemas/SourceBigQuery"},{"$ref":"#/components/schemas/SourceOutlook-Output"}]},"type":"array","title":"Sources","description":"Source files/folders of the automation"},"destinations":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Output"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Output","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},"type":"array"},{"oneOf":[{"$ref":"#/components/schemas/DestinationFile"},{"$ref":"#/components/schemas/DestinationFolder"},{"$ref":"#/components/schemas/DestinationDocument"},{"$ref":"#/components/schemas/DestinationPDF"},{"$ref":"#/components/schemas/DestinationShare"},{"$ref":"#/components/schemas/DestinationMailMerge"},{"$ref":"#/components/schemas/DestinationWebhook"},{"$ref":"#/components/schemas/DestinationApiPublish"},{"$ref":"#/components/schemas/DestinationBigQuery-Output"}],"discriminator":{"propertyName":"type","mapping":{"api":"#/components/schemas/DestinationApiPublish","bigquery":"#/components/schemas/DestinationBigQuery-Output","document":"#/components/schemas/DestinationDocument","file":"#/components/schemas/DestinationFile","folder":"#/components/schemas/DestinationFolder","mail_merge":"#/components/schemas/DestinationMailMerge","pdf":"#/components/schemas/DestinationPDF","share":"#/components/schemas/DestinationShare","webhook":"#/components/schemas/DestinationWebhook"}}},{"type":"null"}],"title":"Destinations","description":"Destinations of the automation"}},"type":"object","required":["id","owner"],"title":"WorkflowAutomationModel"},"WorkflowCreate":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the new workflow","default":"Untitled workflow"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Workflow description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Workflow category"}},"type":"object","title":"WorkflowCreate","description":"New workflow creation"},"WorkflowModel":{"properties":{"id":{"type":"string","title":"Id","description":"Workflow identification"},"name":{"type":"string","title":"Name","description":"Name of the workflow"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the workflow"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Category of the workflow"},"owner":{"type":"string","title":"Owner","description":"Owner of the workflow"},"users":{"items":{"type":"string"},"type":"array","title":"Users","description":"List of users in this workflow"},"shared":{"type":"boolean","title":"Shared","description":"True if workflow is shared","default":false},"automations":{"additionalProperties":{"$ref":"#/components/schemas/WorkflowAutomationModel"},"type":"object","title":"Automations","description":"Automations present in this workflow"},"forms":{"items":{"type":"string"},"type":"array","title":"Forms","description":"Forms present in this workflow"},"scheduled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Scheduled","description":"True if workflow is scheduled","default":false},"running":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Running","description":"True if workflow is running","default":false}},"type":"object","required":["id","name","description","owner","users","automations","forms"],"title":"WorkflowModel","description":"Data presentation model for Workflow"},"WorkflowPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the workflow"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Workflow description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Workflow category"}},"type":"object","title":"WorkflowPatch","description":"Workflow patch"},"WorkflowRunStatus":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Id of the workflow this status belongs to."},"execution":{"type":"string","title":"Execution","description":"Live phase: `running` if the workflow or any of its automations is still executing, otherwise `completed`."},"result":{"type":"string","title":"Result","description":"Outcome of the last finished run: `never_run`, `success` or `error`. `error` if ANY automation failed."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Human-readable explanation of the outcome, from the workflow run when there is one, otherwise from the failing automation. Null on success and before the first run."},"docs_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Link","description":"URL of the help article for this error, when one exists."},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At","description":"When the last WORKFLOW run started. Null when the workflow has only ever been run one automation at a time — running a single automation records no workflow start time, and none is invented here."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"How long the last run took, in seconds. When derived from automations, this is the longest automation duration."},"last_failed_automation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failed Automation Id","description":"Id of the automation that failed, so you can go straight to it without scanning `automations`. Null when nothing failed."},"automations":{"items":{"$ref":"#/components/schemas/AutomationRunStatus"},"type":"array","title":"Automations","description":"Per-automation breakdown of the same run, one entry per automation in the workflow."}},"type":"object","required":["workflow_id","execution","result"],"title":"WorkflowRunStatus","description":"The outcome of a workflow's LAST run, plus one entry per automation.\n\nWhen the workflow itself has never been run as a whole but its automations\nhave, the top-level `result`, `message` and `duration_seconds` are derived\nfrom `automations` — worst result wins, so a single failed automation makes\nthe workflow `error`."},"FormSubmissionTriggerIn":{"description":"Run this workflow whenever a bound Sheetgo form receives a new response.","properties":{"type":{"const":"form_submission","description":"Selects a **form_submission** trigger: the workflow runs each time the form named by `form_id` receives a response.","title":"Type","type":"string"},"form_id":{"description":"Id of a form attached to this workflow.","title":"Form Id","type":"string"}},"required":["type","form_id"],"title":"FormSubmissionTriggerIn","type":"object"},"TimeTriggerIn":{"description":"Time/smart schedule. Either friendly fields OR a raw cron, not both.","properties":{"type":{"const":"time","description":"Selects a **time** trigger: the workflow runs on a schedule. Set either the friendly fields below or `cron`, not both.","title":"Type","type":"string"},"frequency":{"anyOf":[{"enum":["minutes","hourly","daily","weekly","monthly"],"type":"string"},{"type":"null"}],"description":"Schedule frequency","title":"Frequency"},"every":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"minutes: 15|30 ; hourly: 1|2|4|6|8|12","title":"Every"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HH:MM for daily/weekly/monthly. Minute is coerced to :00.","title":"Time"},"weekday":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"weekly only: a day name (sunday..saturday) or a list of names","title":"Weekday"},"day_of_month":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"description":"monthly only: 1..31 or 'last'","title":"Day Of Month"},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Power-user escape hatch. Mutually exclusive with friendly fields.","title":"Cron"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"IANA timezone; defaults to the workflow's current timezone.","title":"Timezone"}},"required":["type"],"title":"TimeTriggerIn","type":"object"},"WorkflowFinishedTriggerIn":{"description":"Run this workflow when another workflow finishes.","properties":{"type":{"const":"workflow_finished","description":"Selects a **workflow_finished** trigger: the workflow runs when the workflow named by `after_workflow_id` completes.","title":"Type","type":"string"},"after_workflow_id":{"description":"Parent workflow whose completion triggers this one (named 'after_' to distinguish it from the path {id}).","title":"After Workflow Id","type":"string"}},"required":["type","after_workflow_id"],"title":"WorkflowFinishedTriggerIn","type":"object"},"AuthConfigIn":{"additionalProperties":false,"description":"Access restriction. Only domain restriction is exposed.\n\n`specificUsers` is deliberately absent: the internal PUT emails every\naddress in it via SendGrid (dashboard/models.py:190), which would let an\nAPI key mail arbitrary recipients.","properties":{"domain":{"description":"Restrict to the workflow owner's email domain","title":"Domain","type":"boolean"}},"required":["domain"],"title":"AuthConfigIn","type":"object"}},"securitySchemes":{"default":{"type":"oauth2","flows":{"authorizationCode":{"refreshUrl":"/rest/auth/refresh","scopes":{},"authorizationUrl":"/rest/auth/authorize","tokenUrl":"/rest/auth/token"}}},"Developer Access":{"type":"apiKey","description":"Access token for development purposes","in":"header","name":"authorization"},"sheetgo-api-key":{"type":"http","description":"Sheetgo API key (prefix: `sg_`). Generate at User Account page https://app.sheetgo.com/account > Services and account > Sheetgo APIPass as `Authorization: Bearer sg_…`.","scheme":"bearer"}}},"x-tagGroups":[{"name":"Workflows & Automations","tags":["workflows","automations","triggers","dashboards","Smart Tags","Cell References"]},{"name":"Forms & Integrations","tags":["forms","webhook","api-destination","integrations","outlook","gmail"]},{"name":"Storage","tags":["files","bigquery"]},{"name":"Usage & Limits","tags":["Rate Limiting"]},{"name":"Authentication","tags":["API Key Scopes","auth"]},{"name":"Developer","tags":["developer","internal"]}]}