AgentsCapabilitiesCapabilities

API request

Let the agent talk to external systems mid-call over HTTP.

An API request lets your agent pull data from another system during the call, or write it there: a ticket in your helpdesk, a lead in your CRM, an order status from your ERP.

VideoanleitungConfiguring an API request
The four-step wizard for creating an API request
The four-step wizard for creating an API request

How it works

Every enabled API request is offered to the language model as its own tool with typed parameters. The agent recognises the situation, collects the missing details in conversation, calls the API and works with whatever comes back.

Caller  ──▶  Agent recognises the situation
             Agent asks for missing details
             Agent calls your API      ──▶  your system
                                            responds
             Agent continues speaking  ◀──

You create one under Capabilities → Tools → API request → +, in a four-step wizard.

Step 1 — Basics

All three fields are required; the wizard will not advance without them.

FieldPurpose
Tool nameShort name, e.g. Create ticket. This is what you reference in the prompt.
What does the tool do?Its function and what it returns.
When should it be used?The situation in which the agent should call it.

The last two are concatenated into one description, and that is what the language model reads. It decides whether the tool gets called at all — so be concrete, not lengthy:

What does the tool do?
Creates a ticket for a general request — not an appointment,
not a transfer.

When should it be used?
Call it as soon as name and request have been captured in full.

Non-ASCII characters in the name are fine

Internally the tool needs a technical name. ScaleTalk maps umlauts (ä→ae, ö→oe, ü→ue, ß→ss) and replaces any other invalid character with _. Create ticket becomes Create_ticket; Rückruf anfragen becomes Rueckruf_anfragen. In the prompt you use the name as you typed it.

Step 2 — API configuration

When should the API be called?

ModeBehaviour
Dynamic (default)The agent decides mid-call when to call. For actions like creating a ticket or fetching data.
On call startRuns once at the start, before the greeting is spoken. For CRM lookups that personalise the call.

On call start is the same mechanism as caller context, which documents it in full, including the CSV variant that needs no API of your own. For that mode a timeout of 3000 ms is recommended so the caller is not left waiting for the greeting.

Endpoint

FieldDefaultMeaning
URLFull address including https://. Supports {{variable}} placeholders.
HTTP methodPOSTSee the table below
Execution textemptyWhat the agent says while the call runs
Timeout5000 msMaximum wait for the response
MethodUsed forHow parameters travel
GETRetrieve dataQuery string
POSTCreate new recordsJSON body
PUTReplace data entirelyJSON body
PATCHModify data partiallyJSON body
DELETEDelete dataQuery string

Execution text decides whether the agent sees the response

This is the most important setting on this page, and the most misunderstood.

Execution text filled → the agent speaks exactly that sentence and never sees your API's response. It cannot read a ticket number back.

Execution text empty → the agent receives the first 500 characters of the response and can carry on with it — read out a confirmation number, quote an order status, confirm an appointment.

Rule of thumb: set an execution text only when a fixed sentence is enough. The moment the agent should relay something from the response, leave it empty.

For longer workflows raise the timeout — 5 to 15 seconds is realistic. Anything beyond that leaves the caller waiting on the line.

Step 3 — Parameters and headers

Headers

Key/value pairs for authentication and content negotiation. Empty rows are dropped on save.

HeaderExample value
AuthorizationBearer sk-abc123xyz…
Content-Typeapplication/json
Acceptapplication/json

Dynamic parameters (JSON Schema)

Here you describe, as a JSON Schema, which values the agent should take from the conversation. The schema defines structure, not values — the agent fills those at call time.

{
  "type": "object",
  "properties": {
    "name":    { "type": "string", "description": "The caller's full name" },
    "request": { "type": "string", "description": "What it is about, in one or two sentences" },
    "priority": {
      "type": "string",
      "enum": ["low", "medium", "high"],
      "description": "How urgent the matter is"
    }
  },
  "required": ["name", "request"]
}
PropertyPurpose
typestring, number, boolean, array or object
descriptionExplains the parameter to the agent — important, truncated at 200 characters
enumAllowed values
requiredWhich parameters the agent must collect

The dialog offers ready examples (Simple fields, With options, Support ticket), validates your JSON live, and can tidy it via Format JSON.

Don't want to write JSON?

