curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/catalogs/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "voice",
"scope": "workspace",
"workspaceId": "a44bb95e-9f01-4d19-8b62-1f6f2b8e8363",
"name": "Valentina MX",
"description": "Voz femenina cálida para campañas LATAM",
"metadata": {
"language": "es-MX",
"gender": "female",
"tone": "warm"
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/catalogs/items"
payload = {
"type": "voice",
"scope": "workspace",
"workspaceId": "a44bb95e-9f01-4d19-8b62-1f6f2b8e8363",
"name": "Valentina MX",
"description": "Voz femenina cálida para campañas LATAM",
"metadata": {
"language": "es-MX",
"gender": "female",
"tone": "warm"
}
}
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({
type: 'voice',
scope: 'workspace',
workspaceId: 'a44bb95e-9f01-4d19-8b62-1f6f2b8e8363',
name: 'Valentina MX',
description: 'Voz femenina cálida para campañas LATAM',
metadata: {language: 'es-MX', gender: 'female', tone: 'warm'}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/catalogs/items', 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-prod.studio.getsupervisor.ai/v1/catalogs/items",
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([
'type' => 'voice',
'scope' => 'workspace',
'workspaceId' => 'a44bb95e-9f01-4d19-8b62-1f6f2b8e8363',
'name' => 'Valentina MX',
'description' => 'Voz femenina cálida para campañas LATAM',
'metadata' => [
'language' => 'es-MX',
'gender' => 'female',
'tone' => 'warm'
]
]),
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-prod.studio.getsupervisor.ai/v1/catalogs/items"
payload := strings.NewReader("{\n \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\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-prod.studio.getsupervisor.ai/v1/catalogs/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/catalogs/items")
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 \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "language",
"systemIdentifier": "<string>",
"scope": "global",
"name": "<string>",
"description": "<string>",
"isActive": true,
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"links": {
"self": "<string>",
"catalog": "<string>"
},
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Crear ítem de catálogo
Registra un nuevo ítem en el catálogo seleccionado. Para scope=workspace debe enviarse
el header x-workspace-id. Requiere el scope catalogs:write.
curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/catalogs/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "voice",
"scope": "workspace",
"workspaceId": "a44bb95e-9f01-4d19-8b62-1f6f2b8e8363",
"name": "Valentina MX",
"description": "Voz femenina cálida para campañas LATAM",
"metadata": {
"language": "es-MX",
"gender": "female",
"tone": "warm"
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/catalogs/items"
payload = {
"type": "voice",
"scope": "workspace",
"workspaceId": "a44bb95e-9f01-4d19-8b62-1f6f2b8e8363",
"name": "Valentina MX",
"description": "Voz femenina cálida para campañas LATAM",
"metadata": {
"language": "es-MX",
"gender": "female",
"tone": "warm"
}
}
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({
type: 'voice',
scope: 'workspace',
workspaceId: 'a44bb95e-9f01-4d19-8b62-1f6f2b8e8363',
name: 'Valentina MX',
description: 'Voz femenina cálida para campañas LATAM',
metadata: {language: 'es-MX', gender: 'female', tone: 'warm'}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/catalogs/items', 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-prod.studio.getsupervisor.ai/v1/catalogs/items",
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([
'type' => 'voice',
'scope' => 'workspace',
'workspaceId' => 'a44bb95e-9f01-4d19-8b62-1f6f2b8e8363',
'name' => 'Valentina MX',
'description' => 'Voz femenina cálida para campañas LATAM',
'metadata' => [
'language' => 'es-MX',
'gender' => 'female',
'tone' => 'warm'
]
]),
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-prod.studio.getsupervisor.ai/v1/catalogs/items"
payload := strings.NewReader("{\n \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\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-prod.studio.getsupervisor.ai/v1/catalogs/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/catalogs/items")
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 \"type\": \"voice\",\n \"scope\": \"workspace\",\n \"workspaceId\": \"a44bb95e-9f01-4d19-8b62-1f6f2b8e8363\",\n \"name\": \"Valentina MX\",\n \"description\": \"Voz femenina cálida para campañas LATAM\",\n \"metadata\": {\n \"language\": \"es-MX\",\n \"gender\": \"female\",\n \"tone\": \"warm\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "language",
"systemIdentifier": "<string>",
"scope": "global",
"name": "<string>",
"description": "<string>",
"isActive": true,
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"links": {
"self": "<string>",
"catalog": "<string>"
},
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Identificador del workspace multi-tenant. Obligatorio al autenticar con Authorization: Bearer, donde su ausencia devuelve 400 Workspace context is required. Con x-api-key es opcional: la llave ya identifica a su workspace y lo que mandes aquí se ignora.
Body
Payload para registrar un nuevo ítem en el catálogo.
language, message_style, tone_style, tag, voice, webhook_event Determina si el ítem es global o específico del workspace que realiza la llamada.
global, workspace 1 - 1201 - 500Metadata específica dependiente del tipo de catálogo.
Workspace objetivo cuando scope es workspace. Se omite para ítems globales.
Identificador técnico único dentro del catálogo. Si se omite se genera desde el nombre.
1 - 120^[a-z0-9]+(?:[-_][a-z0-9]+)*$Response
Ítem creado correctamente.
Representación de un ítem de catálogo disponible para los agentes.
Tipo lógico de catálogo al que pertenece el ítem.
language, message_style, tone_style, tag, voice, webhook_event Identificador técnico único dentro del catálogo (snake-case o kebab-case).
Determina si el ítem aplica globalmente o a un workspace específico.
global, workspace Metadata específica dependiente del tipo de catálogo.
Enlaces HATEOAS mínimos para la navegación entre catálogos.
Show child attributes
Show child attributes
Workspace propietario cuando scope es workspace.
