Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
schedule
Crear horario para el agente
curl --request POST \
  --url https://agents.studio.getsupervisor.ai/v1/agents/{agentId}/schedule \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "isEnabled": true,
  "timezone": "<string>",
  "outOfHoursBehavior": "offline",
  "rules": [
    {
      "dayOfWeek": "monday",
      "isEnabled": true,
      "slot": {
        "startTime": "<string>",
        "endTime": "<string>"
      }
    }
  ],
  "outOfHoursMessage": "<string>",
  "metadata": {}
}
'
{
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isEnabled": true,
  "timezone": "<string>",
  "outOfHoursBehavior": "offline",
  "rules": [
    {
      "dayOfWeek": "monday",
      "isEnabled": true,
      "slot": {
        "startTime": "<string>",
        "endTime": "<string>"
      }
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "outOfHoursMessage": "<string>",
  "metadata": {}
}

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

Payload para crear o reemplazar la configuración del horario del agente.

isEnabled
boolean
required
timezone
string
required
outOfHoursBehavior
enum<string>
required
Available options:
offline,
limited-service,
auto-message
rules
object[]
required
Required array length: 7 elements
outOfHoursMessage
string | null

Requerido cuando outOfHoursBehavior es auto-message.

metadata
object

Response

Horario creado

Horario estándar configurado para el agente.

agentId
string<uuid>
required
isEnabled
boolean
required

Activa o desactiva el uso del horario sobre el agente.

timezone
string
required

Identificador IANA del timezone (ej. America/Mexico_City).

outOfHoursBehavior
enum<string>
required

Comportamiento del agente fuera de la franja configurada.

Available options:
offline,
limited-service,
auto-message
rules
object[]
required

Arreglo con una regla por cada día de la semana (monday..sunday).

Required array length: 7 elements
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
outOfHoursMessage
string | null

Mensaje automático enviado cuando outOfHoursBehavior es auto-message.

metadata
object