Describe the fields you need to an AI in one sentence and have it produce the schema — "Give me a JSON Schema with name and request, both required, each with a description." Paste the result here and format it.

Fixed parameters

Constant values sent on every call — API keys, tenant IDs, configuration flags:

{
  "apiKey": "your-api-key",
  "source": "phone"
}

What actually gets sent

Three sources are merged, weakest to strongest:

system variables  →  fixed parameters  →  parameters extracted by the agent
   (weakest)                                        (strongest)

On a key collision the value from the conversation always wins. URL placeholders are substituted from the same merged set.

System variables

ScaleTalk supplies these automatically — as parameters and as {{placeholders}} in the URL:

VariableMeaningExample
{{fromNumber}}The caller's number+4917612345678
{{toNumber}}The number dialled+4930123456789
{{callId}}Unique id for this callRM_abc123xyz
{{language}}The agent's language, multi when autode
https://crm.example.com/customers/{{fromNumber}}/tickets

Empty system variables are stripped before sending.

Step 4 — Review and test

The final step summarises everything and offers a real test call:

  1. Click Test — the wizard pre-fills sample values from your schema
  2. Adjust them and click Run test
  3. Inspect status code, response body and duration

The test runs server-side through ScaleTalk rather than from the browser, so there are no CORS problems and the call matches production. Requests to localhost and other loopback addresses are blocked, and the test timeout is capped at 30 seconds.

You can save once the name, both descriptions and the URL are set.

Limits

LimitValueWhat happens past it
API tools per agent10Only the first 10 enabled are registered; the rest are silently dropped
Tool description500 charsTruncated
Parameter description200 charsTruncated
Response used with no execution text500 charsTruncated
Timeout5000 ms defaultConfigurable per tool
Test-mode timeoutmax 30,000 msClamped

There is no limit on headers or parameters within a single tool.

What the agent gets on failure

CaseWhat reaches the agent
2xxWith execution text: nothing. Otherwise the first 500 characters of the response.
4xx / 5xx"The API request failed: HTTP <status>"
Timeout"The API request timed out."
Network error"Could not connect to the API."
Invalid parameters"Invalid parameters provided: <error>"

Write into the prompt what should happen in these cases — otherwise the agent improvises.

Integrating with n8n

The most common setup in practice is n8n: the automation platform receives the request, processes it and answers. No server of your own, and almost every common system is already connected there.

The flow

  1. In n8n add a Webhook node, method POST — it generates a URL
  2. Enter that URL as the URL in ScaleTalk
  3. The agent triggers the request; ScaleTalk sends the data to n8n
  4. n8n processes it — create a ticket, update a CRM, append a row in Google Sheets
  5. n8n responds, and the agent uses the response in the conversation

Building the workflow

A typical shape:

Webhook → prepare data → create ticket → Respond to Webhook

The last node must be Respond to Webhook, or the agent gets nothing back:

{
  "success": true,
  "ticket_id": "TK-20260218-042",
  "message": "Ticket created successfully"
}

With that the agent can say: "I've created ticket TK-20260218-042 for you."

Two n8n traps

Use the production URL, not the test URL — the test URL accepts a single call and only while the editor is open.

Almost always POST. Even when you are only fetching data, the n8n webhook usually expects POST. The method in ScaleTalk has to match the one on the webhook node.

n8n webhooks usually need no authentication — the URL itself is the secret. Treat it accordingly.

Referencing it in the prompt

Configuration alone triggers nothing. The system prompt decides when the tool is called:

### When the caller has a general question or wants a callback
### about a new topic:
1. Capture name and request in full.
2. Call the "Create ticket" tool.
3. Read the returned ticket number back to the caller.
4. If the tool fails: promise to pass the request on manually
   and end the call normally.

When it does not work

SymptomCauseFix
Tool is never called"When to use" too vague, tool disabled, or more than 10 tools on the agentSharpen the description, add trigger phrases, remove tools
Parameters arrive emptyMissing or unclear description in the schemaGive every parameter a concrete description
Agent does not read the responseExecution text is setClear the field
Response is cut offOver 500 charactersShorten it, put the key value first
The call failsURL, credentials, timeout or reachabilityCheck it in test mode

For debugging, a request inspector like webhook.site makes a good temporary endpoint — you see exactly what ScaleTalk sends.

On this page