Invoke the Omni agent
curl --request POST \
--url https://omnicommerce.sg/api/v1/agents/general/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://omnicommerce.sg/api/v1/agents/general/invoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/agents/general/invoke"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"run_id": "<string>",
"thread_id": "<string>",
"status": "queued",
"messages": [
{
"type": "human",
"role": "user",
"content": "<string>",
"id": "<string>",
"name": "<string>",
"tool_calls": [
{
"name": "<string>",
"args": "<unknown>",
"id": "<string>"
}
],
"tool_call_id": "<string>"
}
],
"structured_output": {},
"approvals": [
{
"interrupt_instance_id": "<string>",
"tool_name": "<string>",
"tool_args": "<unknown>",
"message": "<string>"
}
],
"error": "<string>"
}Agents
Invoke the Omni agent
Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires agents:invoke.
A waiting call can take several minutes; raise the client timeout. Send decisions with the same thread_id to approve or reject a paused run. Omit config.enabled_tools to use the organization’s agent tools. Attach images on the latest user message as { type: "image", url } HTTP(S) URLs.
POST
/
api
/
v1
/
agents
/
general
/
invoke
Invoke the Omni agent
curl --request POST \
--url https://omnicommerce.sg/api/v1/agents/general/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://omnicommerce.sg/api/v1/agents/general/invoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/agents/general/invoke"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"run_id": "<string>",
"thread_id": "<string>",
"status": "queued",
"messages": [
{
"type": "human",
"role": "user",
"content": "<string>",
"id": "<string>",
"name": "<string>",
"tool_calls": [
{
"name": "<string>",
"args": "<unknown>",
"id": "<string>"
}
],
"tool_call_id": "<string>"
}
],
"structured_output": {},
"approvals": [
{
"interrupt_instance_id": "<string>",
"tool_name": "<string>",
"tool_args": "<unknown>",
"message": "<string>"
}
],
"error": "<string>"
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Body
application/json
Maximum string length:
120Required string length:
1 - 200Required string length:
1 - 64Maximum array length:
50Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
20Show child attributes
Show child attributes
Response
The agent finished or is waiting for approval.
Available options:
queued, running, completed, awaiting_approval, failed Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes