Skip to main content

Queries

  • automation (Beta) — Fetch an automation by id. Read its script, or open a workspace with createWorkspace to change it.
  • automationCatalog (Beta) — Read automation docs by path: one entry per path, in order, null for an unknown path. "" is the index; start with “guide/”. Then createWorkspace to build one.
  • automationRun (Beta) — Fetch a run by id, with its steps. Runs are deleted 30 days after they finish.
  • automations (Beta) — List automations, most recently changed first.
  • testAutomation (Beta) — Run the workspace’s current, uncommitted automation once against a scenario and return what happened. Nothing is stored and nothing real happens: no messages are sent and no records change. Null if the workspace doesn’t exist. INVALID while the document has an ERROR diagnostic or can’t run; INVALID_SCENARIO, with the failing fields, for a scenario that doesn’t match schemas/scenario in automationCatalog.
  • workspace (Beta) — Read a workspace. Null if it doesn’t exist or expired.

Mutations

  • commitWorkspace (Beta) — Save a workspace to its resource. STALE if the resource changed since the workspace started; INVALID while an ERROR diagnostic remains. The workspace stays open. For an automation, publish with publishAutomation next. Null if the workspace is gone.
  • createWorkspace (Beta) — Open a working copy of a resource. Omit resourceId to start a new resource; committing creates it. Null if the resource doesn’t exist. Read the resource type’s guide in automationCatalog first.
  • deleteAutomation (Beta) — Delete an automation that has never been published. A published one keeps its versions and runs: turn it off with updateAutomation instead. False if the automation doesn’t exist.
  • deleteWorkspace (Beta) — Discard a workspace. The resource is unchanged. False if the workspace doesn’t exist.
  • publishAutomation (Beta) — Publish the automation’s draft as its next version. Call without acknowledgedRisks first to see the risks; nothing is published until each one is acknowledged. The first publish turns the automation on. Null if the automation doesn’t exist.
  • updateAutomation (Beta) — Change an automation’s settings. Its name and content are edited in a workspace. Null if the automation doesn’t exist.
  • updateWorkspace (Beta) — Apply text edits to a workspace, in order. Edits fail only mechanically (stale revision, text not found or ambiguous, more than 100 edits or 1 MB); text that doesn’t parse is reported in diagnostics. Changes only the working copy. Null if the workspace is gone.

Objects

  • Automation (Beta) — An automation built in Developer › Automations: a trigger and the steps it runs. For email and SMS flows, use MarketingAutomation. To create or edit one, use a workspace (createWorkspace); read guide/ in automationCatalog first.
  • AutomationCatalogEntry (Beta) — A page of the automation catalog.
  • AutomationCatalogListing (Beta) — A catalog page, as listed under its parent.
  • AutomationPublishImpact (Beta) — What publishing does to runs in progress. Runs on the LATEST strategy move to the new version; PINNED runs stay.
  • AutomationRisk (Beta) — Something publishing would do that you must accept first: pass its code in acknowledgedRisks.
  • AutomationRun (Beta) — One execution of an automation. Runs are deleted 30 days after they finish.
  • AutomationRunFailure (Beta) — Why a run failed.
  • AutomationStepRecord (Beta) — One step a run executed, in order.
  • AutomationTestRun (Beta) — What one test run of a workspace did. Nothing it did was stored or performed.
  • AutomationVersion (Beta) — A published version of an automation. Immutable.
  • AutomationVersionRunCount (Beta) — Runs in progress on one version.
  • Diagnostic (Beta) — A problem in a document. Its message names a diagnostics/<code> page in automationCatalog that explains it.
  • DiagnosticFix (Beta) — A suggested fix: edits to apply with updateWorkspace.
  • TextEdit (Beta) — Replace find, which occurs exactly once in the document, with replace. Pass it to updateWorkspace as is.
  • Workspace (Beta) — A working copy of one resource, as text. Edit it with updateWorkspace, check diagnostics, then save it with commitWorkspace. Expires 7 days after its last change.

Input objects

  • TextEditInput (Beta) — Replace find with replace. find must occur exactly once unless all is set. Omit find to replace the whole document.
  • UpdateAutomationInput (Beta) — Settings to change; omitted fields are left as they are.

Enums