Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
stages
/
{stageId}
/
triggers
Crear trigger para un stage
curl --request POST \
  --url https://agents.studio.getsupervisor.ai/v1/agents/{agentId}/stages/{stageId}/triggers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data @- <<EOF
{
  "condition": {
    "type": "expression",
    "value": "lead.intent == 'closing'"
  },
  "nextStageName": "closing"
}
EOF
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "blueprintId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "condition": {
    "type": "intent",
    "value": "<string>",
    "metadata": {}
  },
  "nextStageName": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

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

stageId
string<uuid>
required

Identificador del stage dentro del blueprint del agente

Body

application/json

Payload base para crear o actualizar triggers asociados a un stage.

condition
object
required

Condición evaluada para activar la transición al siguiente stage.

nextStageName
string
required
Minimum string length: 1

Response

Trigger creado

id
string<uuid>
required
stageId
string<uuid>
required
blueprintId
string<uuid>
required
condition
object
required

Condición evaluada para activar la transición al siguiente stage.

nextStageName
string
required

Nombre del siguiente stage al que se transicionará.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required