Captura una reseña de woku o una respuesta NPS desde el SDK móvil
curl --request POST \
--url https://clientapi.woku.app/v1/captures \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'x-woku-idempotency-key: <x-woku-idempotency-key>' \
--header 'x-woku-key: <api-key>' \
--data '
{
"kind": "woku",
"dispatchToken": "<string>",
"id": "<string>",
"targetId": "<string>",
"rating": 5,
"score": 9,
"comment": "<string>",
"audio": {
"uri": "<string>",
"mimeType": "<string>",
"durationMs": 123
},
"respondent": {
"email": "<string>",
"phone": "<string>",
"externalId": "<string>"
}
}
'import requests
url = "https://clientapi.woku.app/v1/captures"
payload = {
"kind": "woku",
"dispatchToken": "<string>",
"id": "<string>",
"targetId": "<string>",
"rating": 5,
"score": 9,
"comment": "<string>",
"audio": {
"uri": "<string>",
"mimeType": "<string>",
"durationMs": 123
},
"respondent": {
"email": "<string>",
"phone": "<string>",
"externalId": "<string>"
}
}
headers = {
"authorization": "<authorization>",
"x-woku-idempotency-key": "<x-woku-idempotency-key>",
"x-woku-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
'x-woku-idempotency-key': '<x-woku-idempotency-key>',
'x-woku-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
kind: 'woku',
dispatchToken: '<string>',
id: '<string>',
targetId: '<string>',
rating: 5,
score: 9,
comment: '<string>',
audio: {uri: '<string>', mimeType: '<string>', durationMs: 123},
respondent: {email: '<string>', phone: '<string>', externalId: '<string>'}
})
};
fetch('https://clientapi.woku.app/v1/captures', 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/captures",
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([
'kind' => 'woku',
'dispatchToken' => '<string>',
'id' => '<string>',
'targetId' => '<string>',
'rating' => 5,
'score' => 9,
'comment' => '<string>',
'audio' => [
'uri' => '<string>',
'mimeType' => '<string>',
'durationMs' => 123
],
'respondent' => [
'email' => '<string>',
'phone' => '<string>',
'externalId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>",
"x-woku-idempotency-key: <x-woku-idempotency-key>",
"x-woku-key: <api-key>"
],
]);
$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/captures"
payload := strings.NewReader("{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("x-woku-idempotency-key", "<x-woku-idempotency-key>")
req.Header.Add("x-woku-key", "<api-key>")
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/captures")
.header("authorization", "<authorization>")
.header("x-woku-idempotency-key", "<x-woku-idempotency-key>")
.header("x-woku-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/captures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["x-woku-idempotency-key"] = '<x-woku-idempotency-key>'
request["x-woku-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"kind": "woku",
"status": "accepted",
"id": "<string>",
"remoteId": "<string>"
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}v1 - captures
Captura una reseña de woku o una respuesta NPS desde el SDK móvil
POST
/
v1
/
captures
Captura una reseña de woku o una respuesta NPS desde el SDK móvil
curl --request POST \
--url https://clientapi.woku.app/v1/captures \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'x-woku-idempotency-key: <x-woku-idempotency-key>' \
--header 'x-woku-key: <api-key>' \
--data '
{
"kind": "woku",
"dispatchToken": "<string>",
"id": "<string>",
"targetId": "<string>",
"rating": 5,
"score": 9,
"comment": "<string>",
"audio": {
"uri": "<string>",
"mimeType": "<string>",
"durationMs": 123
},
"respondent": {
"email": "<string>",
"phone": "<string>",
"externalId": "<string>"
}
}
'import requests
url = "https://clientapi.woku.app/v1/captures"
payload = {
"kind": "woku",
"dispatchToken": "<string>",
"id": "<string>",
"targetId": "<string>",
"rating": 5,
"score": 9,
"comment": "<string>",
"audio": {
"uri": "<string>",
"mimeType": "<string>",
"durationMs": 123
},
"respondent": {
"email": "<string>",
"phone": "<string>",
"externalId": "<string>"
}
}
headers = {
"authorization": "<authorization>",
"x-woku-idempotency-key": "<x-woku-idempotency-key>",
"x-woku-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
'x-woku-idempotency-key': '<x-woku-idempotency-key>',
'x-woku-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
kind: 'woku',
dispatchToken: '<string>',
id: '<string>',
targetId: '<string>',
rating: 5,
score: 9,
comment: '<string>',
audio: {uri: '<string>', mimeType: '<string>', durationMs: 123},
respondent: {email: '<string>', phone: '<string>', externalId: '<string>'}
})
};
fetch('https://clientapi.woku.app/v1/captures', 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/captures",
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([
'kind' => 'woku',
'dispatchToken' => '<string>',
'id' => '<string>',
'targetId' => '<string>',
'rating' => 5,
'score' => 9,
'comment' => '<string>',
'audio' => [
'uri' => '<string>',
'mimeType' => '<string>',
'durationMs' => 123
],
'respondent' => [
'email' => '<string>',
'phone' => '<string>',
'externalId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>",
"x-woku-idempotency-key: <x-woku-idempotency-key>",
"x-woku-key: <api-key>"
],
]);
$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/captures"
payload := strings.NewReader("{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("x-woku-idempotency-key", "<x-woku-idempotency-key>")
req.Header.Add("x-woku-key", "<api-key>")
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/captures")
.header("authorization", "<authorization>")
.header("x-woku-idempotency-key", "<x-woku-idempotency-key>")
.header("x-woku-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/captures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["x-woku-idempotency-key"] = '<x-woku-idempotency-key>'
request["x-woku-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"woku\",\n \"dispatchToken\": \"<string>\",\n \"id\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 5,\n \"score\": 9,\n \"comment\": \"<string>\",\n \"audio\": {\n \"uri\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"durationMs\": 123\n },\n \"respondent\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"kind": "woku",
"status": "accepted",
"id": "<string>",
"remoteId": "<string>"
}{
"statusCode": 400,
"message": [
"email must be a valid email",
"password must be at least 8 characters"
],
"error": "Bad Request"
}Autorizaciones
PublishableKeybearer
Clave publicable de captura (pk_...), solo endpoints de captura.
Cuerpo
application/jsonmultipart/form-data
Opciones disponibles:
woku, nps, csat, ces Ejemplo:
"woku"
Token opaco de invitación o respuesta de una entrada preparada del viaje. Se consume después de guardar feedback; nunca se almacena en la reseña.
Maximum string length:
64Id de idempotencia generado por el cliente
Idioma hablado. Requerido cuando la captura incluye un archivo de audio.
Opciones disponibles:
es, en Id de destino: el wokuId para una captura de woku, el npsToolId (opcional) para una captura de NPS, o el csatToolId/cesToolId (requerido) para una captura de CSAT/CES (esas herramientas siempre son personalizadas).
Calificación por estrellas de Woku 1-5
Ejemplo:
5
Puntuación de NPS 0-10
Ejemplo:
9
Comentario de texto libre
Maximum string length:
3000Show child attributes
Show child attributes
Show child attributes
Show child attributes