Operations
Operations

Set lead callback

Set up, change, rotate or switch off this agent's lead callback: a webhook URL a business's website form, CRM, Zapier or Make zap, or phone system posts a lead to, after which the agent rings that lead back within seconds from a workspace number. Use it when the operator wants the agent to call new enquiries back. The first call needs fromNumber and returns webhookUrl; give that URL to the operator for their form or tool to POST to, as JSON, form-encoded or multipart, with a phone field (phone, mobile, tel …), an optional name (name, or first_name and last_name) and any other fields, which the agent sees as context. The URL is shown ONLY when it is minted (first set-up or rotate: true); later calls return the settings without it, and rotate: true mints a new URL and kills the old one. Calls answer on the PUBLISHED agent and are metered like any call. Compliance: by default calls are placed only in the Telemarketing Standard hours (Monday to Friday 9:00 to 20:00, Saturday 9:00 to 17:00, never Sundays or national public holidays) in the trigger's timezone, and a lead who arrives outside them is called when the hours next open. A custom callingWindow may narrow or widen those hours: a prompt callback that answers the lead's own enquiry is not a telemarketing call under the Do Not Call Register Regulations 2017, s 6(7), but widening is the operator's decision and worth checking with their adviser, and public holidays apply only to the default window. The agent should say it is an AI assistant, which comes from the agent's AI disclosure setting (turn it on with update_agent_settings if it is off). Numbers on the workspace do-not-call list are never called, and on every lead callback the agent can add a lead who asks not to be called again to that list, whether or not it has the add_to_do_not_call tool. Only Australian mobile and landline numbers are called. A number is never dialled twice at once; each trigger accepts at most 60 leads an hour, places at most 300 calls a day and holds at most 200 leads waiting for the window. The webhook URL is a secret: whoever has it can make the agent ring a number, and request logs can record it, so rotate it if it leaks. Read the current state and recent requests with get_lead_callback.

POST
/operations/set_lead_callback

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_lead_callback" \  -H "Content-Type: application/json" \  -d '{    "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
}