---
title: "Set trigger"
method: PATCH
path: "/api/v1/journeys/{journeyId}/trigger"
tags: ["Journeys"]
---

# Set trigger

`PATCH /api/v1/journeys/{journeyId}/trigger`

Configure how people enter the journey by updating its ENTRY node: manual, segment (needs segmentId), or cdp_event (needs eventName), with an optional frequency cap.

## Path parameters

- `journeyId` string, required — A draft journey id, or the initiative id (resolves to its current draft).

## Request body

- object
  - `triggerType` 'manual' | 'segment' | 'cdp_event', required — How people enter the journey.
  - `segmentId` string — Required for segment triggers.
  - `segmentName` string
  - `eventName` string — Required for cdp_event triggers.
  - `maxEnrollments` integer — Frequency cap; both-or-neither with enrollmentWindow.
  - `enrollmentWindow` string — Frequency-cap window, e.g. '7d'.

## Response `200`

Success

- object
  - `id` string, required — Journey (workflow version) id.
  - `initiativeId` string, required — The initiative this journey belongs to.
  - `status` 'DRAFT' | 'PUBLISHED' | 'STOPPED', required — DRAFT (editable), PUBLISHED (live, frozen), or STOPPED (retired).
  - `version` integer, required — Version number within the initiative.
  - `definition` object, required — The full journey graph.
    - `id` string — Journey id; carried for round-trip ergonomics. Optional on create.
    - `name` string, required — Journey name.
    - `metadata` object — Optional journey-level metadata.
      - `initiativeType` string
      - `version` integer
      - `cancelOnEvents` object — Cancel an in-flight run when any of these events arrive.
        - `eventNames` string[], required
    - `actions` union[], required — The nodes. Exactly one ENTRY and at least one EXIT are required to publish.
      - union
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'ENTRY', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Trigger node config. Exactly one ENTRY node per journey.
            - `description` string
            - `triggerType` 'manual' | 'segment' | 'cdp_event' — How people enter: manual (added by an operator or API call), segment (on entering a segment), or cdp_event (when an event is received). Defaults to manual.
            - `segmentId` string — Segment id — required when triggerType is segment.
            - `segmentName` string — Cached segment display name (optional).
            - `eventName` string — CDP event name — required when triggerType is cdp_event.
            - `maxEnrollments` integer — Frequency cap: max enrollments per person within enrollmentWindow. Both-or-neither with enrollmentWindow.
            - `enrollmentWindow` string — Rolling window for the frequency cap.
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'SEND_MESSAGE', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Sends a WhatsApp template.
            - `templateId` string — Approved WhatsApp template id. Resolve ids from the catalog.
            - `templateName` string
            - `channel` 'whatsapp' | 'sms' | 'email' — Send channel. Only whatsapp is live today.
            - `templateBindings` object — Map of template placeholder → variable reference.
            - `channelId` string — Sending WhatsApp channel (WABA) id. Required before publishing.
            - `sendImmediately` boolean — Deprecated business-hours gate; prefer a preceding DELAY.
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'CONVERSATION_BLOCK', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Legacy combined wait + AI conversation block.
            - `goal` string
            - `maxTimeout` string — How long to wait for a reply before timing out.
            - `mode` 'AGENT' | 'ESCALATE'
            - `outputs` object[]
              - …
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'WAIT_FOR_REPLY', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Waits for the person to reply.
            - `maxTimeout` string — How long to wait for the first reply before timing out.
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'MANAGE_CONVERSATION', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Runs the AI-led conversation.
            - `mode` 'AGENT' | 'ESCALATE' — AGENT (AI-led) or ESCALATE (human handoff). Defaults to AGENT.
            - `inactivityTimeout` string — Rolling idle window (e.g. '12h'), resets on each inbound message. After this much silence the node closes the conversation (routes CLOSED) — an earlier per-node version of the 30h global close. Range 1h–24h; requires the journey-inactivity-timeout flag.
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'DISPATCH_EVENT', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Records a CDP event for the person.
            - `eventName` string, required — CDP event name to record. Must match the CDP name pattern.
            - `properties` object — Literal string values, or { var: path } bindings resolved to typed values at dispatch time.
            - `description` string
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'DELAY', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Pauses the run.
            - `mode` 'duration' | 'until_date' | 'until_weekday' — How the wait is measured. Defaults to duration.
            - `duration` string — For mode duration.
            - `targetAt` string — ISO 8601 instant, for mode until_date.
            - `weekdays` integer[] — ISO weekdays 1=Mon..7=Sun, for mode until_weekday.
            - `windowStartMinutes` integer
            - `windowEndMinutes` integer
            - `timezone` string — IANA timezone. Load-bearing for until_weekday.
            - `description` string
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'DECISION', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Two-way branch. Emits YES / NO.
            - `logic` 'AND' | 'OR', required
            - `conditions` union[], required
              - …
            - `description` string
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'CASE', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — N-way switch on a person attribute.
            - `selectionPath` string, required — Person attribute (attributes.*) or extracted field (engagement.extracted.*) to switch on.
            - `branches` object[], required — Up to 10 branches. A case:default handle is always required.
              - …
            - `description` string
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'HTTP_REQUEST', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Calls an external HTTP endpoint. Emits SUCCESS or FAILED.
            - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required — HTTP method.
            - `url` string, required — Target URL. Supports {{variable}} placeholders.
            - `headers` object[] — Request headers as key/value pairs.
              - …
            - `body` object — Request body. mode none sends no body.
              - …
            - `credentialId` string — Deprecated/legacy: HttpCredential row id used to authenticate the request. Prefer credentialKey.
            - `credentialKey` string — Logical credential key; the pinned environment selects the secret.
            - `timeoutMs` integer — Request timeout in milliseconds. Max 30000 (30s).
            - `maxAttempts` integer — Max attempts including the first. Max 5.
            - `documentUrlTtlSeconds` integer — TTL (seconds, ≤86400) for presigned engagement.documents URLs this node emits. Default 86400.
        - object
          - `id` string, required — Node id, unique within the journey.
          - `kind` 'EXIT', required
          - `name` string — The label shown on the canvas. Required before publishing.
          - `position` object — Explicit canvas position. Omit it and the server auto-lays-out the graph top-down; only set it to preserve a hand-arranged layout.
            - `x` number, required
            - `y` number, required
          - `inputs` object — Terminal node.
            - `outcome` string
            - `nextInitiativeId` string — Chain into another initiative on exit.
    - `edges` object[], required — The connections between node handles.
      - `from` string, required — Source node id.
      - `to` string, required — Target node id.
      - `sourceHandle` string, required — The emitted signal that activates this edge (e.g. SENT, REPLIED, YES, case:<id>). A handle may wire to at most one node.
      - `metadata` object
        - `signalCategory` 'lifecycle' | 'system'
        - `signalDescription` string

## Other responses

- `400` — Validation failed or the request cannot proceed.
- `401` — Missing, malformed, or revoked API key.
- `404` — The resource does not exist in this organization.
- `409` — Conflicts with the current state (duplicates, wrong lifecycle state).
- `422` — The request is well-formed but semantically invalid.
- `429` — Rate limit exceeded — retry after `Retry-After`.
- `500` — Internal server error.
- `503` — Transient error — retry with a narrower request.

---

[API](https://skmtc.net/useboom/apis/boom-api.md) · [All operations](https://skmtc.net/useboom/apis/boom-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/useboom/boom-api/revisions/00f873e07076/schema)
