Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
stages
Crear un stage dentro del blueprint del agente
curl --request POST \
  --url https://agents.studio.getsupervisor.ai/v1/agents/{agentId}/stages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "name": "qualification",
  "title": "Calificación",
  "goalPrompt": "Haz preguntas abiertas para entender el contexto y valida si el lead cumple criterios.",
  "promptInstructions": [
    "Pregunta por el presupuesto disponible",
    "Valida el uso actual de soluciones"
  ],
  "order": 2,
  "triggers": [
    {
      "condition": {
        "type": "expression",
        "value": "lead.qualified == true"
      },
      "nextStageName": "closing"
    }
  ],
  "metadata": {
    "author": "[email protected]"
  }
}
'
{
  "id": "b0d32725-47cc-43b3-b415-1304ca4f9e24",
  "agentId": "38f62697-0f4b-49bc-8a0c-67256f5af6ff",
  "blueprintId": "c09f3fa9-5082-4b0e-96b8-7426e672d88a",
  "name": "qualification",
  "title": "Calificación",
  "goalPrompt": "Haz preguntas abiertas para entender el contexto y valida si el lead cumple criterios.",
  "promptInstructions": [
    "Pregunta por el presupuesto disponible",
    "Valida el uso actual de soluciones"
  ],
  "order": 2,
  "triggers": [
    {
      "id": "a02a4142-8279-42b3-98a2-71ef712d9c25",
      "stageId": "b0d32725-47cc-43b3-b415-1304ca4f9e24",
      "blueprintId": "c09f3fa9-5082-4b0e-96b8-7426e672d88a",
      "condition": {
        "type": "expression",
        "value": "lead.qualified == true"
      },
      "nextStageName": "closing",
      "createdAt": "2025-10-05T19:47:55.000Z",
      "updatedAt": "2025-10-05T19:47:55.000Z"
    }
  ],
  "metadata": {
    "author": "[email protected]"
  },
  "createdAt": "2025-10-05T19:47:55.000Z",
  "updatedAt": "2025-10-05T19:47:55.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-workspace-id
string<uuid>
required

Identificador del workspace multi-tenant.

Path Parameters

agentId
string<uuid>
required

Identificador del agente

Body

application/json
name
string
required

Nombre slug utilizado para referenciar el stage desde otros triggers.

Minimum string length: 1
goalPrompt
string
required
Minimum string length: 1
title
string | null
promptInstructions
string[]
order
integer | null
Required range: x >= 0
triggers
object[] | null

Triggers opcionales que se crearán junto con el stage.

metadata
object

Response

Stage creado correctamente

id
string<uuid>
required
agentId
string<uuid>
required
blueprintId
string<uuid>
required
name
string
required

Nombre estable del stage (slug amigable para referencias entre triggers).

Minimum string length: 1
goalPrompt
string
required

Objetivo del stage expresado como prompt de alto nivel.

Minimum string length: 1
promptInstructions
string[]
required

Lista ordenada de instrucciones que contextualizan el goal prompt.

order
integer
required

Posición del stage dentro del blueprint.

triggers
object[]
required

Triggers asociados al stage.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
title
string | null

Título legible que se muestra en el editor.

metadata
object

Campos adicionales definidos por el workspace.