POST with a fixed JSON body. A Custom request sends whatever you wrote. The Setup guide tab of every action shows the same facts for that action.
In the app: Sidebar → Agent Settings → APIs, open an action, then Overview, Test, Requests or Setup guide (
/home?settings=http_tools).What does SmartAlex send?
The diagram shows how the format you chose decides what goes to your endpoint.Which headers are sent?
What is the body of a standard request?
APOST with JSON whose keys are sorted alphabetically at every level.
How does a custom request work?
You write the body. Only text values are changed, so numbers, booleans and nesting go out exactly as written. A special$request entry sets the method, headers and query and is not sent as part of the body:
methodisGETorPOST(defaultPOST). AGEThas no body, so put values inquery.- You cannot set
Host,Content-Type,Content-Length,Cookie,User-Agentor anyX-SmartAlex-header. - Nothing is signed and no
X-SmartAlex-*header is added. Your endpoint trusts the key you place in the request.
Which placeholders can a custom request use?
Use Insert in the Body box, or type them in text values.
To fall back, join values with a bar:
${arg.phone|caller.number} uses the first one that is not empty.
A placeholder that is not recognised is refused when you save. If a number is needed and the caller’s is not known, the action does not run. The agent is told to ask the caller for it.
What does SmartAlex expect back?
There are no retries. The one exception is a Sign-in key: if your API answers
401, SmartAlex signs in again and sends the request once more. See Error codes.
The agent reads about the first 4,500 characters of what you return, so keep replies short. Return a one-line instruction such as hint so the agent knows what to say next:
In a test, a
200 reply that carries the API’s own failure, such as "status": "failed", "success": false or an error message, is shown as “Your API reported an error” so you can fix it before going live.What should my reply not contain?
- Stack traces. The agent may read them aloud.
- Details the caller should not hear, such as full card or ID numbers. Anything you return can be spoken.
- Large payloads. Send the few fields the agent needs.
Questions people ask
Can I send a GET request?
Can I send a GET request?
Yes, in a Custom request. Choose GET next to the URL and put values in the
query. The standard format is always a POST.Can I put my key in the URL?
Can I put my key in the URL?
Not safely. A key in the address is saved in plain text. The form offers Move it to API key, which moves it into the request’s query and keeps it encrypted.
Can I upload files or send form data?
Can I upload files or send form data?
No. The body is JSON, and replies must be JSON or text.
Related
Signature verification
Check the signature on a standard request.
Security restrictions
Which addresses and replies are refused.

