Ejecutar una acción de la tool para el agente indicado
curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"workspaceId": "11111111-1111-4111-8111-111111111111",
"agentId": "22222222-2222-4222-8222-222222222222",
"action": "scheduleCall",
"args": {
"proposed_datetime_iso": "2025-07-02T15:00:00-06:00",
"notes": "Confirmar demo",
"metadata": {
"leadId": "lead-987"
}
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute"
payload = {
"workspaceId": "11111111-1111-4111-8111-111111111111",
"agentId": "22222222-2222-4222-8222-222222222222",
"action": "scheduleCall",
"args": {
"proposed_datetime_iso": "2025-07-02T15:00:00-06:00",
"notes": "Confirmar demo",
"metadata": { "leadId": "lead-987" }
}
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Idempotency-Key": "<idempotency-key>",
"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>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaceId: '11111111-1111-4111-8111-111111111111',
agentId: '22222222-2222-4222-8222-222222222222',
action: 'scheduleCall',
args: {
proposed_datetime_iso: '2025-07-02T15:00:00-06:00',
notes: 'Confirmar demo',
metadata: {leadId: 'lead-987'}
}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute', 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/tools/{toolId}/execute",
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([
'workspaceId' => '11111111-1111-4111-8111-111111111111',
'agentId' => '22222222-2222-4222-8222-222222222222',
'action' => 'scheduleCall',
'args' => [
'proposed_datetime_iso' => '2025-07-02T15:00:00-06:00',
'notes' => 'Confirmar demo',
'metadata' => [
'leadId' => 'lead-987'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"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/tools/{toolId}/execute"
payload := strings.NewReader("{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/tools/{toolId}/execute")
.header("x-workspace-id", "<x-workspace-id>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute")
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["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"result": {
"status": "scheduled",
"scheduledFor": "2025-07-02T21:00:00Z",
"referenceId": "arn:aws:states:us-east-1:123456789012:execution:schedule-call:demo-001"
},
"metadata": {
"proposedAt": "2025-07-02T21:00:00Z",
"scheduledStart": "2025-07-02T21:00:00Z",
"scheduledEnd": "2025-07-02T21:30:00Z",
"scheduledStartLocal": "2025-07-02T16:00:00-05:00",
"scheduledEndLocal": "2025-07-02T16:30:00-05:00",
"timezone": "America/Mexico_City",
"windowSource": "standard_hours",
"windowDayOfWeek": "wednesday"
},
"toolId": "b4fec2ee-5b69-4f13-8502-0ba34d1a6c98",
"toolAgentConnectionId": "cb917332-1d51-4791-af92-35a714c916a4",
"providerRef": "retell-agent-001"
}{
"status": "ok",
"toolId": "<string>",
"toolExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {},
"metadata": {},
"toolAgentConnectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerRef": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Tools
Ejecutar una acción de la tool para el agente indicado
POST
/
v1
/
tools
/
{toolId}
/
execute
Ejecutar una acción de la tool para el agente indicado
curl --request POST \
--url https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"workspaceId": "11111111-1111-4111-8111-111111111111",
"agentId": "22222222-2222-4222-8222-222222222222",
"action": "scheduleCall",
"args": {
"proposed_datetime_iso": "2025-07-02T15:00:00-06:00",
"notes": "Confirmar demo",
"metadata": {
"leadId": "lead-987"
}
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute"
payload = {
"workspaceId": "11111111-1111-4111-8111-111111111111",
"agentId": "22222222-2222-4222-8222-222222222222",
"action": "scheduleCall",
"args": {
"proposed_datetime_iso": "2025-07-02T15:00:00-06:00",
"notes": "Confirmar demo",
"metadata": { "leadId": "lead-987" }
}
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Idempotency-Key": "<idempotency-key>",
"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>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaceId: '11111111-1111-4111-8111-111111111111',
agentId: '22222222-2222-4222-8222-222222222222',
action: 'scheduleCall',
args: {
proposed_datetime_iso: '2025-07-02T15:00:00-06:00',
notes: 'Confirmar demo',
metadata: {leadId: 'lead-987'}
}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute', 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/tools/{toolId}/execute",
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([
'workspaceId' => '11111111-1111-4111-8111-111111111111',
'agentId' => '22222222-2222-4222-8222-222222222222',
'action' => 'scheduleCall',
'args' => [
'proposed_datetime_iso' => '2025-07-02T15:00:00-06:00',
'notes' => 'Confirmar demo',
'metadata' => [
'leadId' => 'lead-987'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"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/tools/{toolId}/execute"
payload := strings.NewReader("{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/tools/{toolId}/execute")
.header("x-workspace-id", "<x-workspace-id>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/tools/{toolId}/execute")
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["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"11111111-1111-4111-8111-111111111111\",\n \"agentId\": \"22222222-2222-4222-8222-222222222222\",\n \"action\": \"scheduleCall\",\n \"args\": {\n \"proposed_datetime_iso\": \"2025-07-02T15:00:00-06:00\",\n \"notes\": \"Confirmar demo\",\n \"metadata\": {\n \"leadId\": \"lead-987\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"result": {
"status": "scheduled",
"scheduledFor": "2025-07-02T21:00:00Z",
"referenceId": "arn:aws:states:us-east-1:123456789012:execution:schedule-call:demo-001"
},
"metadata": {
"proposedAt": "2025-07-02T21:00:00Z",
"scheduledStart": "2025-07-02T21:00:00Z",
"scheduledEnd": "2025-07-02T21:30:00Z",
"scheduledStartLocal": "2025-07-02T16:00:00-05:00",
"scheduledEndLocal": "2025-07-02T16:30:00-05:00",
"timezone": "America/Mexico_City",
"windowSource": "standard_hours",
"windowDayOfWeek": "wednesday"
},
"toolId": "b4fec2ee-5b69-4f13-8502-0ba34d1a6c98",
"toolAgentConnectionId": "cb917332-1d51-4791-af92-35a714c916a4",
"providerRef": "retell-agent-001"
}{
"status": "ok",
"toolId": "<string>",
"toolExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {},
"metadata": {},
"toolAgentConnectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerRef": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"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.
Clave única por operación para asegurar idempotencia en requests mutativos.
Required string length:
16 - 128Path Parameters
Identificador de la tool en el catálogo, no su UUID (por ejemplo voice.calls,
custom.http o book_appointment_cal). Se obtiene de GET /v1/tools.
Body
application/json
Response
Ejecución completada de forma síncrona
Resultado alto nivel de la operación.
Available options:
ok, queued, error Identificador interno de la ejecución (útil para correlación y auditoría).
Respuesta específica del adapter.
Conexión utilizada para la ejecución, cuando aplica.
Identificador del recurso manipulado en el proveedor externo.
Mensaje adicional (warnings, información del adapter).
⌘I
