curl --request POST \
--url https://omnicommerce.ai/api/v1/agents/{agentId}/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.ai/api/v1/agents/{agentId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/agents/{agentId}/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>",
"memory_sources": [
{
"title": "<string>",
"href": "<string>",
"stale": true
}
]
}
],
"structured_output": {},
"approvals": [
{
"interrupt_instance_id": "<string>",
"tool_name": "<string>",
"tool_args": "<unknown>",
"message": "<string>"
}
],
"error": "<string>"
}Start a saved agent run
Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.
Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
Authorization
Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
Messages and conversation history
Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.
Conversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.
audience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.
Approvals
Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
curl --request POST \
--url https://omnicommerce.ai/api/v1/agents/{agentId}/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.ai/api/v1/agents/{agentId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/agents/{agentId}/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>",
"memory_sources": [
{
"title": "<string>",
"href": "<string>",
"stale": true
}
]
}
],
"structured_output": {},
"approvals": [
{
"interrupt_instance_id": "<string>",
"tool_name": "<string>",
"tool_args": "<unknown>",
"message": "<string>"
}
],
"error": "<string>"
}Authorizations
Body
Response
Queued for durable execution.