Crear slots de subida de documentos
curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"files": [
{
"filename": "manual-cobranza.pdf",
"contentType": "application/pdf"
},
{
"filename": "guion-llamadas.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
]
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/documents"
payload = { "files": [
{
"filename": "manual-cobranza.pdf",
"contentType": "application/pdf"
},
{
"filename": "guion-llamadas.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
] }
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-workspace-id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
files: [
{filename: 'manual-cobranza.pdf', contentType: 'application/pdf'},
{
filename: 'guion-llamadas.docx',
contentType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
}
]
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/documents', 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/documents",
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([
'files' => [
[
'filename' => 'manual-cobranza.pdf',
'contentType' => 'application/pdf'
],
[
'filename' => 'guion-llamadas.docx',
'contentType' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-workspace-id: <x-workspace-id>"
],
]);
$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/documents"
payload := strings.NewReader("{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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/documents")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"documents": [
{
"key": "__documents__/a44bb95e/7f3a1b2c/manual-cobranza.pdf",
"uploadUrl": "https://s3.amazonaws.com/bucket/__documents__/a44bb95e/7f3a1b2c/manual-cobranza.pdf?X-Amz-...",
"filename": "manual-cobranza.pdf"
},
{
"key": "__documents__/a44bb95e/9d4e5f6a/guion-llamadas.docx",
"uploadUrl": "https://s3.amazonaws.com/bucket/__documents__/a44bb95e/9d4e5f6a/guion-llamadas.docx?X-Amz-...",
"filename": "guion-llamadas.docx"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Documents
Crear slots de subida de documentos
Genera URLs presignadas para subir documentos al storage del workspace.
Cada archivo recibe un key único y un uploadUrl temporal (15 min) para subir
el contenido via PUT. Los key resultantes se referencian al crear agentes
u otros recursos que acepten documentos adjuntos.
POST
/
v1
/
documents
Crear slots de subida de documentos
curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"files": [
{
"filename": "manual-cobranza.pdf",
"contentType": "application/pdf"
},
{
"filename": "guion-llamadas.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
]
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/documents"
payload = { "files": [
{
"filename": "manual-cobranza.pdf",
"contentType": "application/pdf"
},
{
"filename": "guion-llamadas.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
] }
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-workspace-id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
files: [
{filename: 'manual-cobranza.pdf', contentType: 'application/pdf'},
{
filename: 'guion-llamadas.docx',
contentType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
}
]
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/documents', 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/documents",
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([
'files' => [
[
'filename' => 'manual-cobranza.pdf',
'contentType' => 'application/pdf'
],
[
'filename' => 'guion-llamadas.docx',
'contentType' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-workspace-id: <x-workspace-id>"
],
]);
$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/documents"
payload := strings.NewReader("{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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/documents")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"filename\": \"manual-cobranza.pdf\",\n \"contentType\": \"application/pdf\"\n },\n {\n \"filename\": \"guion-llamadas.docx\",\n \"contentType\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"documents": [
{
"key": "__documents__/a44bb95e/7f3a1b2c/manual-cobranza.pdf",
"uploadUrl": "https://s3.amazonaws.com/bucket/__documents__/a44bb95e/7f3a1b2c/manual-cobranza.pdf?X-Amz-...",
"filename": "manual-cobranza.pdf"
},
{
"key": "__documents__/a44bb95e/9d4e5f6a/guion-llamadas.docx",
"uploadUrl": "https://s3.amazonaws.com/bucket/__documents__/a44bb95e/9d4e5f6a/guion-llamadas.docx?X-Amz-...",
"filename": "guion-llamadas.docx"
}
]
}{
"code": "<string>",
"message": "<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.
Body
application/json
Solicita slots de subida para uno o más archivos.
Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Response
Slots de subida creados
Show child attributes
Show child attributes
⌘I
