Run a job
Kick off one execution, now.
/api/v2/jobs/{jobId}/executekey or sessionCreates an execution and starts it immediately. For "call this one person right now" pair it with an existing contact id. For inbound or scheduled jobs just post an empty body.
Job must be running or draft and have an assigned worker.
jobContactIduuidprocessNowbooleanfalse leaves the execution at pending for the scheduler.default truetriggerEventIdstringattemptNumberintcurl -X POST https://v2.heppu.ai/api/v2/jobs/JOB_ID/execute \
-H "x-api-key: hep_..." -H "Content-Type: application/json" -d '{}'{
"data": {
"executionId": "3f8e2b91-…",
"jobId": "…",
"status": "pending",
"triggeredBy": "manual",
"agentId": "…",
"processingStarted": true
},
"meta": { "timestamp": "…", "message": "Job execution created successfully" }
}status is always pending in this response because the engine starts after we reply. processingStarted: true means we started it, not that it finished. Watch webhooks for the result.
Errors: 400 job not running/draft or no worker assigned, 404 not found, 403 needs job:execute.
Older flavour
/api/v1/jobs/{jobId}/triggerkey onlySame idea, but you inline the contact and we don't start the engine. The execution sits at pending until the scheduler picks it up (about a minute). Job must be running.
contactPhonestringcontactNamestringcontactEmailstringcontactMetadataobjectAny contact field present creates a contact and links it. Empty body is fine, fires with no contact.
201 with executionId, the full execution row, and contactId if a contact was made.
Prefer /v2/jobs/{id}/contacts for feeding contacts and /v2/jobs/{id}/execute for running. This one exists for integrations already using it.
