livemode field in
the request body does not switch that mode.
Create a draft and inspect it
Use a test credential for this example.API_BASE_URL is the documented base URL
including /v2; GIGSTACK_API_KEY is set locally.
data.status: "draft". The initial graph can be
empty. Read GET /journeys/catalog before constructing a graph: it supplies node
keys, configuration fields, allowed source collections, graph rules and limits.
Use those keys in graph.nodes[].type and connect nodes through graph.edges.
Do not invent action names or assume that a graph accepted as a draft can publish.
PUT /journeys/{id} updates only supplied draft fields. It does not replace a
published snapshot. For people using Firebase or a personal MCP credential,
mutations require the team’s administrator authority. Team API and OAuth
credentials use their authorized team scope; their creator is not impersonated.
Test, publish and pause
POST /journeys/{id}/test accepts source_collection and exactly one of
source_id or source_snapshot. For example, a payments trigger can use an
approved synthetic payment ID:
data.run_id, meaning the dry-run was queued. Read
GET /journeys/{id}/runs and find that ID to inspect status, steps, and
binnacle. The response contains only the latest 50 runs. has_more: true
indicates a capped history; this endpoint does not accept a cursor.
Once the graph and intended effects have been reviewed, POST /journeys/{id}/publish
validates and publishes a version. Publishing enables automation for matching
events in that data mode. Test-mode automations can still execute configured
actions; test data is not a blanket promise of no notifications or provider calls.
POST /journeys/{id}/pause pauses future processing. Read the Journey back to
confirm the persisted state. DELETE /journeys/{id} accepts only draft or
archived Journeys.
POST /journeys/{id}/clone creates another draft. Optional targetLivemode
selects the copy’s mode; the source must remain accessible in the credential’s
mode. Inspect the returned warnings strings and review destination references
before publishing. Cloning does not publish the copy.
Edit a group without overwriting another change
UsePOST /journey-groups to create a group and one to ten draft Journeys in one
operation. Each entry needs its name and complete graph. GET /journey-groups/{id}
returns the group fields and its journeys array.
Before PUT /journey-groups/{id}, read the group and copy last_updated into
the request’s expectedLastUpdated. Send the entire final journeys array:
include id to update an existing member; omit id to create one. Existing
Journeys missing from this array are archived. An empty array archives every
member, so confirm that this is the intended change.
The update requires the freshness token unless the group is empty. HTTP 409
group_changed means the group or a child changed. Read it again and review the
new diff before proposing an update. Do not retry the old body automatically.
POST /journey-groups/{id}/revert uses the same freshness token and restores the
previous revision. The response gives revisionId, revertedTo, and per-Journey
results. Group publish and pause also return per-Journey results:
HTTP 200 can contain failures. Inspect every entry’s status, reason, and
errors, then read affected Journeys to establish their actual state.
Connect and verify Google Sheets imports
- Read
GET /sheetsand share the spreadsheet with itsservice_account_emailas an Editor. - Connect with
POST /sheets/connectusing a Firebase or personal MCP credential belonging to a person with direct owner or editor access in Google Drive. Domain, group and link-based access do not establish that person’s authority. Sendurl, optionallysheet_name,header_row(1–50) andcopy_from_other. - Read
GET /sheets/fields?target=paymentortarget=invoice. Use the returned dotted field paths for the mapping.open_objectsidentifies extensible objects;required_containersidentifies required objects without required leaf fields. Fields markedcolumnOnlymust come from a spreadsheet column. - Save the mapping with
PUT /sheets/mapping. It containstarget,fields, and optionallypoll_interval_minutes(2 or 5). Each field binding hascolumn,value, or both; a constant value is the fallback for an empty cell. - Call
POST /sheets/preview. Checkmapping_errorand every row’serrors. Preview validates mapped request bodies; it does not establish that later client lookups, provider calls or fiscal issuance will succeed. - With the effects approved, call
POST /sheets/enable. The importer polls the sheet and can create payments or invoices. Saving a changed mapping pauses import, so preview and enable it again deliberately. - Read
GET /sheetsfor sync status andGET /sheets/rowsfor row outcomes. The latter returns at most 50 recent rows; no cursor is available.
GET /sheets/headers refreshes cached headers and reads sheet contents; despite
being a GET, it is not a pure read. POST /sheets/sync returns HTTP 202 with
queued: true; it requests the next poll and does not prove import completion.
Use POST /sheets/pause to stop polling. DELETE /sheets disconnects the sheet
while retaining its row ledger to avoid recreating previously imported rows.
A team can have a connection per data mode, using different spreadsheet tabs.
copy_from_other copies an existing mapping and interval; it does not bypass
ownership checks. Existing account restrictions still apply.