curl --request PATCH \
--url https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Bienvenida (voz)",
"goalPrompt": "Saluda, identifica idioma y confirma si es cliente activo antes de continuar.",
"promptInstructions": [
"Pregunta si es cliente activo"
],
"order": 0,
"metadata": {
"updatedBy": "blueprint-editor@agents.studio"
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}"
payload = {
"title": "Bienvenida (voz)",
"goalPrompt": "Saluda, identifica idioma y confirma si es cliente activo antes de continuar.",
"promptInstructions": ["Pregunta si es cliente activo"],
"order": 0,
"metadata": { "updatedBy": "blueprint-editor@agents.studio" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Bienvenida (voz)',
goalPrompt: 'Saluda, identifica idioma y confirma si es cliente activo antes de continuar.',
promptInstructions: ['Pregunta si es cliente activo'],
order: 0,
metadata: {updatedBy: 'blueprint-editor@agents.studio'}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}', 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/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Bienvenida (voz)',
'goalPrompt' => 'Saluda, identifica idioma y confirma si es cliente activo antes de continuar.',
'promptInstructions' => [
'Pregunta si es cliente activo'
],
'order' => 0,
'metadata' => [
'updatedBy' => 'blueprint-editor@agents.studio'
]
]),
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/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}"
payload := strings.NewReader("{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blueprintId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"title": "<string>",
"goalPrompt": "<string>",
"promptInstructions": [],
"order": 123,
"triggers": [],
"metadata": {},
"variables": [],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "El trigger 'schedule_call' referencia a un stage inexistente"
}{
"statusCode": 404,
"error": "Not Found",
"message": "No existe un stage con el identificador proporcionado"
}{
"statusCode": 409,
"error": "Conflict",
"message": "No es posible modificar stages de un blueprint ya publicado"
}Actualizar un stage existente
Aplica cambios parciales sobre un stage del blueprint. Antes de persistir se corre la
validación completa del grafo; si falla retorna 400 INVALID_GRAPH. Tras la
actualización exitosa se publica un evento BlueprintStageUpdated que el job
StagesSyncJob consume para sincronizar el grafo completo con el proveedor externo
sin bloquear la respuesta del endpoint.
curl --request PATCH \
--url https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Bienvenida (voz)",
"goalPrompt": "Saluda, identifica idioma y confirma si es cliente activo antes de continuar.",
"promptInstructions": [
"Pregunta si es cliente activo"
],
"order": 0,
"metadata": {
"updatedBy": "blueprint-editor@agents.studio"
}
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}"
payload = {
"title": "Bienvenida (voz)",
"goalPrompt": "Saluda, identifica idioma y confirma si es cliente activo antes de continuar.",
"promptInstructions": ["Pregunta si es cliente activo"],
"order": 0,
"metadata": { "updatedBy": "blueprint-editor@agents.studio" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Bienvenida (voz)',
goalPrompt: 'Saluda, identifica idioma y confirma si es cliente activo antes de continuar.',
promptInstructions: ['Pregunta si es cliente activo'],
order: 0,
metadata: {updatedBy: 'blueprint-editor@agents.studio'}
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}', 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/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Bienvenida (voz)',
'goalPrompt' => 'Saluda, identifica idioma y confirma si es cliente activo antes de continuar.',
'promptInstructions' => [
'Pregunta si es cliente activo'
],
'order' => 0,
'metadata' => [
'updatedBy' => 'blueprint-editor@agents.studio'
]
]),
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/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}"
payload := strings.NewReader("{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/blueprints/{blueprintId}/stages/{stageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Bienvenida (voz)\",\n \"goalPrompt\": \"Saluda, identifica idioma y confirma si es cliente activo antes de continuar.\",\n \"promptInstructions\": [\n \"Pregunta si es cliente activo\"\n ],\n \"order\": 0,\n \"metadata\": {\n \"updatedBy\": \"blueprint-editor@agents.studio\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blueprintId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"title": "<string>",
"goalPrompt": "<string>",
"promptInstructions": [],
"order": 123,
"triggers": [],
"metadata": {},
"variables": [],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "El trigger 'schedule_call' referencia a un stage inexistente"
}{
"statusCode": 404,
"error": "Not Found",
"message": "No existe un stage con el identificador proporcionado"
}{
"statusCode": 409,
"error": "Conflict",
"message": "No es posible modificar stages de un blueprint ya publicado"
}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.
Path Parameters
Identificador del agente
Identificador del blueprint del agente (se obtiene de GET /v1/agents/{agentId}/blueprints)
Identificador del stage dentro del blueprint del agente
Body
11x >= 0Reemplaza el conjunto completo de triggers del stage: lo que mandes es lo que
queda, y los que no aparezcan se eliminan. Omitir el campo es «no los toques»;
mandar [] los borra todos. Es la única forma de editar los triggers en bloque.
Al aplicarse se revalida que no haya dos decisiones equivalentes en el stage.
Show child attributes
Show child attributes
Response
Stage actualizado
Nombre estable del stage (slug amigable para referencias entre triggers).
1Título legible que se muestra en el editor.
Objetivo del stage expresado como prompt de alto nivel.
1Lista ordenada de instrucciones que contextualizan el goal prompt.
Posición del stage dentro del blueprint.
Triggers asociados al stage.
Show child attributes
Show child attributes
Campos adicionales definidos por el workspace.
Variables detectadas en el goal prompt e instrucciones del stage.
