trigger-user-journey
curl --request POST \
--url https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"userId": "alice"
}
]
}
'import requests
url = "https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter"
payload = { "users": [{ "userId": "alice" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({users: [{userId: 'alice'}]})
};
fetch('https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter', 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://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'users' => [
[
'userId' => 'alice'
]
]
]),
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://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter"
payload := strings.NewReader("{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"success": true,
"error": null
}캠페인
유저 여정 트리거
유저 여정을 API로 직접 트리거합니다. 개별 유저에게 유저 여정 시작 이벤트를 발행할 때 사용합니다.
POST
/
projects
/
{projectId}
/
user-journeys
/
{userJourneyId}
/
enter
trigger-user-journey
curl --request POST \
--url https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"userId": "alice"
}
]
}
'import requests
url = "https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter"
payload = { "users": [{ "userId": "alice" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({users: [{userId: 'alice'}]})
};
fetch('https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter', 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://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'users' => [
[
'userId' => 'alice'
]
]
]),
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://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter"
payload := strings.NewReader("{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/projects/{projectId}/user-journeys/{userJourneyId}/enter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"users\": [\n {\n \"userId\": \"alice\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"success": true,
"error": null
}주의 사항HTTP API를 이용한 유저 여정 진입의 경우, 유저 여정의 진입 시점 유형이 API 기반 진입으로 설정되어있는 경우에만 사용 가능합니다.
인증
POST /authenticate로 발급받은 인증 토큰을 Bearer 형식으로 전달합니다.
본문
application/json
유저 여정에 진입할 유저 목록 (최대 1,000명)
Show child attributes
Show child attributes
⌘I
