Execute an AOP
curl --request POST \
--url https://omnicommerce.sg/api/v1/aop/{aopId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_inputs": {
"company": "Acme Corp",
"quarter": "Q1 2024"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_inputs: {company: 'Acme Corp', quarter: 'Q1 2024'}})
};
fetch('https://omnicommerce.sg/api/v1/aop/{aopId}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/aop/{aopId}/execute"
payload = { "user_inputs": {
"company": "Acme Corp",
"quarter": "Q1 2024"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "started",
"thread_id": "agent-aop-run_1",
"sync_server": "https://omnicommerce.sg",
"trigger_type": "api",
"message": "Task execution started successfully. Use the thread_id to track progress.",
"aop_id": "aop_1",
"aop_title": "Market Research Report Generator",
"base_prompt": "Generate a comprehensive market research report",
"final_prompt": "Generate a comprehensive market research report\n\n--- User Inputs ---\ncompany: Acme Corp\n",
"aop_config": {
"agentId": "research"
}
}AOPs
Execute an AOP
Start an AOP run and return immediately with a thread_id. Poll GET /api/v1/threads/{thread_id}/status. Requires aops:write.
POST
/
api
/
v1
/
aop
/
{aopId}
/
execute
Execute an AOP
curl --request POST \
--url https://omnicommerce.sg/api/v1/aop/{aopId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_inputs": {
"company": "Acme Corp",
"quarter": "Q1 2024"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_inputs: {company: 'Acme Corp', quarter: 'Q1 2024'}})
};
fetch('https://omnicommerce.sg/api/v1/aop/{aopId}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/aop/{aopId}/execute"
payload = { "user_inputs": {
"company": "Acme Corp",
"quarter": "Q1 2024"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "started",
"thread_id": "agent-aop-run_1",
"sync_server": "https://omnicommerce.sg",
"trigger_type": "api",
"message": "Task execution started successfully. Use the thread_id to track progress.",
"aop_id": "aop_1",
"aop_title": "Market Research Report Generator",
"base_prompt": "Generate a comprehensive market research report",
"final_prompt": "Generate a comprehensive market research report\n\n--- User Inputs ---\ncompany: Acme Corp\n",
"aop_config": {
"agentId": "research"
}
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Path Parameters
Body
application/json
Execute as a Test run: the agent uses its real prompt, config, and read-only tools, but side-effectful tool calls are captured instead of executed.
Optional user inputs appended to the AOP prompt as key-value pairs.
Show child attributes
Show child attributes
Required for session auth. Optional for API keys.
Maximum string length:
120Response
Success
Example:
"started"
OmniCommerce origin. Clients can ignore this field.
Allowed value:
"api"