Run a Job
Trigger a job on one or more devices. One execution is created per device and dispatched to it.
Endpoint
| Requirement | Value |
|---|---|
| Header | X-API-Key: <your key> |
| Header | Content-Type: application/json |
| Scope | TRIGGER |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
jobName |
String | Yes | Name of one of your jobs |
deviceIds |
String[] | Yes | One or more of your device IDs |
The job and the devices must belong to the key's owner — otherwise they are not found in your scope and the call fails.
Example
curl -X POST https://<your-job-backend>/job/api/jobs/execute \
-H "X-API-Key: amk_live_3f2a8b1c9d2e4f5a6b7c8d9e" \
-H "Content-Type: application/json" \
-d '{
"jobName": "qos-sms-test",
"deviceIds": ["device-42"]
}'
Response — 201 Created
A list of created executions (one per device):
[
{
"jobExecutionId": 1287,
"jobName": "qos-sms-test",
"deviceId": "device-42",
"deviceName": "Samsung A12",
"execState": "PENDING",
"launchedAt": "2026-06-27T14:32:10"
}
]
| Field | Type | Description |
|---|---|---|
jobExecutionId |
Long | Unique ID of the execution — use it to poll its state |
jobName |
String | The job that was launched |
deviceId |
String | Target device ID |
deviceName |
String | Target device name |
execState |
String | Initial state (PENDING) |
launchedAt |
DateTime | When the execution was created |
Keep the
jobExecutionId— you need it to check the execution state afterwards.
Errors
| Status | code |
message |
Cause |
|---|---|---|---|
400 |
J-500 | Validation error | Missing jobName or empty deviceIds |
403 |
J-802 | Invalid API key | Missing / unknown / revoked key |
403 |
J-803 | API key is expired | The key's expiration date has passed |
403 |
J-804 | API key does not have the required permission | The key has no TRIGGER scope |
404 |
J-301 | Job not found | The job name does not belong to you |
404 |
J-001 | Device not found | A device ID does not belong to you |
Example error body: