Skip to main content
POST
Call an agent
Call an agent to get a response to your request.

Endpoint

Parameters

string
required
ID of the agent to call

Request Body

string
required
The prompt or request to send to the agent
string
Optional conversation ID for continuing an existing conversation

Response

string
required
Unique identifier for this interaction thread
string
required
Identifier for the conversation
string
required
ID of the agent that was called
boolean
required
Whether the call was successful
string
required
The agent’s response text
object
Optional structured data returned by the agent, null if no structured data

Authorizations

X-API-Key
string
header
required

API key provided by Headless Agents

Path Parameters

agent_id
string
required

ID of the agent to call

Body

application/json
request
string
required

The prompt or request to send to the agent

conversation_id
string

Optional conversation ID for continuing an existing conversation

Response

Successful response from agent

thread_id
string
required

Unique identifier for this interaction thread

conversation_id
string
required

Identifier for the conversation

agent_id
string
required

ID of the agent that was called

success
boolean
required

Whether the call was successful

response
string
required

The agent's response text

function_result
object | null
required

Optional structured data returned by the agent, null if no structured data