Start an Omni agent run
curl --request POST \
--url https://omnicommerce.sg/api/v1/agents/general/runs \
--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/runs', 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/runs"
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
Start an Omni agent run
Queue the general Omni agent and return immediately with the run in queued state. Poll the URL in the Location header (GET /api/v1/agents/general/runs/{runId}), honoring Retry-After. Requires agents:invoke. The request body matches invoke.
POST
/
api
/
v1
/
agents
/
general
/
runs
Start an Omni agent run
curl --request POST \
--url https://omnicommerce.sg/api/v1/agents/general/runs \
--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/runs', 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/runs"
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 run was queued.
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