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, optionally narrowed to an inboundKeyword; an Instagram message trigger can also ignore story replies or story mentions with inboundStoryReplies / inboundStoryMentions), with an optional frequency cap, or an optional parallelRunsBy on cdp_event to give one person a concurrent run per event-property value. 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>",
"inboundChannelIds": [
"<string>"
],
"inboundKeyword": "<string>",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<string>"
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload = {
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundChannelIds": ["<string>"],
"inboundKeyword": "<string>",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<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>',
inboundChannelIds: ['<string>'],
inboundKeyword: '<string>',
maxEnrollments: 4503599627370496,
enrollmentWindow: '<string>',
parallelRunsBy: '<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>',
'inboundChannelIds' => [
'<string>'
],
'inboundKeyword' => '<string>',
'maxEnrollments' => 4503599627370496,
'enrollmentWindow' => '<string>',
'parallelRunsBy' => '<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"initiativeId": "<string>",
"status": "DRAFT",
"version": 0,
"definition": {
"name": "<string>",
"actions": [
{
"id": "<string>",
"kind": "ENTRY",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"inputs": {
"description": "<string>",
"triggerType": "manual",
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"inboundKeyword": "<string>",
"inboundMatchMode": "EXACT",
"inboundStoryReplies": "handle",
"inboundStoryMentions": "handle",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<string>"
}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"sourceHandle": "<string>",
"metadata": {
"signalCategory": "lifecycle",
"signalDescription": "<string>"
}
}
],
"id": "<string>",
"metadata": {
"initiativeType": "<string>",
"version": 0,
"cancelOnEvents": {
"eventNames": [
"<string>"
],
"matchRunKey": true
},
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Path Parameters
Body
Required for inbound triggers. INSTAGRAM_COMMENT / FACEBOOK_COMMENT listen to public comments on the account's posts instead of DMs; they require Instagram or Messenger channels whose connection was granted comment permission, and enroll the commenter without opening a conversation.
WHATSAPP_MESSAGE, SMS_MESSAGE, INSTAGRAM_MESSAGE, MESSENGER_MESSAGE, INSTAGRAM_COMMENT, FACEBOOK_COMMENT Required for inbound triggers: the channel ids to listen on. Must be NATIVE WhatsApp, SMS, Instagram or Messenger channels that are not deleted — WhatsApp and SMS additionally need an ONLINE sender, Instagram and Messenger have no sender row and need none (a Messenger Page still on the V1 bridge is withheld as NOT_NATIVE); if you pass an ineligible one the error names the eligible ids. For a comment action, only Instagram and Messenger channels are valid. Several published journeys may share one channel as long as their keywords differ: publishing a rule whose keyword (or blank catch-all) is already taken on that channel is refused with INBOUND_CHANNEL_TAKEN. Each arriving message enrols exactly one of them, the most specific matching rule, ties going to the older initiative.
The word the inbound message must match for this journey to enrol — e.g. 'PRECIO'. Blank or absent means the trigger is the catch-all and fires on ANY message arriving on the channel, which is almost never what you want beside other journeys on the same number. Several journeys may share one channel as long as their keywords differ — two rules with the same keyword on one channel, or two blank ones, are refused at publish with INBOUND_CHANNEL_TAKEN. The keyword is matched accent-, case- and punctuation-insensitively, and stored normalized.
How inboundKeyword is matched: EXACT (the message is only-the-word), ALL_WORDS (the message contains all-the-words, in any order), or CONTAINS (the message contains-the-word, adjacent and in order). All three are word-based, so no mode ever matches inside a longer word ('precioso' does not match 'precio'). Defaults to EXACT. Ignored when inboundKeyword is blank.
EXACT, CONTAINS, ALL_WORDS Instagram message triggers only. What this journey does with a reply to one of the brand's OWN Instagram stories (the story is attached for the agent): 'handle' (default) treats it like any other message — it can enroll and the AI answers it; 'ignore' leaves it out of this journey and sends no AI reply, including in a conversation this journey is already running. Story replies are often the highest-intent DMs the account gets, so ignore them only on purpose.
handle, ignore Instagram message triggers only. What this journey does with a story that TAGS the brand (someone mentioned the account in their own story — not a message to you): 'handle' (default) lets it enroll like any other message and the AI answers it (a mention in a conversation already attached to this journey still gets no automatic reply); 'ignore' leaves it out of this journey and sends no AI reply, including in a conversation this journey is already running. Without any journey, a story mention already gets no reply.
handle, ignore cdp_event only: let one person have several runs at once, one per distinct value of this event property (e.g. "paymentLinkId"). The journey becomes send only, the frequency cap is refused, and stop events match on the same property. See the ENTRY node docs in journeys_authoring_catalog. Cleared when the trigger changes to another type.
1Response
Success
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>",
"inboundChannelIds": [
"<string>"
],
"inboundKeyword": "<string>",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<string>"
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/{journeyId}/trigger"
payload = {
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundChannelIds": ["<string>"],
"inboundKeyword": "<string>",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<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>',
inboundChannelIds: ['<string>'],
inboundKeyword: '<string>',
maxEnrollments: 4503599627370496,
enrollmentWindow: '<string>',
parallelRunsBy: '<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>',
'inboundChannelIds' => [
'<string>'
],
'inboundKeyword' => '<string>',
'maxEnrollments' => 4503599627370496,
'enrollmentWindow' => '<string>',
'parallelRunsBy' => '<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<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 \"inboundChannelIds\": [\n \"<string>\"\n ],\n \"inboundKeyword\": \"<string>\",\n \"maxEnrollments\": 4503599627370496,\n \"enrollmentWindow\": \"<string>\",\n \"parallelRunsBy\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"initiativeId": "<string>",
"status": "DRAFT",
"version": 0,
"definition": {
"name": "<string>",
"actions": [
{
"id": "<string>",
"kind": "ENTRY",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"inputs": {
"description": "<string>",
"triggerType": "manual",
"segmentId": "<string>",
"segmentName": "<string>",
"eventName": "<string>",
"inboundAction": "WHATSAPP_MESSAGE",
"inboundChannelIds": [
"<string>"
],
"inboundKeyword": "<string>",
"inboundMatchMode": "EXACT",
"inboundStoryReplies": "handle",
"inboundStoryMentions": "handle",
"maxEnrollments": 4503599627370496,
"enrollmentWindow": "<string>",
"parallelRunsBy": "<string>"
}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"sourceHandle": "<string>",
"metadata": {
"signalCategory": "lifecycle",
"signalDescription": "<string>"
}
}
],
"id": "<string>",
"metadata": {
"initiativeType": "<string>",
"version": 0,
"cancelOnEvents": {
"eventNames": [
"<string>"
],
"matchRunKey": true
},
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}