curl --request POST \
--url https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data '<string>'import requests
url = "https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: '<string>'
};
fetch('https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv', 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://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$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://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv")
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"] = 'text/csv'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"survey": {
"id": "<string>",
"enabled": true,
"questions": [
{}
],
"version": 123,
"closingMessage": "<string>"
},
"errors": [
{}
]
}{
"errors": [
{
"line": 123,
"reason": "<string>"
}
]
}{
"error": "not found"
}Replace the assistant's questionnaire from a CSV
Commits only when the file parses clean — any error and nothing is written. A successful import replaces the whole questionnaire and bumps its version; there is no row-level merge, because a questionnaire is one document, not a table of independent rows.
The file is held to the same rules as saving the assistant, so an
import can never store a survey the agent cannot load. A survey
without an id is given one (survey_ plus 12 hex digits) and keeps
it on every later import — answers are saved and resumed under it, so
a re-import must not orphan them. enabled is left as it was; turn
the survey on by saving the assistant with survey.enabled: true.
show_if values are stored in the form answers take: Yes against
a yes/no question becomes yes, an option is matched whatever its
case, and 3.0 against a number becomes 3. The closing message is
part of the questionnaire too: an import without one removes the old.
curl --request POST \
--url https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data '<string>'import requests
url = "https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: '<string>'
};
fetch('https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv', 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://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$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://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/console/assistants/{id}/survey.csv")
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"] = 'text/csv'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"survey": {
"id": "<string>",
"enabled": true,
"questions": [
{}
],
"version": 123,
"closingMessage": "<string>"
},
"errors": [
{}
]
}{
"errors": [
{
"line": 123,
"reason": "<string>"
}
]
}{
"error": "not found"
}