Emit one of your own events
curl --request POST \
--url https://clientapi.woku.app/v1/journey-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "crm.deal.won",
"subjectKey": "cliente-123",
"authHeader": "<string>",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
'import requests
url = "https://clientapi.woku.app/v1/journey-events"
payload = {
"event": "crm.deal.won",
"subjectKey": "cliente-123",
"authHeader": "<string>",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"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({
event: 'crm.deal.won',
subjectKey: 'cliente-123',
authHeader: '<string>',
contact: {email: 'cliente@example.com', phone: '56911111111'},
trackers: [{name: 'campaign', value: 'black-friday'}],
metadata: {}
})
};
fetch('https://clientapi.woku.app/v1/journey-events', 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/journey-events",
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([
'event' => 'crm.deal.won',
'subjectKey' => 'cliente-123',
'authHeader' => '<string>',
'contact' => [
'email' => 'cliente@example.com',
'phone' => '56911111111'
],
'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/journey-events"
payload := strings.NewReader("{\n \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\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/journey-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\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/journey-events")
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 \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"journeys": 123
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}v1 - journeys
Emit one of your own events
Eligible journeys whose moments listen for that name react. Operator-led v2 journeys require an open enrollment for that subject. Names starting with journey. are reserved.
POST
/
v1
/
journey-events
Emit one of your own events
curl --request POST \
--url https://clientapi.woku.app/v1/journey-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "crm.deal.won",
"subjectKey": "cliente-123",
"authHeader": "<string>",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"trackers": [
{
"name": "campaign",
"value": "black-friday"
}
],
"metadata": {}
}
'import requests
url = "https://clientapi.woku.app/v1/journey-events"
payload = {
"event": "crm.deal.won",
"subjectKey": "cliente-123",
"authHeader": "<string>",
"contact": {
"email": "cliente@example.com",
"phone": "56911111111"
},
"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({
event: 'crm.deal.won',
subjectKey: 'cliente-123',
authHeader: '<string>',
contact: {email: 'cliente@example.com', phone: '56911111111'},
trackers: [{name: 'campaign', value: 'black-friday'}],
metadata: {}
})
};
fetch('https://clientapi.woku.app/v1/journey-events', 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/journey-events",
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([
'event' => 'crm.deal.won',
'subjectKey' => 'cliente-123',
'authHeader' => '<string>',
'contact' => [
'email' => 'cliente@example.com',
'phone' => '56911111111'
],
'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/journey-events"
payload := strings.NewReader("{\n \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\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/journey-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\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/journey-events")
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 \"event\": \"crm.deal.won\",\n \"subjectKey\": \"cliente-123\",\n \"authHeader\": \"<string>\",\n \"contact\": {\n \"email\": \"cliente@example.com\",\n \"phone\": \"56911111111\"\n },\n \"trackers\": [\n {\n \"name\": \"campaign\",\n \"value\": \"black-friday\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"journeys": 123
}{
"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
application/json
Example:
"crm.deal.won"
Example:
"cliente-123"
Legacy body API key. Prefer Authorization: Bearer. Consumed by authentication and never forwarded to journey commands.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
How many journeys received it