Set trigger
Configure how people enter the journey by updating its ENTRY node: manual, segment (needs segmentId), cdp_event (needs eventName), or inbound (needs inboundAction and inboundChannelIds), with an optional frequency cap. Fields belonging to the other trigger types are cleared.
curl --request PATCH \
--url https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload = {
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": ["<string>"],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
segmentId: '<string>',
segmentName: '<string>',
eventName: '<string>',
inboundAction: 'WHATSAPP_MESSAGE',
inboundChannelIds: ['<string>'],
maxEnrollments: 4503599627370496,
enrollmentWindow: '<string>'
})
};
fetch('https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'segmentId' => '<string>',
'segmentName' => '<string>',
'eventName' => '<string>',
'inboundAction' => 'WHATSAPP_MESSAGE',
'inboundChannelIds' => [
'<string>'
],
'maxEnrollments' => 4503599627370496,
'enrollmentWindow' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload := strings.NewReader("{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"initiativeId": "<string>",
"version": 0,
"definition": {
"name": "<string>",
"actions": [
{
"id": "<string>",
"kind": "ENTRY",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"inputs": {
"description": "<string>",
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"sourceHandle": "<string>",
"metadata": {
"signalDescription": "<string>"
}
}
],
"id": "<string>",
"metadata": {
"initiativeType": "<string>",
"version": 0,
"cancelOnEvents": {
"eventNames": [
"<string>"
]
},
"environmentId": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Organization API key, sent as Authorization: Bearer boom_org_....
Path Parameters
A draft journey id, or the initiative id (resolves to its current draft).
1Body
How people enter the journey.
manual, segment, cdp_event, inbound Required for segment triggers. The segment's id (from segments_list / segments_get) — NOT its slug.
Required for cdp_event triggers.
Required for inbound triggers.
WHATSAPP_MESSAGE Required for inbound triggers: the channel ids to listen on. Must be NATIVE WhatsApp channels with an ONLINE sender; if you pass an ineligible one the error names the eligible ids. A channel may back only one published journey.
Frequency cap; both-or-neither with enrollmentWindow.
1 <= x <= 9007199254740991Frequency-cap window, e.g. '7d'.
Response
Success
Journey (workflow version) id.
The initiative this journey belongs to.
DRAFT (editable), PUBLISHED (live, frozen), or STOPPED (retired).
DRAFT, PUBLISHED, STOPPED Version number within the initiative.
-9007199254740991 <= x <= 9007199254740991The full journey graph.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload = {
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": ["<string>"],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
segmentId: '<string>',
segmentName: '<string>',
eventName: '<string>',
inboundAction: 'WHATSAPP_MESSAGE',
inboundChannelIds: ['<string>'],
maxEnrollments: 4503599627370496,
enrollmentWindow: '<string>'
})
};
fetch('https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'segmentId' => '<string>',
'segmentName' => '<string>',
'eventName' => '<string>',
'inboundAction' => 'WHATSAPP_MESSAGE',
'inboundChannelIds' => [
'<string>'
],
'maxEnrollments' => 4503599627370496,
'enrollmentWindow' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload := strings.NewReader("{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"segmentId\": \"<string>\",\n \"segmentName\": \"<string>\",\n \"eventName\": \"<string>\",\n \"inboundAction\": \"WHATSAPP_MESSAGE\",\n \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"initiativeId": "<string>",
"version": 0,
"definition": {
"name": "<string>",
"actions": [
{
"id": "<string>",
"kind": "ENTRY",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"inputs": {
"description": "<string>",
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>"
}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"sourceHandle": "<string>",
"metadata": {
"signalDescription": "<string>"
}
}
],
"id": "<string>",
"metadata": {
"initiativeType": "<string>",
"version": 0,
"cancelOnEvents": {
"eventNames": [
"<string>"
]
},
"environmentId": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}