curl --request POST \
--url https://clientapi.woku.app/v1/journeys/{id}/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subjectKey": "cliente-123",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"authHeader": "<string>",
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
'import requests
url = "https://clientapi.woku.app/v1/journeys/{id}/enrollments"
payload = {
"subjectKey": "cliente-123",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"authHeader": "<string>",
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
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({
subjectKey: 'cliente-123',
contact: {email: 'cliente@example.com', phone: '56911111111'},
authHeader: '<string>',
trackers: [{name: 'campaign', value: 'black-friday'}],
metadata: {}
})
};
fetch('https://clientapi.woku.app/v1/journeys/{id}/enrollments', 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://clientapi.woku.app/v1/journeys/{id}/enrollments",
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([
'subjectKey' => 'cliente-123',
'contact' => [
'email' => 'cliente@example.com',
'phone' => '56911111111'
],
'authHeader' => '<string>',
'trackers' => [
[
'name' => 'campaign',
'value' => 'black-friday'
]
],
'metadata' => [
]
]),
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://clientapi.woku.app/v1/journeys/{id}/enrollments"
payload := strings.NewReader("{\n \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\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://clientapi.woku.app/v1/journeys/{id}/enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/journeys/{id}/enrollments")
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 \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"subjectKey": "<string>",
"journeyId": "<string>"
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}Enroll a subject in this journey
Starts an operator-led v2 participation without requiring its first answer. A v2 contact can have one unfinished participation per journey. The same subjectKey can start a new cycle after completion or stopping finishes; each cycle has a distinct enrollment id. Legacy definitions retain their enrollment behavior.
curl --request POST \
--url https://clientapi.woku.app/v1/journeys/{id}/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subjectKey": "cliente-123",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"authHeader": "<string>",
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
'import requests
url = "https://clientapi.woku.app/v1/journeys/{id}/enrollments"
payload = {
"subjectKey": "cliente-123",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"authHeader": "<string>",
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
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({
subjectKey: 'cliente-123',
contact: {email: 'cliente@example.com', phone: '56911111111'},
authHeader: '<string>',
trackers: [{name: 'campaign', value: 'black-friday'}],
metadata: {}
})
};
fetch('https://clientapi.woku.app/v1/journeys/{id}/enrollments', 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://clientapi.woku.app/v1/journeys/{id}/enrollments",
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([
'subjectKey' => 'cliente-123',
'contact' => [
'email' => 'cliente@example.com',
'phone' => '56911111111'
],
'authHeader' => '<string>',
'trackers' => [
[
'name' => 'campaign',
'value' => 'black-friday'
]
],
'metadata' => [
]
]),
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://clientapi.woku.app/v1/journeys/{id}/enrollments"
payload := strings.NewReader("{\n \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\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://clientapi.woku.app/v1/journeys/{id}/enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/journeys/{id}/enrollments")
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 \"subjectKey\": \"cliente-123\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"authHeader\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"subjectKey": "<string>",
"journeyId": "<string>"
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}Authorizations
Company secret API key.
Headers
Client-generated key to make the call safe to retry. A retry with the same key and operation returns the original result instead of acting again. Do not reuse it for new input: retries replay the original body. A different operation returns 422.
Path Parameters
Body
Your own key for who is enrolled: a customer id, an order, a ticket.
"cliente-123"
Where to reach the subject. At least one of email or phone.
Show child attributes
Show child attributes
Legacy body API key. Prefer Authorization: Bearer. Consumed by authentication and never forwarded to journey commands.
Show child attributes
Show child attributes
Anything you want kept with it