GoliathDevelopersGet an API key
Reference/Workflowsgenerated from the gateway manifest

pauseWorkflow

Pause the ACTIVE version of a workflow.

POST/api/v1/callWRITEidempotent · 24 hruns as the key's owner
View as Markdown

Pause the ACTIVE version of a workflow: no new runs will start. pauseInFlightRuns=true also pauses runs already in flight; false lets them finish. No-op if nothing is active. TO CHANGE WHAT A WORKFLOW DOES (add a condition, change a trigger, narrow who it acts on), edit its graph: createOrReturnWorkflowDraft → updateWorkflowGraph → promoteWorkflowDraft, then resumeWorkflow if it was paused. Pausing only stops it. E.g. a PROPERTY workflow can require a motivation signal before it creates or texts anyone: a conditional step on the hasSignal or propertySignalTypes property filter fields (listFilterFieldNames lists them) ahead of the create_contact_action step. Never tell a user restricting outreach this way needs human review: it is a graph edit.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "pauseWorkflow",
    "variables": {
      "workflowGroupId": "<workflowGroupId>",
      "pauseInFlightRuns": true
    }
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.workflows.pauseWorkflow(
  {
    workflowGroupId: '<workflowGroupId>',
    pauseInFlightRuns: true
  },
  { idempotencyKey: crypto.randomUUID() },
)
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    operationId: 'pauseWorkflow',
    variables: {
      workflowGroupId: '<workflowGroupId>',
      pauseInFlightRuns: true
    }
  }),
})
const { data, errors } = await res.json()

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

workflowGroupIdID!required
pauseInFlightRunsBoolean!required

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "workflowAutomationsMutation": {
      "pauseWorkflow": {
        "id": "<ID>",
        "name": "…",
        "status": "DRAFT"
      }
    }
  }
}

Errors

Idempotency

Send an Idempotency-Key of 1 to 255 characters. A finished request retried with the same key replays its stored response, marked Idempotency-Replayed: true; one still in flight returns 409 idempotency_conflict. Keys expire after 24 hours. Write without fear →