openapi: 3.1.0 info: title: Loops OpenAPI Spec Workflow nodes API description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api). version: 1.21.6 servers: - url: https://app.loops.so/api/v1 tags: - name: Workflow nodes description: View and mutate workflow nodes paths: /workflows/{workflowId}/nodes: parameters: - name: workflowId in: path required: true description: The ID of the workflow. schema: type: string post: tags: - Workflow nodes summary: Create a workflow node operationId: createWorkflowNode description: 'Create a new default workflow node and return it with the latest workflow. Choose where the node goes with `insertMode`: `between` places it between an existing `fromNodeId` -> `toNodeId` connection, `before` places it before `toNodeId`, and `after` places it after `fromNodeId` when that node has exactly one outgoing connection. `after` is a convenience for simple linear paths, so callers do not need to fetch and pass the current child node ID. It is invalid when `fromNodeId` has no outgoing nodes, multiple outgoing nodes, or is an exit node. When the source has multiple outgoing nodes, use `between` with the exact `toNodeId` instead. For `before`, deprecated `beforeNodeId` requests are still accepted for compatibility, but new callers should use `toNodeId`. New nodes start with default settings; update the node after creation to configure it. Branch nodes create their default paths too: `BranchNode` creates two `AudienceFilter` children, and `ExperimentBranchNode` creates two regular `VariantNode` children plus one control `VariantNode`. Public workflows can have up to 300 nodes. Generated children count toward that limit, so a normal create adds 1 node, `BranchNode` adds 3, and `ExperimentBranchNode` adds 4. To add a sibling child path to a branch or experiment branch, use the `POST /v1/workflows/{workflowId}/nodes/{nodeId}/add-branch` endpoint. Branch paths can be edited with create-node, but a workflow cannot be started unless each direct `BranchNode` child is an `AudienceFilter`. For experiments, use create-node only to insert a missing `VariantNode` before non-variant content; use add-branch for another variant path.' x-mint: href: /api-reference/create-workflow-node content: 'Choose where the node goes with `insertMode`: - `between` places it between an existing `fromNodeId` -> `toNodeId` connection - `before` places it before `toNodeId` - `after` places it after `fromNodeId` when that node has exactly one outgoing connection. Use `after` for simple linear paths when you do not want to fetch and pass the current child node ID. `after` is invalid when `fromNodeId` has no outgoing nodes, multiple outgoing nodes, or is an exit node. When the source has multiple outgoing nodes, use `between` with the exact `toNodeId` instead. For `before`, deprecated `beforeNodeId` requests are still accepted for compatibility, but new callers should use `toNodeId`. New nodes start with default settings; update the node after creation to configure it. Branch nodes create their default paths too: `BranchNode` creates two `AudienceFilter` children, and `ExperimentBranchNode` creates two regular `VariantNode` children plus one control `VariantNode`. Public workflows can have up to 300 nodes. Generated children count toward that limit, so a normal create adds 1 node, `BranchNode` adds 3, and `ExperimentBranchNode` adds 4. To add a sibling child path to a branch or experiment branch, use the `POST /v1/workflows/{workflowId}/nodes/{nodeId}/add-branch` endpoint. Branch paths can be edited with create-node, but a workflow cannot be started unless each direct `BranchNode` child is an `AudienceFilter`. For experiments, use create-node only to insert a missing `VariantNode` before non-variant content; use add-branch for another variant path.' metadata: sidebarTitle: Create a node description: Create a new default workflow node and return it with the latest workflow requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateWorkflowNodeRequest' responses: '200': description: Workflow node created. content: application/json: schema: $ref: '#/components/schemas/CreateWorkflowNodeResponse' '400': description: Invalid request. Details will be shown in `message`. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] /workflows/{workflowId}/nodes/{nodeId}/add-branch: parameters: - name: workflowId in: path required: true description: The ID of the workflow. schema: type: string - name: nodeId in: path required: true description: The ID of the BranchNode or ExperimentBranchNode that should receive one new child. schema: type: string post: tags: - Workflow nodes summary: Add a branch operationId: addWorkflowBranch description: 'Add a branch and a child node under an existing Branch or Experiment node. Returns the created child node plus the latest workflow. - Adding a branch to a `BranchNode` creates one `AudienceFilter` child node. - Adding a branch to an `ExperimentBranchNode` creates one `VariantNode` child node. This endpoint does not accept node configuration fields; update the child node with `POST /v1/workflows/{workflowId}/nodes/{nodeId}` after creation. Public workflows are limited to 300 nodes, and this endpoint adds 1 node.' x-mint: href: /api-reference/add-workflow-branch content: 'Adding a branch to a `BranchNode` creates one `AudienceFilter` child node. Adding a branch to an `ExperimentBranchNode` creates one `VariantNode` child node. This endpoint does not accept node configuration fields; [update the child node](/api-reference/update-workflow-node) after creation. Public workflows are limited to 300 nodes, and this endpoint adds 1 node.' metadata: sidebarTitle: Add a branch description: Add a branch and a child node under an existing Branch or Experiment node. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddWorkflowBranchRequest' responses: '200': description: Branch added. content: application/json: schema: $ref: '#/components/schemas/AddWorkflowBranchResponse' '400': description: Invalid `workflowId`, `nodeId`, request body, branch target, workflow state, or workflow node cap. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] /workflows/{workflowId}/nodes/{nodeId}: parameters: - name: workflowId in: path required: true description: The ID of the workflow. schema: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 - name: nodeId in: path required: true description: The ID of the workflow node. schema: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 get: tags: - Workflow nodes summary: Get a workflow node operationId: getWorkflowNode description: Retrieve detailed data for a single workflow node. x-mint: href: /api-reference/get-workflow-node metadata: sidebarTitle: Get a node responses: '200': description: Successful. content: application/json: schema: $ref: '#/components/schemas/WorkflowNodeWithRevision' '400': description: Invalid `workflowId` or `nodeId`. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. security: - apiKey: [] post: tags: - Workflow nodes summary: Update a workflow node operationId: updateWorkflowNode description: Update workflow-node-owned fields for a single node. Shared resources such as email messages and audience segments should be updated through their own APIs. x-mint: href: /api-reference/update-workflow-node content: Shared resources such as email messages and audience segments should be updated through their own APIs. metadata: sidebarTitle: Update a node description: Update workflow-node-owned fields for a single node. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateWorkflowNodeRequest' responses: '200': description: Workflow node updated. content: application/json: schema: $ref: '#/components/schemas/UpdateWorkflowNodeResponse' '400': description: Invalid `workflowId`, `nodeId`, request body, or node update. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '501': description: This node update is not implemented. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] delete: tags: - Workflow nodes summary: Delete a workflow node operationId: deleteWorkflowNode description: 'Delete a single workflow node. If contacts are queued at the node, Loops returns with `"status": "queuedContactsFound"` instead of deleting. Retry with `queuedContactPolicy: "discard"` to delete the node and discard those queued contacts. Confirmed deletion responses include the simplified workflow after the node is removed.' x-mint: href: /api-reference/delete-workflow-node content: 'Delete a node from a workflow. Make a dry run request using `dryRun: true`. If contacts are queued at the node, Loops returns with `"status": "queuedContactsFound"` instead of deleting. Retry with `queuedContactPolicy: "discard"` to delete the node and discard those queued contacts. Confirmed deletion responses include the simplified workflow after the node is removed.' metadata: sidebarTitle: Delete a node description: Delete a single workflow node. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeleteWorkflowNodeRequest' responses: '200': description: Delete dry run, queued-contact warning, or deletion result. Confirmed deletion responses include the simplified workflow after the node is removed. content: application/json: schema: $ref: '#/components/schemas/DeleteWorkflowNodeResponse' '400': description: Invalid `workflowId`, `nodeId`, request body, or delete target. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] /workflows/{workflowId}/nodes/{nodeId}/reroute: parameters: - name: workflowId in: path required: true description: The ID of the workflow. schema: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 - name: nodeId in: path required: true description: The ID of the source workflow node whose outgoing connection should be moved. schema: type: string examples: - cln1a3b5c7d9e1f3g5h7i9j1 post: tags: - Workflow nodes summary: Reroute a node connection operationId: rerouteNodeConnection description: Reroute the source node's existing connection to another valid target node. Returns the updated source node and the latest workflow. x-mint: href: /api-reference/reroute-node-connection content: 'Use this endpoint to modify an existing node connection to another target. Send the source node in the URL path and the new target in the request body. The source node must have exactly one outgoing connection. Branch and experiment branch nodes cannot be rerouted with this endpoint because they have multiple branch-specific outputs. The current target must still have another incoming connection after the reroute, and the new target must be valid for the source node. The workflow cannot be edited while in a `SENDING` state.' metadata: sidebarTitle: Reroute a node description: Reroute one existing node connection to another valid target node. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RerouteNodeConnectionRequest' responses: '200': description: Node connection rerouted. content: application/json: schema: $ref: '#/components/schemas/RerouteNodeConnectionResponse' '400': description: Invalid `workflowId`, `nodeId`, request body, node connection selection, reroute target, or workflow state. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] /workflows/{workflowId}/nodes/{nodeId}/recursive: parameters: - name: workflowId in: path required: true description: The ID of the workflow. schema: type: string - name: nodeId in: path required: true description: The root node ID of the subtree to delete. schema: type: string delete: tags: - Workflow nodes summary: Delete workflow nodes recursively operationId: deleteWorkflowNodeRecursively description: 'Delete a node and its downstream subtree. If contacts are queued at any node that would be deleted, Loops returns with `"status": "queuedContactsFound"` instead of deleting. Retry with `queuedContactPolicy: "discard"` to delete the nodes and discard those queued contacts. Confirmed deletion responses include the simplified workflow after the nodes are removed.' x-mint: href: /api-reference/delete-workflow-nodes content: 'Delete a node and its downstream subtree. Make a dry run request using `dryRun: true`. If contacts are queued at any node that would be deleted, Loops returns with `"status": "queuedContactsFound"` instead of deleting. Retry with `queuedContactPolicy: "discard"` to delete the nodes and discard those queued contacts. Confirmed deletion responses include the simplified workflow after the nodes are removed.' metadata: sidebarTitle: Delete nodes description: Delete a node and its downstream subtree. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeleteWorkflowNodeRequest' responses: '200': description: Delete dry run, queued-contact warning, or deletion result. Confirmed deletion responses include the simplified workflow after the nodes are removed. content: application/json: schema: $ref: '#/components/schemas/DeleteWorkflowNodeResponse' '400': description: Invalid `workflowId`, `nodeId`, request body, or delete target. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '401': description: Invalid API key. '404': description: Workflow or workflow node not found. content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' '405': description: Wrong HTTP request method. '409': description: '`expectedRevisionId` is stale.' content: application/json: schema: $ref: '#/components/schemas/WorkflowFailureResponse' security: - apiKey: [] components: schemas: ActivityCondition: type: object description: Matches contacts by their activity on a campaign or workflow. properties: type: type: string enum: - activity action: type: string enum: - sent - opened - clicked negate: type: boolean target: type: string enum: - campaign - workflow - workflowEmail id: type: string description: The ID of the campaign, workflow, or workflow email. required: - type - action - negate - target - id examples: - type: activity action: opened negate: false target: campaign id: clc4m6n8p0q2r4s6t8u0v2x4 AddToListTriggerWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - AddToListTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' mailingListId: type: - string - 'null' description: The ID of the mailing list this trigger sends to, if set. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - typeName - nextNodeIds - mailingListId - reEligible AddToListTriggerWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/AddToListTriggerWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' AddToListTriggerWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - AddToListTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' mailingListId: type: - string - 'null' examples: - clm2k8j4h6g0f8d6s4a2b0z8 - null description: The ID of the mailing list that triggers the workflow. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - workflowId - typeName - nextNodeIds - mailingListId - reEligible additionalProperties: false AddWorkflowBranchRequest: type: object properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' required: - expectedRevisionId additionalProperties: false AddWorkflowBranchResponse: type: object properties: node: $ref: '#/components/schemas/WorkflowMutationNodeWithRevision' workflow: $ref: '#/components/schemas/SimplifiedWorkflow' required: - node - workflow additionalProperties: false AudienceFilter: type: - object - 'null' description: A tree of audience conditions combined with `match`. properties: match: type: string enum: - all - any conditions: type: array minItems: 1 items: $ref: '#/components/schemas/AudienceFilterCondition' required: - match - conditions additionalProperties: false AudienceFilterCondition: oneOf: - $ref: '#/components/schemas/PropertyCondition' - $ref: '#/components/schemas/OptInCondition' - $ref: '#/components/schemas/ActivityCondition' discriminator: propertyName: type AudienceFilterInRequest: type: - object - 'null' description: A tree of audience conditions combined with `match`. Setting this without also providing `audienceSegmentId` clears any existing `audienceSegmentId`. When both are provided, this filter is applied on top of the segment's filter. properties: match: type: string enum: - all - any conditions: type: array minItems: 1 items: $ref: '#/components/schemas/AudienceFilterCondition' required: - match - conditions additionalProperties: false AudienceFilterWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - AudienceFilter nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' audienceFilter: $ref: '#/components/schemas/AudienceFilter' audienceSegmentId: type: string description: The ID of the audience segment this trigger targets. appliesDownstream: description: If `true`, the audience filter will apply to all downstream nodes. If `false`, the audience filter will only apply to the current node. Matches the "Filter scope" option in the UI. type: boolean required: - id - typeName - nextNodeIds - appliesDownstream AudienceFilterWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/AudienceFilterWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' AudienceFilterWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - AudienceFilter nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' audienceFilter: $ref: '#/components/schemas/AudienceFilter' audienceSegmentId: type: string appliesDownstream: description: If `true`, the audience filter will apply to all downstream nodes. If `false`, the audience filter will only apply to the current node. Matches the "Filter scope" option in the UI. type: boolean required: - id - workflowId - typeName - nextNodeIds - appliesDownstream additionalProperties: false BlankTriggerWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - BlankTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - typeName - nextNodeIds BlankTriggerWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/BlankTriggerWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' BlankTriggerWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - BlankTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - workflowId - typeName - nextNodeIds additionalProperties: false BranchWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - BranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - typeName - nextNodeIds BranchWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/BranchWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' BranchWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - BranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - workflowId - typeName - nextNodeIds additionalProperties: false ContactPropertyTriggerWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - ContactPropertyTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' contactPropertyQuery: oneOf: - $ref: '#/components/schemas/WorkflowContactPropertyQuery' - type: 'null' reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - typeName - nextNodeIds - contactPropertyQuery - reEligible ContactPropertyTriggerWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/ContactPropertyTriggerWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' ContactPropertyTriggerWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - ContactPropertyTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' contactPropertyQuery: oneOf: - $ref: '#/components/schemas/WorkflowContactPropertyQuery' - type: 'null' reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - workflowId - typeName - nextNodeIds - contactPropertyQuery - reEligible additionalProperties: false CreateWorkflowNodeAfterRequest: type: object description: Insert a new node after `fromNodeId`. This is valid only when `fromNodeId` has exactly one outgoing node. It is invalid when `fromNodeId` has no outgoing nodes, multiple outgoing nodes, or is an exit node. When the source has multiple outgoing nodes, use `between` with the exact `toNodeId` instead. properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' insertMode: type: string enum: - after nodeTypeName: $ref: '#/components/schemas/CreateWorkflowNodeTypeName' fromNodeId: type: string description: The node to insert after. This node must currently have exactly one outgoing node. required: - expectedRevisionId - insertMode - nodeTypeName - fromNodeId additionalProperties: false CreateWorkflowNodeBeforeRequest: type: object description: 'Insert a new node before `toNodeId`. `VariantNode` cannot use `insertMode: "before"`; to restore a missing variant path, use `insertMode: "between"` with the experiment branch as `fromNodeId`.' properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' insertMode: type: string enum: - before nodeTypeName: $ref: '#/components/schemas/CreateWorkflowNodeTypeName' toNodeId: type: string description: The node to insert before. The target must have at least one incoming parent and cannot be a trigger node. beforeNodeId: type: string description: Deprecated. Use `toNodeId` instead. deprecated: true required: - expectedRevisionId - insertMode - nodeTypeName oneOf: - properties: toNodeId: type: string required: - toNodeId - properties: beforeNodeId: type: string deprecated: true required: - beforeNodeId additionalProperties: false CreateWorkflowNodeBetweenRequest: type: object description: Insert a new node between two existing nodes, `fromNodeId` and `toNodeId`. When `fromNodeId` is an `ExperimentBranchNode`, `nodeTypeName` must be `VariantNode`, and `toNodeId` cannot already be a `VariantNode`; use add-branch to add sibling variants. Branch paths can be edited with create-node, but a workflow cannot be started unless each direct `BranchNode` child is an `AudienceFilter`. properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' insertMode: type: string enum: - between nodeTypeName: $ref: '#/components/schemas/CreateWorkflowNodeTypeName' fromNodeId: type: string description: The node to insert after. This node must currently point to `toNodeId`. If this is an `ExperimentBranchNode`, `nodeTypeName` must be `VariantNode` and `toNodeId` cannot already be a `VariantNode`. toNodeId: type: string description: The node to insert before. required: - expectedRevisionId - insertMode - nodeTypeName - fromNodeId - toNodeId additionalProperties: false CreateWorkflowNodeRequest: oneOf: - $ref: '#/components/schemas/CreateWorkflowNodeBetweenRequest' - $ref: '#/components/schemas/CreateWorkflowNodeBeforeRequest' - $ref: '#/components/schemas/CreateWorkflowNodeAfterRequest' description: Create a new workflow node with an explicit `insertMode`. To configure the node after creation, use the `POST /v1/workflows/{workflowId}/nodes/{nodeId}` endpoint. discriminator: propertyName: insertMode mapping: between: '#/components/schemas/CreateWorkflowNodeBetweenRequest' before: '#/components/schemas/CreateWorkflowNodeBeforeRequest' after: '#/components/schemas/CreateWorkflowNodeAfterRequest' CreateWorkflowNodeResponse: type: object properties: node: $ref: '#/components/schemas/CreatedWorkflowNode' workflow: $ref: '#/components/schemas/SimplifiedWorkflow' required: - node - workflow additionalProperties: false CreateWorkflowNodeTypeName: type: string enum: - AudienceFilter - BranchNode - ExperimentBranchNode - TimerAction - SendEmailAction - VariantNode description: Node types that can be created with the API. `*Trigger` nodes and `ExitAction` nodes cannot be created. CreatedWorkflowNode: allOf: - $ref: '#/components/schemas/WorkflowMutationNodeWithRevision' - type: object properties: createdChildNodes: type: array description: Default child nodes created along with the requested node. BranchNode creation returns two AudienceFilter children. ExperimentBranchNode creation returns two regular VariantNode children and one control VariantNode. items: $ref: '#/components/schemas/WorkflowMutationNode' DeleteWorkflowNodeRequest: type: object properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' dryRun: type: boolean description: If `true`, the request will be validated but the workflow will not be modified. queuedContactPolicy: $ref: '#/components/schemas/WorkflowQueuedContactPolicy' required: - expectedRevisionId additionalProperties: false DeleteWorkflowNodeResponse: oneOf: - $ref: '#/components/schemas/WorkflowQueuedContactDeletePreview' - $ref: '#/components/schemas/WorkflowDeletedResponse' EventTriggerWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - EventTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' eventName: type: string description: The name of the event pattern that triggers this node. eventProperties: type: array items: $ref: '#/components/schemas/WorkflowEventProperty' description: The properties of the event pattern, which can be used in emails. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - typeName - nextNodeIds - reEligible EventTriggerWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/EventTriggerWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' EventTriggerWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - EventTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' eventName: type: string examples: - signup description: The name of the event pattern that triggers this node. eventProperties: type: array items: $ref: '#/components/schemas/WorkflowEventProperty' description: The properties of the event pattern, which can be used in emails. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - id - workflowId - typeName - nextNodeIds - reEligible additionalProperties: false ExitActionWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - ExitAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - typeName - nextNodeIds ExitActionWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/ExitActionWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' ExitActionWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - ExitAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - workflowId - typeName - nextNodeIds additionalProperties: false ExperimentBranchWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - ExperimentBranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' samplingRate: type: number description: The percentage of contacts that will be sent to variant branches, between `0` and `100`. The remaining percentage will be sent to the control branch. `100` sends all contacts to variant branches. required: - id - typeName - nextNodeIds - samplingRate ExperimentBranchWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/ExperimentBranchWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' ExperimentBranchWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - ExperimentBranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' samplingRate: type: number description: The percentage of contacts that will be sent to variant branches, between `0` and `100`. The remaining percentage will be sent to the control branch. `100` sends all contacts to variant branches. required: - id - workflowId - typeName - nextNodeIds - samplingRate additionalProperties: false NullableWorkflowRevisionId: type: - string - 'null' description: The current workflow revision token. Pass the latest value as `expectedRevisionId` on the next workflow mutation. Will be `null` for workflows without a revision token yet. OptInCondition: type: object description: Matches contacts by mailing-list opt-in status. properties: type: type: string enum: - optIn status: type: - string - 'null' enum: - accepted - pending - rejected - null required: - type - status examples: - type: optIn status: accepted PropertyCondition: type: object description: Matches contacts by a property value. properties: type: type: string enum: - property key: type: string description: The contact property name. operator: type: string enum: - any - contains - notContains - equals - notEquals - greaterThan - lessThan - isTrue - isFalse - empty - notEmpty - dateEmpty - dateNotEmpty - after - before - between value: description: The comparison value. Omitted for value-less operators (e.g. `isTrue`, `empty`). A `{ from, to }` object for `between`. oneOf: - type: string - type: number - type: object properties: from: type: string format: date-time to: type: string format: date-time required: - from - to required: - type - key - operator examples: - type: property key: plan operator: equals value: pro RerouteNodeConnectionRequest: type: object description: Reroute the source node's only outgoing connection to `newTargetNodeId`. properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' newTargetNodeId: type: string description: The valid workflow node that should receive the connection from the source node. examples: - cln3c5d7e9f1g3h5i7j9k1l3 required: - expectedRevisionId - newTargetNodeId additionalProperties: false examples: - expectedRevisionId: clx7a3b5c7d9e1f3g5h7i9j1 newTargetNodeId: cln3c5d7e9f1g3h5i7j9k1l3 RerouteNodeConnectionResponse: description: The updated source node, plus the latest workflow. allOf: - $ref: '#/components/schemas/WorkflowMutationNodeWithRevision' - type: object properties: workflow: $ref: '#/components/schemas/SimplifiedWorkflow' required: - workflow examples: - id: cln8p0q2r4s6t8u0v2w4x6z8 typeName: SignupTrigger nextNodeIds: - cln3c5d7e9f1g3h5i7j9k1l3 workflowRevisionId: clx7a3b5c7d9e1f3g5h7i9j2 workflow: id: clw1a3b5c7d9e1f3g5h7i9j1 workflowRevisionId: clx7a3b5c7d9e1f3g5h7i9j2 status: Draft name: Welcome series description: Onboarding emails for new signups mailingListId: clm2k8j4h6g0f8d6s4a2b0z8 rootNodeId: cln8p0q2r4s6t8u0v2w4x6z8 nodes: cln8p0q2r4s6t8u0v2w4x6z8: typeName: SignupTrigger nextNodeIds: - cln3c5d7e9f1g3h5i7j9k1l3 cln1a3b5c7d9e1f3g5h7i9j1: typeName: AudienceFilter nextNodeIds: - cln3c5d7e9f1g3h5i7j9k1l3 cln3c5d7e9f1g3h5i7j9k1l3: typeName: SendEmailAction nextNodeIds: [] emailMessageId: cle5f7g9h1i3j5k7l9m1n3p5 subject: Welcome to Acme! SendEmailActionWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - SendEmailAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' emailMessageId: type: string description: The ID of the email message to send. To edit this email, use the `POST /v1/email-messages/{emailMessageId}` endpoint. subject: type: string required: - id - typeName - nextNodeIds - emailMessageId - subject SendEmailActionWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/SendEmailActionWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' SendEmailActionWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - SendEmailAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' emailMessageId: type: string examples: - cle5f7g9h1i3j5k7l9m1n3p5 description: The ID of the email message to send. To edit this email, use the `POST /v1/email-messages/{emailMessageId}` endpoint. subject: type: string examples: - Welcome to Acme! required: - id - workflowId - typeName - nextNodeIds - emailMessageId - subject additionalProperties: false SignupTriggerWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - SignupTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - typeName - nextNodeIds SignupTriggerWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/SignupTriggerWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' SignupTriggerWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - SignupTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - id - workflowId - typeName - nextNodeIds additionalProperties: false SimplifiedAddToListTriggerWorkflowNode: type: object properties: typeName: type: string enum: - AddToListTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' mailingListId: type: - string - 'null' description: The ID of the mailing list that triggers the workflow. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - typeName - nextNodeIds - mailingListId - reEligible additionalProperties: false SimplifiedAudienceFilterWorkflowNode: type: object properties: typeName: type: string enum: - AudienceFilter nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - typeName - nextNodeIds additionalProperties: false SimplifiedBlankTriggerWorkflowNode: type: object properties: typeName: type: string enum: - BlankTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - typeName - nextNodeIds additionalProperties: false SimplifiedBranchWorkflowNode: type: object properties: typeName: type: string enum: - BranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - typeName - nextNodeIds additionalProperties: false SimplifiedContactPropertyTriggerWorkflowNode: type: object properties: typeName: type: string enum: - ContactPropertyTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' contactPropertyQuery: oneOf: - $ref: '#/components/schemas/WorkflowContactPropertyQuery' - type: 'null' reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - typeName - nextNodeIds - contactPropertyQuery - reEligible additionalProperties: false SimplifiedEventTriggerWorkflowNode: type: object properties: typeName: type: string enum: - EventTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' eventName: type: - string - 'null' description: The name of the event that triggers the workflow. reEligible: $ref: '#/components/schemas/WorkflowReEligible' required: - typeName - nextNodeIds - eventName - reEligible additionalProperties: false examples: - typeName: EventTrigger nextNodeIds: - cln1a3b5c7d9e1f3g5h7i9j1 eventName: signup reEligible: false SimplifiedExitActionWorkflowNode: type: object properties: typeName: type: string enum: - ExitAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - typeName - nextNodeIds additionalProperties: false SimplifiedExperimentBranchWorkflowNode: type: object properties: typeName: type: string enum: - ExperimentBranchNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' samplingRate: type: number description: The percentage of contacts that will be sent to variant branches, between `0` and `100`. The remaining percentage will be sent to the control branch. required: - typeName - nextNodeIds - samplingRate additionalProperties: false SimplifiedSendEmailActionWorkflowNode: type: object properties: typeName: type: string enum: - SendEmailAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' emailMessageId: type: - string - 'null' description: The ID of the email message to send. To edit this email, use the `POST /v1/email-messages/{emailMessageId}` endpoint. subject: type: string description: The subject of the email message (reference only). required: - typeName - nextNodeIds - emailMessageId - subject additionalProperties: false examples: - typeName: SendEmailAction nextNodeIds: [] emailMessageId: cle5f7g9h1i3j5k7l9m1n3p5 subject: Welcome to Acme! SimplifiedSignupTriggerWorkflowNode: type: object properties: typeName: type: string enum: - SignupTrigger nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' required: - typeName - nextNodeIds additionalProperties: false SimplifiedTimerActionWorkflowNode: type: object properties: typeName: type: string enum: - TimerAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' amount: $ref: '#/components/schemas/WorkflowTimerAmount' unit: $ref: '#/components/schemas/WorkflowTimerUnit' required: - typeName - nextNodeIds - amount - unit additionalProperties: false examples: - typeName: TimerAction nextNodeIds: - cln1a3b5c7d9e1f3g5h7i9j1 amount: 2 unit: d SimplifiedVariantWorkflowNode: type: object properties: typeName: type: string enum: - VariantNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' isControl: type: boolean description: Whether this is the control variant of an experiment. required: - typeName - nextNodeIds - isControl additionalProperties: false SimplifiedWorkflow: type: object properties: id: type: string description: The ID of the workflow. workflowRevisionId: $ref: '#/components/schemas/NullableWorkflowRevisionId' status: type: string enum: - Draft - Sending - Paused - PausedAndQueueing name: type: string description: The name of the workflow. description: type: string description: The description of the workflow. mailingListId: type: - string - 'null' description: The ID of the mailing list the workflow sends to. rootNodeId: type: string description: The ID of the root node in the workflow graph. nodes: type: object description: A map of node IDs to simplified node objects. Each node includes `typeName` and `nextNodeIds`, plus type-specific fields when present. To get the full node object, use the `GET /v1/workflows/{workflowId}/nodes/{nodeId}` endpoint. additionalProperties: $ref: '#/components/schemas/SimplifiedWorkflowNode' example: cf16k73gq014h3mmj5b6jdi9r: typeName: SignupTrigger nextNodeIds: - cf16k73gq014h3mmj5b4jdifg - cf16k73gq014h3mmj5b4jdifh required: - id - workflowRevisionId - status - mailingListId - rootNodeId - nodes examples: - id: clw1a3b5c7d9e1f3g5h7i9j1 status: Draft name: Welcome series description: Onboarding emails for new signups mailingListId: clm2k8j4h6g0f8d6s4a2b0z8 rootNodeId: cln8p0q2r4s6t8u0v2w4x6z8 nodes: cln8p0q2r4s6t8u0v2w4x6z8: typeName: SignupTrigger nextNodeIds: - cln1a3b5c7d9e1f3g5h7i9j1 cln1a3b5c7d9e1f3g5h7i9j1: typeName: SendEmailAction nextNodeIds: [] emailMessageId: cle5f7g9h1i3j5k7l9m1n3p5 subject: Welcome to Acme! SimplifiedWorkflowNode: oneOf: - $ref: '#/components/schemas/SimplifiedSignupTriggerWorkflowNode' - $ref: '#/components/schemas/SimplifiedEventTriggerWorkflowNode' - $ref: '#/components/schemas/SimplifiedContactPropertyTriggerWorkflowNode' - $ref: '#/components/schemas/SimplifiedAddToListTriggerWorkflowNode' - $ref: '#/components/schemas/SimplifiedBlankTriggerWorkflowNode' - $ref: '#/components/schemas/SimplifiedAudienceFilterWorkflowNode' - $ref: '#/components/schemas/SimplifiedTimerActionWorkflowNode' - $ref: '#/components/schemas/SimplifiedSendEmailActionWorkflowNode' - $ref: '#/components/schemas/SimplifiedExitActionWorkflowNode' - $ref: '#/components/schemas/SimplifiedBranchWorkflowNode' - $ref: '#/components/schemas/SimplifiedExperimentBranchWorkflowNode' - $ref: '#/components/schemas/SimplifiedVariantWorkflowNode' discriminator: propertyName: typeName TimerActionWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - TimerAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' amount: $ref: '#/components/schemas/WorkflowTimerAmount' unit: $ref: '#/components/schemas/WorkflowTimerUnit' required: - id - typeName - nextNodeIds - amount - unit TimerActionWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/TimerActionWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' TimerActionWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - TimerAction nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' amount: $ref: '#/components/schemas/WorkflowTimerAmount' unit: $ref: '#/components/schemas/WorkflowTimerUnit' required: - id - workflowId - typeName - nextNodeIds - amount - unit additionalProperties: false UpdateWorkflowNodePayload: anyOf: - $ref: '#/components/schemas/WorkflowSignupTriggerPayload' - $ref: '#/components/schemas/WorkflowEventTriggerPayload' - $ref: '#/components/schemas/WorkflowContactPropertyTriggerPayload' - $ref: '#/components/schemas/WorkflowAddToListTriggerPayload' - $ref: '#/components/schemas/WorkflowAudienceFilterPayload' - $ref: '#/components/schemas/WorkflowTimerActionPayload' - $ref: '#/components/schemas/WorkflowExperimentBranchPayload' - $ref: '#/components/schemas/WorkflowVariantPayload' description: Node-type-specific fields to update. The allowed fields depend on the existing node type. Trigger node updates may include `typeName` when changing one trigger node type to another trigger node type. UpdateWorkflowNodeRequest: type: object properties: expectedRevisionId: $ref: '#/components/schemas/WorkflowExpectedRevisionId' payload: $ref: '#/components/schemas/UpdateWorkflowNodePayload' required: - expectedRevisionId - payload additionalProperties: false UpdateWorkflowNodeResponse: description: The updated workflow node, plus the latest simplified workflow. allOf: - $ref: '#/components/schemas/WorkflowMutationNodeWithRevision' - type: object properties: workflow: $ref: '#/components/schemas/SimplifiedWorkflow' required: - workflow VariantWorkflowMutationNode: type: object properties: id: type: string typeName: type: string enum: - VariantNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' isControl: type: boolean description: Whether this is the control variant of an experiment. required: - id - typeName - nextNodeIds VariantWorkflowMutationNodeWithRevision: allOf: - $ref: '#/components/schemas/VariantWorkflowMutationNode' - $ref: '#/components/schemas/WorkflowMutationNodeRevision' VariantWorkflowNode: type: object properties: id: type: string examples: - cln8p0q2r4s6t8u0v2w4x6z8 workflowId: type: string examples: - clw1a3b5c7d9e1f3g5h7i9j1 typeName: type: string enum: - VariantNode nextNodeIds: $ref: '#/components/schemas/WorkflowNextNodeIds' isControl: type: boolean description: Whether this is the control variant of an experiment. required: - id - workflowId - typeName - nextNodeIds additionalProperties: false WorkflowAddToListTriggerPayload: type: object description: Updates an add-to-list trigger, or changes an existing trigger node to an add-to-list trigger. minProperties: 1 properties: typeName: type: string enum: - AddToListTrigger reEligible: $ref: '#/components/schemas/WorkflowReEligible' additionalProperties: false WorkflowAudienceFilterPayload: type: object minProperties: 1 description: Configuration for the audience filter node. properties: audienceSegmentId: type: - string - 'null' description: The ID of an audience segment. Setting this without also providing `audienceFilter` clears any existing `audienceFilter`. If both are provided, the filter is applied on top of the segment's filter. audienceFilter: $ref: '#/components/schemas/AudienceFilterInRequest' appliesDownstream: type: boolean description: If `true`, the audience filter will apply to all downstream nodes. If `false`, the audience filter will only apply to the current node. Matches the "Filter scope" option in the UI. additionalProperties: false WorkflowContactPropertyComparison: type: object description: For Contact Updated triggers, the API validates `operator` against the selected contact property's type and the side of the comparison. The `was` comparison can use any operator supported by the selected property type. The `is` comparison uses the same operators, except number and boolean properties cannot use `empty`. String properties support `any`, `equal`, `not_equal`, `contains`, `not_contains`, `empty`, and `not_empty`. Number properties support `any`, `greater_than`, `less_than`, `numeric_equal`, `numeric_not_equal`, `empty`, and `not_empty`. Boolean properties support `any`, `true`, `false`, `empty`, and `not_empty`. Date properties support `any`, `empty`, `not_empty`, `after`, `before`, and `between`. properties: value: oneOf: - type: string - type: number - type: boolean operator: type: string description: The comparison operator. It must be valid for the selected contact property's type and for the `is` or `was` side of the comparison. Number and boolean properties allow `empty` on `was`, but not on `is`. enum: - any - contains - not_contains - empty - not_empty - equal - not_equal - greater_than - less_than - 'true' - 'false' - numeric_equal - numeric_not_equal - after - before - between required: - value - operator WorkflowContactPropertyQuery: type: object description: Define the contact property change that triggers the workflow. In update requests, `key` must resolve to an existing contact property that is available for Contact Updated triggers. Hidden or unsupported fields, such as `createdAt`, `notes`, and computed contact properties, are rejected. properties: key: type: string description: The camel-cased `key` of the contact property to query. The property must exist for the team and must be available for Contact Updated triggers. examples: - firstName - email - planName is: description: Comparison for the new contact property value after the update. $ref: '#/components/schemas/WorkflowContactPropertyComparison' was: description: Comparison for the previous contact property value before the update. $ref: '#/components/schemas/WorkflowContactPropertyComparison' required: - key - is - was WorkflowContactPropertyTriggerPayload: type: object description: Updates a contact-property trigger, or changes an existing trigger node to a contact-property trigger. minProperties: 1 properties: typeName: type: string enum: - ContactPropertyTrigger contactPropertyQuery: $ref: '#/components/schemas/WorkflowContactPropertyQuery' reEligible: $ref: '#/components/schemas/WorkflowReEligible' additionalProperties: false WorkflowDeletedResponse: type: object properties: status: type: string enum: - deleted nodeIds: type: array items: type: string workflowRevisionId: $ref: '#/components/schemas/WorkflowRevisionId' queuedContactCount: type: number description: The number of queued contacts that were removed from the workflow due to the node deletion. workflow: $ref: '#/components/schemas/SimplifiedWorkflow' required: - status - nodeIds - workflowRevisionId - queuedContactCount - workflow WorkflowEventProperty: type: object properties: name: type: string type: type: string enum: - string - number - boolean - date required: - name - type WorkflowEventTriggerPayload: type: object description: Updates an event trigger, or changes an existing trigger node to an event trigger. Assign the event pattern with either `eventPatternId` or `eventName`, not both. Set either field to `null` to clear the event-pattern relationship. minProperties: 1 properties: typeName: type: string enum: - EventTrigger eventPatternId: type: - string - 'null' description: The ID of the event pattern to trigger on. Use either `eventPatternId` or `eventName`, not both. Set to `null` to clear the event-pattern relationship. eventName: type: - string - 'null' description: The name of the event pattern to trigger on. Use this when you know the event name but not the internal event pattern ID. Use either `eventName` or `eventPatternId`, not both. Set to `null` to clear the event-pattern relationship. reEligible: $ref: '#/components/schemas/WorkflowReEligible' additionalProperties: false WorkflowExpectedRevisionId: type: - string - 'null' description: The workflow revision token returned by the latest workflow read or mutation. Older workflows may return `null` before their first revision-aware mutation; pass `null` back as `expectedRevisionId` in that case. If the token is stale, the API returns a `409 Conflict` error. WorkflowExperimentBranchPayload: type: object minProperties: 1 description: Configuration for the experiment branch node. properties: samplingRate: type: number description: The percentage of contacts that will be sent to variant branches, between `0` and `100`. The remaining percentage will be sent to the control branch. `100` sends all contacts to variant branches. additionalProperties: false WorkflowFailureResponse: type: object properties: message: type: string required: - message examples: - message: Workflow not found. WorkflowMutationNode: description: Detailed workflow node returned from create and update mutations. The exact fields depend on `typeName`. oneOf: - $ref: '#/components/schemas/SignupTriggerWorkflowMutationNode' - $ref: '#/components/schemas/EventTriggerWorkflowMutationNode' - $ref: '#/components/schemas/ContactPropertyTriggerWorkflowMutationNode' - $ref: '#/components/schemas/AddToListTriggerWorkflowMutationNode' - $ref: '#/components/schemas/BlankTriggerWorkflowMutationNode' - $ref: '#/components/schemas/AudienceFilterWorkflowMutationNode' - $ref: '#/components/schemas/TimerActionWorkflowMutationNode' - $ref: '#/components/schemas/SendEmailActionWorkflowMutationNode' - $ref: '#/components/schemas/ExitActionWorkflowMutationNode' - $ref: '#/components/schemas/BranchWorkflowMutationNode' - $ref: '#/components/schemas/ExperimentBranchWorkflowMutationNode' - $ref: '#/components/schemas/VariantWorkflowMutationNode' discriminator: propertyName: typeName mapping: SignupTrigger: '#/components/schemas/SignupTriggerWorkflowMutationNode' EventTrigger: '#/components/schemas/EventTriggerWorkflowMutationNode' ContactPropertyTrigger: '#/components/schemas/ContactPropertyTriggerWorkflowMutationNode' AddToListTrigger: '#/components/schemas/AddToListTriggerWorkflowMutationNode' BlankTrigger: '#/components/schemas/BlankTriggerWorkflowMutationNode' AudienceFilter: '#/components/schemas/AudienceFilterWorkflowMutationNode' TimerAction: '#/components/schemas/TimerActionWorkflowMutationNode' SendEmailAction: '#/components/schemas/SendEmailActionWorkflowMutationNode' ExitAction: '#/components/schemas/ExitActionWorkflowMutationNode' BranchNode: '#/components/schemas/BranchWorkflowMutationNode' ExperimentBranchNode: '#/components/schemas/ExperimentBranchWorkflowMutationNode' VariantNode: '#/components/schemas/VariantWorkflowMutationNode' WorkflowMutationNodeRevision: type: object properties: workflowRevisionId: $ref: '#/components/schemas/WorkflowRevisionId' required: - workflowRevisionId WorkflowMutationNodeWithRevision: description: Detailed workflow node returned from a mutation, plus the latest workflow revision token. oneOf: - $ref: '#/components/schemas/SignupTriggerWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/EventTriggerWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/ContactPropertyTriggerWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/AddToListTriggerWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/BlankTriggerWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/AudienceFilterWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/TimerActionWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/SendEmailActionWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/ExitActionWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/BranchWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/ExperimentBranchWorkflowMutationNodeWithRevision' - $ref: '#/components/schemas/VariantWorkflowMutationNodeWithRevision' discriminator: propertyName: typeName mapping: SignupTrigger: '#/components/schemas/SignupTriggerWorkflowMutationNodeWithRevision' EventTrigger: '#/components/schemas/EventTriggerWorkflowMutationNodeWithRevision' ContactPropertyTrigger: '#/components/schemas/ContactPropertyTriggerWorkflowMutationNodeWithRevision' AddToListTrigger: '#/components/schemas/AddToListTriggerWorkflowMutationNodeWithRevision' BlankTrigger: '#/components/schemas/BlankTriggerWorkflowMutationNodeWithRevision' AudienceFilter: '#/components/schemas/AudienceFilterWorkflowMutationNodeWithRevision' TimerAction: '#/components/schemas/TimerActionWorkflowMutationNodeWithRevision' SendEmailAction: '#/components/schemas/SendEmailActionWorkflowMutationNodeWithRevision' ExitAction: '#/components/schemas/ExitActionWorkflowMutationNodeWithRevision' BranchNode: '#/components/schemas/BranchWorkflowMutationNodeWithRevision' ExperimentBranchNode: '#/components/schemas/ExperimentBranchWorkflowMutationNodeWithRevision' VariantNode: '#/components/schemas/VariantWorkflowMutationNodeWithRevision' WorkflowNextNodeIds: type: array items: type: string description: The IDs of the nodes that are downstream of this node. WorkflowNode: oneOf: - $ref: '#/components/schemas/SignupTriggerWorkflowNode' - $ref: '#/components/schemas/EventTriggerWorkflowNode' - $ref: '#/components/schemas/ContactPropertyTriggerWorkflowNode' - $ref: '#/components/schemas/AddToListTriggerWorkflowNode' - $ref: '#/components/schemas/BlankTriggerWorkflowNode' - $ref: '#/components/schemas/AudienceFilterWorkflowNode' - $ref: '#/components/schemas/TimerActionWorkflowNode' - $ref: '#/components/schemas/SendEmailActionWorkflowNode' - $ref: '#/components/schemas/ExitActionWorkflowNode' - $ref: '#/components/schemas/BranchWorkflowNode' - $ref: '#/components/schemas/ExperimentBranchWorkflowNode' - $ref: '#/components/schemas/VariantWorkflowNode' discriminator: propertyName: typeName WorkflowNodeWithRevision: description: Detailed workflow node returned from read operations. The exact fields depend on `typeName`. allOf: - $ref: '#/components/schemas/WorkflowNode' - type: object properties: workflowRevisionId: $ref: '#/components/schemas/NullableWorkflowRevisionId' required: - workflowRevisionId WorkflowQueuedContactDeletePreview: type: object properties: status: type: string enum: - dryRun - queuedContactsFound nodeIds: type: array items: type: string description: The IDs of the nodes that would be deleted. queuedContactCount: type: number description: The number of queued contacts that would be removed from the workflow due to the node deletion. required: - status - nodeIds - queuedContactCount WorkflowQueuedContactPolicy: type: string enum: - fail - discard default: fail description: '`fail` returns queued-contact impact instead of mutating. `discard` confirms that matching queued contacts should be discarded. Defaults to `fail` when omitted.' WorkflowReEligible: type: boolean description: If `true`, the contacts will be able to enter this workflow every time the trigger is matched. If `false`, contacts will only ever enter this workflow once. Matches the "Trigger frequency" option in the UI. WorkflowRevisionId: type: - string description: The current workflow revision token. Pass the latest value as `expectedRevisionId` on the next workflow mutation. WorkflowSignupTriggerPayload: type: object description: Changes an existing trigger node to a signup trigger. properties: typeName: type: string enum: - SignupTrigger required: - typeName additionalProperties: false WorkflowTimerActionPayload: type: object minProperties: 1 description: Configuration for the timer action node. properties: amount: $ref: '#/components/schemas/WorkflowTimerAmount' unit: $ref: '#/components/schemas/WorkflowTimerUnit' additionalProperties: false WorkflowTimerAmount: type: number description: The amount of time to wait before triggering the next node. Set to `0` to move to the next node immediately. WorkflowTimerUnit: type: string enum: - m - h - d description: The unit of time for the timer action node. m = minutes, h = hours, d = days. WorkflowVariantPayload: type: object minProperties: 1 description: Configuration for the variant node. properties: isControl: type: boolean description: Use `true` to set this variant as the control of the experiment. This will set `false` on the existing control, if one exists. Experiments do not require a control variant. additionalProperties: false securitySchemes: apiKey: type: http scheme: bearer