curl --request POST \
--url https://api.statisfy.com/v1/integrations/pendo/surveys/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"surveys": {
"account_id_field": "<string>",
"account_match": "<string>",
"create_missing_people": true,
"mode": "all_guides",
"selected_guides": [
"<string>"
],
"sentiment_survey_ids": [
"<string>"
]
},
"days": 7
}
'import requests
url = "https://api.statisfy.com/v1/integrations/pendo/surveys/preview"
payload = {
"surveys": {
"account_id_field": "<string>",
"account_match": "<string>",
"create_missing_people": True,
"mode": "all_guides",
"selected_guides": ["<string>"],
"sentiment_survey_ids": ["<string>"]
},
"days": 7
}
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({
surveys: {
account_id_field: '<string>',
account_match: '<string>',
create_missing_people: true,
mode: 'all_guides',
selected_guides: ['<string>'],
sentiment_survey_ids: ['<string>']
},
days: 7
})
};
fetch('https://api.statisfy.com/v1/integrations/pendo/surveys/preview', 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://api.statisfy.com/v1/integrations/pendo/surveys/preview",
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([
'surveys' => [
'account_id_field' => '<string>',
'account_match' => '<string>',
'create_missing_people' => true,
'mode' => 'all_guides',
'selected_guides' => [
'<string>'
],
'sentiment_survey_ids' => [
'<string>'
]
],
'days' => 7
]),
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://api.statisfy.com/v1/integrations/pendo/surveys/preview"
payload := strings.NewReader("{\n \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\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://api.statisfy.com/v1/integrations/pendo/surveys/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/pendo/surveys/preview")
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 \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\n}"
response = http.request(request)
puts response.read_body{
"failed_surveys": [
"<string>"
],
"known_people": 123,
"matched_by_crm_id": 123,
"rows": [
{
"response_id": "<string>",
"submitted_at_ms": 123,
"survey_kind": "guide",
"survey_name": "<string>",
"account_key": "<string>",
"comment": "<string>",
"email": "<string>",
"rating": 123
}
],
"skipped_guides": [
{
"id": "<string>",
"name": "<string>"
}
],
"skipped_sentiment_survey_ids": [
"<string>"
],
"total_responses": 123,
"without_email": 123
}Preview the Pendo survey job
Reads the NPS responses of the chosen surveys for the last days days and shows how a run would match them: the newest rows, how many responses have no email, how many find a Statisfy account by the chosen match, and how many are people Statisfy knows. It reads at most 5 guides and 5 Sentiment surveys, and lists the others as skipped. It stops after 45 seconds and lists what it did not read as skipped or failed. When account_id_field is left out, it uses the saved one, as a run does. The settings are not saved. A 409 means Pendo is not connected, or Pendo rejected the key: an admin fixes the connection in Statisfy’s app. A 422 means Pendo refused the call (a wrong region comes with its own message). A 404 means Pendo did not find the requested item. A 502 means Pendo did not answer or is rate limited: try again in a minute. Needs integrations:write: the rows hold emails and comments.
curl --request POST \
--url https://api.statisfy.com/v1/integrations/pendo/surveys/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"surveys": {
"account_id_field": "<string>",
"account_match": "<string>",
"create_missing_people": true,
"mode": "all_guides",
"selected_guides": [
"<string>"
],
"sentiment_survey_ids": [
"<string>"
]
},
"days": 7
}
'import requests
url = "https://api.statisfy.com/v1/integrations/pendo/surveys/preview"
payload = {
"surveys": {
"account_id_field": "<string>",
"account_match": "<string>",
"create_missing_people": True,
"mode": "all_guides",
"selected_guides": ["<string>"],
"sentiment_survey_ids": ["<string>"]
},
"days": 7
}
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({
surveys: {
account_id_field: '<string>',
account_match: '<string>',
create_missing_people: true,
mode: 'all_guides',
selected_guides: ['<string>'],
sentiment_survey_ids: ['<string>']
},
days: 7
})
};
fetch('https://api.statisfy.com/v1/integrations/pendo/surveys/preview', 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://api.statisfy.com/v1/integrations/pendo/surveys/preview",
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([
'surveys' => [
'account_id_field' => '<string>',
'account_match' => '<string>',
'create_missing_people' => true,
'mode' => 'all_guides',
'selected_guides' => [
'<string>'
],
'sentiment_survey_ids' => [
'<string>'
]
],
'days' => 7
]),
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://api.statisfy.com/v1/integrations/pendo/surveys/preview"
payload := strings.NewReader("{\n \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\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://api.statisfy.com/v1/integrations/pendo/surveys/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/pendo/surveys/preview")
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 \"surveys\": {\n \"account_id_field\": \"<string>\",\n \"account_match\": \"<string>\",\n \"create_missing_people\": true,\n \"mode\": \"all_guides\",\n \"selected_guides\": [\n \"<string>\"\n ],\n \"sentiment_survey_ids\": [\n \"<string>\"\n ]\n },\n \"days\": 7\n}"
response = http.request(request)
puts response.read_body{
"failed_surveys": [
"<string>"
],
"known_people": 123,
"matched_by_crm_id": 123,
"rows": [
{
"response_id": "<string>",
"submitted_at_ms": 123,
"survey_kind": "guide",
"survey_name": "<string>",
"account_key": "<string>",
"comment": "<string>",
"email": "<string>",
"rating": 123
}
],
"skipped_guides": [
{
"id": "<string>",
"name": "<string>"
}
],
"skipped_sentiment_survey_ids": [
"<string>"
],
"total_responses": 123,
"without_email": 123
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
Response
Successful Response
Was this page helpful?