Agents
Create Agent
Creates a new Agent
POST
cURL
This endpoint lets you create a new agent.
Tokens are substituted anywhere they appear inside a string value, so you can interpolate them into URLs, headers, query params, and request body fields.
Tool Input Types
When defining a tool’sapi_schema, every parameter (in path_params, query_params, request_headers, or request_body) takes an input object that tells the platform where the value should come from at call time.
There are two input types:
type: description (LLM-extracted)
type: description (LLM-extracted)
The agent extracts the value from the conversation based on the description you provide.
type: value (hardcoded)
type: value (hardcoded)
Use a literal value, or a built-in template variable that gets substituted at call time. Template variables are written as You can also pass any plain string (e.g. an API key, a fixed endpoint, a constant flag):
%VARIABLE_NAME%.Built-in Template Variables
When aninput of type: "value" contains one of the following tokens, the platform replaces it with the appropriate runtime value before the tool is invoked:
| Variable | Replaced with |
|---|---|
%PHONE_NUMBER% | The customer’s WhatsApp phone number for the current session |
%IMAGE_URL% | The URL of the most recent image the customer sent (if the triggering message was an image) |
%CALLBACK_URL% | A unique callback URL for this tool invocation — POST to it to send a follow-up message back into the conversation |
Example
Aforward_message tool that posts the customer’s phone number, message text, attached image, and a reply callback to your own webhook:
%IMAGE_URL% is only populated when the message that triggered the tool call was an image. For text-only messages the field is omitted from the outgoing request.Authorizations
API key authentication. Pass your API key in the X-API-Key header.
Body
application/json
Maximum string length:
255Response
201 - application/json
Maximum string length:
255cURL