List embed contexts
curl --request GET \
--url https://platform.perso.ai/api/console/b2c/contexts/ \
--header 'PersoPlatform-APIKey: <api-key>'import requests
url = "https://platform.perso.ai/api/console/b2c/contexts/"
headers = {"PersoPlatform-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'PersoPlatform-APIKey': '<api-key>'}};
fetch('https://platform.perso.ai/api/console/b2c/contexts/', 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://platform.perso.ai/api/console/b2c/contexts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"PersoPlatform-APIKey: <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"
"net/http"
"io"
)
func main() {
url := "https://platform.perso.ai/api/console/b2c/contexts/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.perso.ai/api/console/b2c/contexts/")
.header("PersoPlatform-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/console/b2c/contexts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "<string>",
"name": "<string>",
"tts_type": "<string>",
"model_style": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"greeting": "<string>",
"instructions": "<string>",
"background_image": "<string>",
"max_session_sec": 1073741823,
"is_active": true,
"embed_config": "<unknown>"
}
]Embed
List embed contexts
Returns the embed contexts on your account. An embed context is a reusable configuration for an embeddable AI-human widget — its avatar, voice, background, and prompt.
GET
/
api
/
console
/
b2c
/
contexts
/
List embed contexts
curl --request GET \
--url https://platform.perso.ai/api/console/b2c/contexts/ \
--header 'PersoPlatform-APIKey: <api-key>'import requests
url = "https://platform.perso.ai/api/console/b2c/contexts/"
headers = {"PersoPlatform-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'PersoPlatform-APIKey': '<api-key>'}};
fetch('https://platform.perso.ai/api/console/b2c/contexts/', 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://platform.perso.ai/api/console/b2c/contexts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"PersoPlatform-APIKey: <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"
"net/http"
"io"
)
func main() {
url := "https://platform.perso.ai/api/console/b2c/contexts/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.perso.ai/api/console/b2c/contexts/")
.header("PersoPlatform-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/console/b2c/contexts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "<string>",
"name": "<string>",
"tts_type": "<string>",
"model_style": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"greeting": "<string>",
"instructions": "<string>",
"background_image": "<string>",
"max_session_sec": 1073741823,
"is_active": true,
"embed_config": "<unknown>"
}
]Authorizations
PersoPlatform-APIKeycookieAuth
Response
200 - application/json
Maximum string length:
200Required range:
0 <= x <= 2147483647⌘I

