curl --request POST \
--url https://clientapi.woku.app/v1/nps/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
"<string>"
],
"npsToolId": "<string>"
}
'import requests
url = "https://clientapi.woku.app/v1/nps/invitations"
payload = {
"recipients": ["<string>"],
"npsToolId": "<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({recipients: ['<string>'], npsToolId: '<string>'})
};
fetch('https://clientapi.woku.app/v1/nps/invitations', 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/nps/invitations",
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([
'recipients' => [
'<string>'
],
'npsToolId' => '<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/nps/invitations"
payload := strings.NewReader("{\n \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\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/nps/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/nps/invitations")
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 \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"channel": "email",
"accepted": [
"<string>"
],
"rejected": [
{
"recipient": "<string>",
"reason": "invalid_recipient"
}
]
}{
"statusCode": 400,
"message": "<string>",
"error": "Bad Request"
}{
"statusCode": 403,
"message": "Authentication required",
"error": "Forbidden"
}Send the NPS survey by email or WhatsApp
Dispatches the NPS survey (company-level, or tool-specific via npsToolId) to a list of recipients. The response reports per-recipient acceptance: quarantined respondents and recipients blocked by WhatsApp credits or notification policy are listed in rejected instead of failing the request. WhatsApp sends consume one WhatsApp credit per recipient.
curl --request POST \
--url https://clientapi.woku.app/v1/nps/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
"<string>"
],
"npsToolId": "<string>"
}
'import requests
url = "https://clientapi.woku.app/v1/nps/invitations"
payload = {
"recipients": ["<string>"],
"npsToolId": "<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({recipients: ['<string>'], npsToolId: '<string>'})
};
fetch('https://clientapi.woku.app/v1/nps/invitations', 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/nps/invitations",
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([
'recipients' => [
'<string>'
],
'npsToolId' => '<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/nps/invitations"
payload := strings.NewReader("{\n \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\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/nps/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/nps/invitations")
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 \"recipients\": [\n \"<string>\"\n ],\n \"npsToolId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"channel": "email",
"accepted": [
"<string>"
],
"rejected": [
{
"recipient": "<string>",
"reason": "invalid_recipient"
}
]
}{
"statusCode": 400,
"message": "<string>",
"error": "Bad Request"
}{
"statusCode": 403,
"message": "Authentication required",
"error": "Forbidden"
}Authorizations
Company API key. Obtain this from your Woku dashboard under Settings > API Keys. The same key used for the v0 endpoints.
Body
Delivery channel for the invitations.
email, whatsapp Email addresses (email channel) or phone numbers with country code, digits only, e.g. 56912345678 (whatsapp channel).
1 - 100 elementsLanguage of the invitation template. Defaults to es.
es, en NPS tool to survey for. Omit to send the company-level NPS survey.
Response
Per-recipient dispatch summary. Sends are asynchronous.