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"
}Crea un viaje
La respuesta contiene webhookSecret solo aquí: firma las llamadas legacy woku_signature. Las credenciales v2 url_token y sender_hmac se configuran por separado en cada momento. Guarda el secreto de forma segura.
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"
}Autorizaciones
Clave API secreta de la empresa.
Encabezados
Clave generada por el cliente para reintentar con seguridad. Un reintento con la misma clave y operación devuelve el resultado original. No reutilices la clave con datos nuevos: se reproduce el cuerpo original. Una operación diferente devuelve 422.
Cuerpo
"Viaje de ventas"
Clave de API legacy en el cuerpo. Prefiere Authorization: Bearer. La consume la autenticación y nunca se envía a los comandos del viaje.
Usa 2 para el contrato del formulario de negocio. Las definiciones v1 existentes conservan sus reglas de ejecución.
1, 2 Quién inicia el primer momento. El modo response exige una primera respuesta guardada; abrir el enlace no inicia el viaje.
operator, response, webhook Show child attributes
Show child attributes
Un viaje nace apagado. Enciéndelo cuando esté listo.
Los momentos del viaje. Cada uno crea un woku, CSAT, CES o NPS a partir de toolSpec. Los momentos nuevos de v2 usan shared por defecto dentro de ese momento; per_enrollment crea una herramienta por participación. Se rechazan las asignaciones de herramientas existentes mediante toolRef. Una espera afterStage de cero días equivale a una hora. En v2 solo el primer momento puede ser manual. Los posteriores usan webhook o afterStage; la configuración independiente de webhook también permite adelantar un momento temporal. fallbackAfterMs es la espera secundaria opcional de un momento cuyo disparador principal es webhook, con origen en fallbackFromStage. Las definiciones anteriores conservan sus disparadores.
Show child attributes
Show child attributes
Respuesta
Viaje creado
Show child attributes
Show child attributes
Secreto de firma global legacy, devuelto una vez. No es el token URL ni el secreto del emisor de cada momento.
1, 2 operator, response, webhook Show child attributes
Show child attributes
Show child attributes
Show child attributes