curl --request POST \
--url https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/execute \
--header 'Content-Type: application/json' \
--header 'x-service-key: {YOUR_SERVICE_KEY}' \
--data '{
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}'
import requests
case_id = "{YOUR_CASE_ID}"
url = f"https://operator.opus.com/api/v1/case/{case_id}/execute"
headers = {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}"
}
payload = {
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const caseId = "{YOUR_CASE_ID}";
const response = await fetch(`https://operator.opus.com/api/v1/case/${caseId}/execute`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}",
},
body: JSON.stringify({
callbackUrl: "https://your-app.example.com/opus/callback",
payload: {
"{VARIABLE_NAME_1}": {
value: "API Test Project",
type: "str",
displayName: "Variable Name 1",
},
"{VARIABLE_NAME_2}": {
value: 45.8,
type: "float",
displayName: "Variable Name 2",
},
},
}),
});
const data = await response.json();
console.log(data);
{
"success": true,
"caseId": "{CASE_ID}",
"message": "Job execution started"
}
Cases
Execute Case
Run a case with populated inputs
POST
/
api
/
v1
/
case
/
{caseId}
/
execute
curl --request POST \
--url https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/execute \
--header 'Content-Type: application/json' \
--header 'x-service-key: {YOUR_SERVICE_KEY}' \
--data '{
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}'
import requests
case_id = "{YOUR_CASE_ID}"
url = f"https://operator.opus.com/api/v1/case/{case_id}/execute"
headers = {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}"
}
payload = {
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const caseId = "{YOUR_CASE_ID}";
const response = await fetch(`https://operator.opus.com/api/v1/case/${caseId}/execute`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}",
},
body: JSON.stringify({
callbackUrl: "https://your-app.example.com/opus/callback",
payload: {
"{VARIABLE_NAME_1}": {
value: "API Test Project",
type: "str",
displayName: "Variable Name 1",
},
"{VARIABLE_NAME_2}": {
value: 45.8,
type: "float",
displayName: "Variable Name 2",
},
},
}),
});
const data = await response.json();
console.log(data);
{
"success": true,
"caseId": "{CASE_ID}",
"message": "Job execution started"
}
This is the primary step where you provide all inputs and run the workflow.
The request body consists of:
Case execution is asynchronous. This endpoint returns immediately once the run is queued; the final result is delivered to your
callbackUrl (and is also retrievable via Get Case Results).- The
payload— the input schema from Get Workflow Details with values populated for each input - An optional
callbackUrlthat Opus will POST to when the case finishes
Path Parameters
The case ID returned by Initiate Case
Headers
Body Parameters
An object where each key is a variable name from your workflow’s input schema, and each value is a Variable Object (see below).
HTTPS URL that Opus will POST the case result to once the run finishes. Must be reachable from the Opus platform.
Variable Object
Each entry inpayload uses your variable name as the key (e.g., VARIABLE_NAME_1) and maps to an object with the following properties:
While
displayName is optional, omitting it may cause display glitches on the Opus platform UI. We strongly recommend including it for each input field.Response
Errors
curl --request POST \
--url https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/execute \
--header 'Content-Type: application/json' \
--header 'x-service-key: {YOUR_SERVICE_KEY}' \
--data '{
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}'
import requests
case_id = "{YOUR_CASE_ID}"
url = f"https://operator.opus.com/api/v1/case/{case_id}/execute"
headers = {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}"
}
payload = {
"callbackUrl": "https://your-app.example.com/opus/callback",
"payload": {
"{VARIABLE_NAME_1}": {
"value": "API Test Project",
"type": "str",
"displayName": "Variable Name 1"
},
"{VARIABLE_NAME_2}": {
"value": 45.8,
"type": "float",
"displayName": "Variable Name 2"
}
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const caseId = "{YOUR_CASE_ID}";
const response = await fetch(`https://operator.opus.com/api/v1/case/${caseId}/execute`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-service-key": "{YOUR_SERVICE_KEY}",
},
body: JSON.stringify({
callbackUrl: "https://your-app.example.com/opus/callback",
payload: {
"{VARIABLE_NAME_1}": {
value: "API Test Project",
type: "str",
displayName: "Variable Name 1",
},
"{VARIABLE_NAME_2}": {
value: 45.8,
type: "float",
displayName: "Variable Name 2",
},
},
}),
});
const data = await response.json();
console.log(data);
{
"success": true,
"caseId": "{CASE_ID}",
"message": "Job execution started"
}
Was this page helpful?