Allerto API

Agents

An agent is one JSON document. The console editor, allerto agents push, POST /v1/agents and the MCP tool create_agent all take exactly this object. The machine-readable schema is at /v1/agents/schema and in the reference.

Common keys

KeyTypeDefaultMeaning
typeinbound | outbound—Set at creation, never changes
nametext (2–100)—Internal name
personatext (1–80)—How the agent introduces itself ("Giulia")
languageit | enitLanguage of the conversation and of extracted text
modelgpt-live-1 | gemini-3.8-livegpt-live-1Live voice model; gemini-3.8-live is required for mcp tools
voicevoice idmodel defaultA voice of the chosen model (bossa… / Erinome…); or customVoiceId (GPT-Live only)
instructionstext (10–12000)—What the agent does. Outbound agents may use {{input}} placeholders
resultlist of fields[]Data extracted after the call (at least one for inbound)
deliveryobjectsandboxWhere call.completed goes: sandbox, webhook, email or both
reviewon_issues | always | neverinbound on_issues, outbound neverWhen an operator must check the data before it is delivered
transferobjectnoneHand the call to an operator, see below
mcpobjectnoneYour MCP server: its tools during the call, see Tools during calls
recordingbooleanfalseRecord the audio of phone calls; the agent announces it, see Privacy

Inbound keys

KeyTypeMeaning
greetingtext (10–1000)First sentence when someone calls

Numbers belong to your account: Allerto buys them and assigns them to it. You route each one to any of your inbound agents with PUT /v1/numbers/{id} ({"agent": "<id>"}) or in the console, and every agent shows the numbers it answers on (numbers in the agent object). An agent from another account is refused with different_account.

Clients are an optional grouping (GET/POST /v1/clients). DELETE /v1/clients/{id} removes one: its agents are archived, its queued calls cancelled and its console login removed, while its calls and usage stay in your history. A client whose numbers are still active is refused with client_has_numbers; its external_id can be reused afterwards.

Outbound keys

KeyTypeDefaultMeaning
openingtext with {{input}}—First sentence when the person answers
inputslist of fields[]Data you pass with every call; required ones are enforced
calling.callerIdE.164an active number of the accountCaller ID; must be one of your numbers, checked on publish and again before each call
calling.identityCheckbooleantrueConfirm the person before revealing why you call
calling.hours{days, from, to}Mon–Sat 09:00–20:00Calling window, Italian time; within Mon–Sat 08:00–21:00
calling.maxAttempts1–53Attempts when nobody answers (retries after 15 min, 1 h, 3 h)
calling.autoCallbackbooleantrueCall back automatically when the person asks for a later time

Transfer to an operator

"transfer": {
  "to": "+390212345678",
  "when": "gas leaks, flooding or other emergencies",
  "hours": { "days": [1, 2, 3, 4, 5], "from": "09:00", "to": "18:00" },
  "announcement": "La metto in contatto con un operatore, resti in linea.",
  "musicUrl": "https://example.com/hold.mp3"
}

When the person asks to speak with an operator or a real person (or in the situations of when), the agent may ask once for their name and reason, then says the announcement and the call is transferred to to. Only to is required.

The operator sees the Allerto number the person called (Italian networks block calls from abroad that show an Italian mobile number, so the caller's own number cannot be passed through); the caller's number is in the call data. If nobody answers within 25 seconds, the person hears that no operator is available and that their request has been recorded. A transfer lasts at most 30 minutes. The call keeps what was collected before the transfer, with outcome: "transferred" and a transfer object (see Calls).

Fields

inputs and result use the same field shape:

{
  "key": "pay_by",
  "label": "Promised date",
  "type": "date",
  "required": false,
  "options": [],
  "when": { "field": "answer", "equals": "will_pay" },
  "description": "Only if they commit to a date"
}
KeyMeaning
keyLowercase letters, digits and _; unique in the list. Appears in data and webhooks
labelHuman name, also used by the agent when asking
typetext, number, boolean, select, date (YYYY-MM-DD), phone, email
requiredMissing required values become issues (and trigger review for inbound agents)
optionsAllowed values for select
whenResult fields only: required only when another field has a value
descriptionExtra guidance for extraction

Domain outcomes (promise to pay, dispute, confirmed appointment) belong in a select result field. The call outcome stays generic across sectors.

Examples

Inbound:

{
  "type": "inbound",
  "name": "Fault reports",
  "persona": "Giulia",
  "greeting": "Good morning, this is Giulia, the virtual assistant of Studio Ferrario. How can I help?",
  "instructions": "Collect fault reports for the buildings we manage. Ask one question at a time.",
  "result": [
    { "key": "caller_name", "label": "Name", "type": "text", "required": true },
    {
      "key": "callback_phone",
      "label": "Callback number",
      "type": "phone",
      "required": true
    },
    {
      "key": "address",
      "label": "Building address",
      "type": "text",
      "required": true
    },
    {
      "key": "description",
      "label": "Description",
      "type": "text",
      "required": true
    }
  ],
  "delivery": { "mode": "email", "email": { "to": ["office@example.com"] } }
}

Outbound: see the Quickstart.

Drafts, versions and concurrency

StepAPICLI
CreatePOST /v1/agents {"config", "client"?}allerto agents push file.json
EditPUT /v1/agents/{id}/draft {"config", "revision"}allerto agents push file.json
CheckPOST /v1/agents/validate {"config"}allerto agents validate file.json
PreviewPOST /v1/agents/{id}/preview {"inputs"}allerto agents preview <id>
PublishPOST /v1/agents/{id}/publish {"revision"}allerto agents publish <id>
HistoryGET /v1/agents/{id}/versions—
ArchivePOST /v1/agents/{id}/archiveallerto agents archive <id>

Every save needs the current revision. If someone else saved in between you get 409 revision_conflict with the current revision in details: reload, merge, save again. Publishing creates an immutable version; calls always record which version spoke.

Validation errors carry a path per problem (for example opening or result.2.when), so a program can point at the exact field.