Operations
Operations

Toggle share link

Enable or disable the agent's public share link, the unguessable /a/<slug> page that shows the agent without sign-in. enabled:true mints a link (or reuses the current one if already on) and returns shareUrl; enabled:false revokes it. Revoking then re-enabling mints a fresh link, so a leaked URL stays dead. Works on a published agent (it's an agent setting, not version content).

POST
/operations/set_agent_share

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token from Settings > API tokens.

In: header

Header Parameters

Idempotency-Key?string

A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/operations/set_agent_share" \  -H "Content-Type: application/json" \  -d '{    "enabled": true,    "agent": "string"  }'
{}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}

Set agent response guardrails POST

Set the draft's agent response guardrails: yes or no questions a classifier answers about each reply the agent writes, on calls and in chat. Use regenerateWhen for business rules, such as never quoting a price. On a call each reply plays at once and is checked as it plays; in chat a reply is checked before it is sent. Two lists. blockUnless: the reply is blocked unless one of these is yes, so the agent stops talking, such as staying quiet while a signed-off worker reports a job step by step; the caller can hear a blocked reply's first words before it stops, and a block ends the caller's turn, so their next words are judged on their own. regenerateWhen: yes means the reply broke the guardrail, so the reply is cut off, the agent says fillerLine on a call (chat shows nothing), and the model answers again with the broken question in its context; a second break in the same caller turn speaks fallbackLine instead. Each question has an id unique across both lists, the question, optional yes and no criteria, a threshold and readsJobContext; each list replaces the saved one. A blockUnless question also takes checks. agentResponse, the default, asks about the reply while it plays. userTurn asks about the caller's words alone, beside the model as it starts writing, and holds the reply's first words until it answers, which is usually before the first word exists; a yes lets the reply out, and when every userTurn answer is no the reply is dropped and never plays a word, so a one-word acknowledgement can't slip out before its check, unless the list also has agentResponse questions, in which case the reply plays and is cut off unless one of them says yes. blockUnless never makes the agent answer again. The classifier reads the job context, what the agent last said, what the caller has said since and the reply. jobContext is static text with {{variables}} filled; contextTools are tools whose latest result before the caller's last words becomes job context, each with an optional dot path field, such as start_job with field procedure; clearTools end the job; classifierTimeoutSecs; failMode. With context tools set, replies go out unchecked until one of them returns. Fields you leave out keep their saved values. Try a transcript with test_agent_response_guardrails, then publish. They run on calls, in chat and in text tests. An agent on speech to speech runs with separate listening, reply and voice models while these are on.

Update answering hours POST

Configure answering hours, the schedule that decides whether the agent takes a call live or does something else outside it, on agents.settings.answeringHours. Agent-level, NOT versioned. All fields optional; send only what changes. everyDay sets all seven days in one call ({open:"HH:MM", close:"HH:MM"} or null to close every day); mon/tue/wed/thu/fri/sat/sun each override an individual day (applied AFTER everyDay in the same call, so a day-specific value wins). Times are 24h HH:MM in the agent's effective timezone (agent timezone from General, else the workspace timezone); close may be "24:00"; a close earlier than open wraps past midnight. enabled turns the schedule on/off, off (default) means the agent answers around the clock. Turning enabled on is REFUSED while the closed message is empty (unless outsideHoursAction is 'agent'): call set_closed_message FIRST to write and render the message, then set_answering_hours enabled: true. To pause live calls indefinitely, call set_closed_message first, then send enabled: true, everyDay: null, outsideHoursAction: 'message'. Calls play that message and hang up until you disable answering hours or reopen a day; unlike set_manual_close, this pause does not expire at the next opening. outsideHoursAction picks what happens outside the window: 'message' (default) plays the pre-rendered closed message and ends the call; 'forward' rings forwardNumber instead, e.g. the bar's phone after the restaurant closes, and an unanswered forward still falls back to the closed message; 'agent' lets the agent answer every call and tells it, on each call, whether the business is open now and when it closes or next opens, for a business that takes orders or bookings for later while it's shut (no closed message needed). forwardNumber is required (and normalised to E.164) when outsideHoursAction is 'forward'. Use for 'only answer 9 to 5', 'close on weekends', 'we're open till 10pm on Fridays', 'stop taking calls after hours', 'forward calls to the bar after 11pm', or 'the agent keeps answering, but should know when we're open'.