curl --request POST \
--url https://clientapi.woku.app/v1/journeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Viaje de ventas",
"authHeader": "<string>",
"enabled": false,
"moments": [
{
"key": "<string>",
"enabled": true,
"trigger": {
"event": "<string>",
"stage": "<string>",
"delayMs": 1,
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"sequence": {
"attemptOffsetsMs": [
123
],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"schema": {},
"content": {
"subject": {},
"audience": {},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>"
}
]
}
'import requests
url = "https://clientapi.woku.app/v1/journeys"
payload = {
"name": "Viaje de ventas",
"authHeader": "<string>",
"enabled": False,
"moments": [
{
"key": "<string>",
"enabled": True,
"trigger": {
"event": "<string>",
"stage": "<string>",
"delayMs": 1,
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"sequence": {
"attemptOffsetsMs": [123],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"schema": {},
"content": {
"subject": {},
"audience": {},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>"
}
]
}
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({
name: 'Viaje de ventas',
authHeader: '<string>',
enabled: false,
moments: [
{
key: '<string>',
enabled: true,
trigger: {
event: '<string>',
stage: '<string>',
delayMs: 1,
payload: {
subjectKey: '<string>',
email: 'customer.email',
phone: 'customer.phone',
match: [{path: 'order.status', equals: 'delivered'}],
clientFields: [{key: '<string>', path: 'customer.tier'}]
}
},
sequence: {attemptOffsetsMs: [123], deadlineMs: 2, cooldownAfterResponseMs: 1},
name: '<string>',
description: '<string>',
order: 123,
toolSpec: {
fileId: '<string>',
imageUrl: '<string>',
descriptionEn: '<string>',
subject: {es: '<string>', en: '<string>'},
audience: {es: '<string>', en: '<string>'}
},
webhook: {
payload: {
subjectKey: '<string>',
email: 'customer.email',
phone: 'customer.phone',
match: [{path: 'order.status', equals: 'delivered'}],
clientFields: [{key: '<string>', path: 'customer.tier'}]
},
schema: {},
content: {
subject: {},
audience: {},
imageUrlPath: '<string>',
trackers: [{name: '<string>', path: 'order.id'}]
}
},
presentation: {imageUrl: '<string>', copy: {es: '<string>', en: '<string>'}},
fallbackAfterMs: 2,
fallbackFromStage: '<string>'
}
]
})
};
fetch('https://clientapi.woku.app/v1/journeys', 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",
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([
'name' => 'Viaje de ventas',
'authHeader' => '<string>',
'enabled' => false,
'moments' => [
[
'key' => '<string>',
'enabled' => true,
'trigger' => [
'event' => '<string>',
'stage' => '<string>',
'delayMs' => 1,
'payload' => [
'subjectKey' => '<string>',
'email' => 'customer.email',
'phone' => 'customer.phone',
'match' => [
[
'path' => 'order.status',
'equals' => 'delivered'
]
],
'clientFields' => [
[
'key' => '<string>',
'path' => 'customer.tier'
]
]
]
],
'sequence' => [
'attemptOffsetsMs' => [
123
],
'deadlineMs' => 2,
'cooldownAfterResponseMs' => 1
],
'name' => '<string>',
'description' => '<string>',
'order' => 123,
'toolSpec' => [
'fileId' => '<string>',
'imageUrl' => '<string>',
'descriptionEn' => '<string>',
'subject' => [
'es' => '<string>',
'en' => '<string>'
],
'audience' => [
'es' => '<string>',
'en' => '<string>'
]
],
'webhook' => [
'payload' => [
'subjectKey' => '<string>',
'email' => 'customer.email',
'phone' => 'customer.phone',
'match' => [
[
'path' => 'order.status',
'equals' => 'delivered'
]
],
'clientFields' => [
[
'key' => '<string>',
'path' => 'customer.tier'
]
]
],
'schema' => [
],
'content' => [
'subject' => [
],
'audience' => [
],
'imageUrlPath' => '<string>',
'trackers' => [
[
'name' => '<string>',
'path' => 'order.id'
]
]
]
],
'presentation' => [
'imageUrl' => '<string>',
'copy' => [
'es' => '<string>',
'en' => '<string>'
]
],
'fallbackAfterMs' => 2,
'fallbackFromStage' => '<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://clientapi.woku.app/v1/journeys"
payload := strings.NewReader("{\n \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\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://clientapi.woku.app/v1/journeys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/journeys")
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 \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"enabled": true,
"version": 123,
"moments": [
{
"key": "<string>",
"tool": "woku",
"enabled": true,
"trigger": {
"type": "manual",
"event": "<string>",
"stage": "<string>",
"anchor": "sent",
"delayMs": 1,
"window": {
"startHour": 11.5,
"endHour": 12.5,
"timeZone": "America/Santiago"
},
"verification": {
"mode": "woku_signature",
"header": "<string>",
"encoding": "hex",
"prefix": "<string>",
"signedPayload": "body",
"timestampHeader": "<string>"
},
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"channel": "email",
"sequence": {
"attemptOffsetsMs": [
123
],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1,
"sendWindow": {
"startHour": 11.5,
"endHour": 12.5,
"timeZone": "America/Santiago"
}
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolScope": "shared",
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"verification": {
"mode": "woku_signature",
"header": "<string>",
"encoding": "hex",
"prefix": "<string>",
"signedPayload": "body",
"timestampHeader": "<string>"
},
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"contentMode": "manual",
"schema": {},
"content": {
"description": {
"mode": "literal",
"value": "<string>"
},
"descriptionEn": {
"mode": "literal",
"value": "<string>"
},
"folderSecondaryKey": {
"mode": "literal",
"value": "<string>"
},
"folderName": {
"mode": "literal",
"value": "<string>"
},
"parentFolderSecondaryKey": {
"mode": "literal",
"value": "<string>"
},
"parentFolderName": {
"mode": "literal",
"value": "<string>"
},
"subject": {
"es": {
"mode": "literal",
"value": "<string>"
},
"en": {
"mode": "literal",
"value": "<string>"
}
},
"audience": {
"es": {
"mode": "literal",
"value": "<string>"
},
"en": {
"mode": "literal",
"value": "<string>"
}
},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>",
"toolRef": {
"type": "csat",
"id": "<string>"
}
}
],
"webhookSecret": "<string>",
"key": "<string>",
"name": "<string>",
"authoringVersion": 1,
"startMode": "operator",
"recipients": {
"ticketEmails": [
"<string>"
],
"planMembers": [
{
"userId": "<string>",
"role": "admin"
}
],
"ticketsEnabled": true,
"plansEnabled": true
},
"routing": {
"ticketsReady": true,
"plansReady": true,
"ticketDestinationId": "<string>",
"actionPlanGroupId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}Create a journey
The response carries webhookSecret once and only here: it is what signs legacy woku_signature calls. V2 url_token and sender_hmac credentials are configured separately per moment. Store the secret securely.
curl --request POST \
--url https://clientapi.woku.app/v1/journeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Viaje de ventas",
"authHeader": "<string>",
"enabled": false,
"moments": [
{
"key": "<string>",
"enabled": true,
"trigger": {
"event": "<string>",
"stage": "<string>",
"delayMs": 1,
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"sequence": {
"attemptOffsetsMs": [
123
],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"schema": {},
"content": {
"subject": {},
"audience": {},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>"
}
]
}
'import requests
url = "https://clientapi.woku.app/v1/journeys"
payload = {
"name": "Viaje de ventas",
"authHeader": "<string>",
"enabled": False,
"moments": [
{
"key": "<string>",
"enabled": True,
"trigger": {
"event": "<string>",
"stage": "<string>",
"delayMs": 1,
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"sequence": {
"attemptOffsetsMs": [123],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"schema": {},
"content": {
"subject": {},
"audience": {},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>"
}
]
}
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({
name: 'Viaje de ventas',
authHeader: '<string>',
enabled: false,
moments: [
{
key: '<string>',
enabled: true,
trigger: {
event: '<string>',
stage: '<string>',
delayMs: 1,
payload: {
subjectKey: '<string>',
email: 'customer.email',
phone: 'customer.phone',
match: [{path: 'order.status', equals: 'delivered'}],
clientFields: [{key: '<string>', path: 'customer.tier'}]
}
},
sequence: {attemptOffsetsMs: [123], deadlineMs: 2, cooldownAfterResponseMs: 1},
name: '<string>',
description: '<string>',
order: 123,
toolSpec: {
fileId: '<string>',
imageUrl: '<string>',
descriptionEn: '<string>',
subject: {es: '<string>', en: '<string>'},
audience: {es: '<string>', en: '<string>'}
},
webhook: {
payload: {
subjectKey: '<string>',
email: 'customer.email',
phone: 'customer.phone',
match: [{path: 'order.status', equals: 'delivered'}],
clientFields: [{key: '<string>', path: 'customer.tier'}]
},
schema: {},
content: {
subject: {},
audience: {},
imageUrlPath: '<string>',
trackers: [{name: '<string>', path: 'order.id'}]
}
},
presentation: {imageUrl: '<string>', copy: {es: '<string>', en: '<string>'}},
fallbackAfterMs: 2,
fallbackFromStage: '<string>'
}
]
})
};
fetch('https://clientapi.woku.app/v1/journeys', 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",
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([
'name' => 'Viaje de ventas',
'authHeader' => '<string>',
'enabled' => false,
'moments' => [
[
'key' => '<string>',
'enabled' => true,
'trigger' => [
'event' => '<string>',
'stage' => '<string>',
'delayMs' => 1,
'payload' => [
'subjectKey' => '<string>',
'email' => 'customer.email',
'phone' => 'customer.phone',
'match' => [
[
'path' => 'order.status',
'equals' => 'delivered'
]
],
'clientFields' => [
[
'key' => '<string>',
'path' => 'customer.tier'
]
]
]
],
'sequence' => [
'attemptOffsetsMs' => [
123
],
'deadlineMs' => 2,
'cooldownAfterResponseMs' => 1
],
'name' => '<string>',
'description' => '<string>',
'order' => 123,
'toolSpec' => [
'fileId' => '<string>',
'imageUrl' => '<string>',
'descriptionEn' => '<string>',
'subject' => [
'es' => '<string>',
'en' => '<string>'
],
'audience' => [
'es' => '<string>',
'en' => '<string>'
]
],
'webhook' => [
'payload' => [
'subjectKey' => '<string>',
'email' => 'customer.email',
'phone' => 'customer.phone',
'match' => [
[
'path' => 'order.status',
'equals' => 'delivered'
]
],
'clientFields' => [
[
'key' => '<string>',
'path' => 'customer.tier'
]
]
],
'schema' => [
],
'content' => [
'subject' => [
],
'audience' => [
],
'imageUrlPath' => '<string>',
'trackers' => [
[
'name' => '<string>',
'path' => 'order.id'
]
]
]
],
'presentation' => [
'imageUrl' => '<string>',
'copy' => [
'es' => '<string>',
'en' => '<string>'
]
],
'fallbackAfterMs' => 2,
'fallbackFromStage' => '<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://clientapi.woku.app/v1/journeys"
payload := strings.NewReader("{\n \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\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://clientapi.woku.app/v1/journeys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/journeys")
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 \"name\": \"Viaje de ventas\",\n \"authHeader\": \"<string>\",\n \"enabled\": false,\n \"moments\": [\n {\n \"key\": \"<string>\",\n \"enabled\": true,\n \"trigger\": {\n \"event\": \"<string>\",\n \"stage\": \"<string>\",\n \"delayMs\": 1,\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n }\n },\n \"sequence\": {\n \"attemptOffsetsMs\": [\n 123\n ],\n \"deadlineMs\": 2,\n \"cooldownAfterResponseMs\": 1\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"toolSpec\": {\n \"fileId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"descriptionEn\": \"<string>\",\n \"subject\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"audience\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"webhook\": {\n \"payload\": {\n \"subjectKey\": \"<string>\",\n \"email\": \"customer.email\",\n \"phone\": \"customer.phone\",\n \"match\": [\n {\n \"path\": \"order.status\",\n \"equals\": \"delivered\"\n }\n ],\n \"clientFields\": [\n {\n \"key\": \"<string>\",\n \"path\": \"customer.tier\"\n }\n ]\n },\n \"schema\": {},\n \"content\": {\n \"subject\": {},\n \"audience\": {},\n \"imageUrlPath\": \"<string>\",\n \"trackers\": [\n {\n \"name\": \"<string>\",\n \"path\": \"order.id\"\n }\n ]\n }\n },\n \"presentation\": {\n \"imageUrl\": \"<string>\",\n \"copy\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n },\n \"fallbackAfterMs\": 2,\n \"fallbackFromStage\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"enabled": true,
"version": 123,
"moments": [
{
"key": "<string>",
"tool": "woku",
"enabled": true,
"trigger": {
"type": "manual",
"event": "<string>",
"stage": "<string>",
"anchor": "sent",
"delayMs": 1,
"window": {
"startHour": 11.5,
"endHour": 12.5,
"timeZone": "America/Santiago"
},
"verification": {
"mode": "woku_signature",
"header": "<string>",
"encoding": "hex",
"prefix": "<string>",
"signedPayload": "body",
"timestampHeader": "<string>"
},
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
}
},
"channel": "email",
"sequence": {
"attemptOffsetsMs": [
123
],
"deadlineMs": 2,
"cooldownAfterResponseMs": 1,
"sendWindow": {
"startHour": 11.5,
"endHour": 12.5,
"timeZone": "America/Santiago"
}
},
"name": "<string>",
"description": "<string>",
"order": 123,
"toolScope": "shared",
"toolSpec": {
"fileId": "<string>",
"imageUrl": "<string>",
"descriptionEn": "<string>",
"subject": {
"es": "<string>",
"en": "<string>"
},
"audience": {
"es": "<string>",
"en": "<string>"
}
},
"webhook": {
"verification": {
"mode": "woku_signature",
"header": "<string>",
"encoding": "hex",
"prefix": "<string>",
"signedPayload": "body",
"timestampHeader": "<string>"
},
"payload": {
"subjectKey": "<string>",
"email": "customer.email",
"phone": "customer.phone",
"match": [
{
"path": "order.status",
"equals": "delivered"
}
],
"clientFields": [
{
"key": "<string>",
"path": "customer.tier"
}
]
},
"contentMode": "manual",
"schema": {},
"content": {
"description": {
"mode": "literal",
"value": "<string>"
},
"descriptionEn": {
"mode": "literal",
"value": "<string>"
},
"folderSecondaryKey": {
"mode": "literal",
"value": "<string>"
},
"folderName": {
"mode": "literal",
"value": "<string>"
},
"parentFolderSecondaryKey": {
"mode": "literal",
"value": "<string>"
},
"parentFolderName": {
"mode": "literal",
"value": "<string>"
},
"subject": {
"es": {
"mode": "literal",
"value": "<string>"
},
"en": {
"mode": "literal",
"value": "<string>"
}
},
"audience": {
"es": {
"mode": "literal",
"value": "<string>"
},
"en": {
"mode": "literal",
"value": "<string>"
}
},
"imageUrlPath": "<string>",
"trackers": [
{
"name": "<string>",
"path": "order.id"
}
]
}
},
"presentation": {
"imageUrl": "<string>",
"copy": {
"es": "<string>",
"en": "<string>"
}
},
"fallbackAfterMs": 2,
"fallbackFromStage": "<string>",
"toolRef": {
"type": "csat",
"id": "<string>"
}
}
],
"webhookSecret": "<string>",
"key": "<string>",
"name": "<string>",
"authoringVersion": 1,
"startMode": "operator",
"recipients": {
"ticketEmails": [
"<string>"
],
"planMembers": [
{
"userId": "<string>",
"role": "admin"
}
],
"ticketsEnabled": true,
"plansEnabled": true
},
"routing": {
"ticketsReady": true,
"plansReady": true,
"ticketDestinationId": "<string>",
"actionPlanGroupId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"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.
Body
"Viaje de ventas"
Legacy body API key. Prefer Authorization: Bearer. Consumed by authentication and never forwarded to journey commands.
Use 2 for the business-form contract. Existing v1 definitions keep their execution rules.
1, 2 Who starts the first moment. Response means a saved first answer, not opening its link.
operator, response, webhook Show child attributes
Show child attributes
A journey is born switched off. Turn it on when it is ready.
The moments of the journey. Each creates a woku, CSAT, CES, or NPS from toolSpec. New v2 moments default to shared within that moment; per_enrollment creates one tool per participation. Existing toolRef assignments are rejected. A zero-day afterStage delay means one hour. In v2 only the first moment can be manual. Later moments use webhook or afterStage; independent webhook settings also let a webhook advance a timed moment. fallbackAfterMs is the optional secondary wait for a webhook-primary moment, anchored to fallbackFromStage. Legacy definitions retain their triggers.
Show child attributes
Show child attributes
Response
Journey created
Show child attributes
Show child attributes
Legacy journey-wide signature secret, returned once. It is not the per-moment URL token or sender secret.
1, 2 operator, response, webhook Show child attributes
Show child attributes
Show child attributes
Show child attributes