Answer the survey in a closing email
The last click in a support conversation. The token arrives only in the mail that closes a ticket, and only when the ticket was solved, was not spam or quarantined, and the requester wrote at least once. It is answered once; a second answer and an unknown token are answered identically, so nothing here can be used to test whether a token exists. No proof of work: unlike every other unauthenticated write under /v1/support this one cannot be aimed at a stranger, and taxing somebody for answering a question we asked them is the wrong trade.
curl -X POST https://api.auray.ai/v1/support/csat \
-H "content-type: application/json" \
-d '{
"token": "…",
"score": 1
}'const res = await fetch("https://api.auray.ai/v1/support/csat", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify({
"token": "…",
"score": 1
}),
});
console.log(await res.json());import requests
r = requests.post(
"https://api.auray.ai/v1/support/csat",
json={
"token": "…",
"score": 1
},
)
r.raise_for_status()
print(r.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
body := []byte(`{
"token": "…",
"score": 1
}`)
req, err := http.NewRequest("POST", "https://api.auray.ai/v1/support/csat", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/support/csat");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"token" => "…",
"score" => 1,
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
require "json"
uri = URI("https://api.auray.ai/v1/support/csat")
req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req.body = {
"token" => "…",
"score" => 1
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"token": "…",
"score": 1
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/support/csat"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.auray.ai/v1/support/csat");
var body = """
{
"token": "…",
"score": 1
}
""";
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"recorded": true
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}Authorizations
No key needed — this document is public.
Thank you. recorded is false when the token was unknown, or already answered (and, for a comment, already commented); the cases are deliberately indistinguishable.
support_score_invalid — the score is not a whole number from one to five. Nothing was recorded.
support_link_invalid — the token is not the shape of a survey link we issue. A well-formed token that is unknown or already answered is not refused: it is the 200 with recorded: false.
Too many attempts.
Was this page helpful?
curl -X POST https://api.auray.ai/v1/support/csat \
-H "content-type: application/json" \
-d '{
"token": "…",
"score": 1
}'const res = await fetch("https://api.auray.ai/v1/support/csat", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify({
"token": "…",
"score": 1
}),
});
console.log(await res.json());import requests
r = requests.post(
"https://api.auray.ai/v1/support/csat",
json={
"token": "…",
"score": 1
},
)
r.raise_for_status()
print(r.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
body := []byte(`{
"token": "…",
"score": 1
}`)
req, err := http.NewRequest("POST", "https://api.auray.ai/v1/support/csat", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/support/csat");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"token" => "…",
"score" => 1,
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
require "json"
uri = URI("https://api.auray.ai/v1/support/csat")
req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req.body = {
"token" => "…",
"score" => 1
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"token": "…",
"score": 1
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/support/csat"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.auray.ai/v1/support/csat");
var body = """
{
"token": "…",
"score": 1
}
""";
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"recorded": true
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}