API Reference
Cancel Jobs
Cancel your API Jobs in the Pending state, before execution preparation begins.
POST
Try it out/v1/api/job/cancelRequest example
bash
curl --fail-with-body --silent --show-error --max-time 30 \
-X POST "$NORDY_BASE_URL/v1/api/job/cancel" \
-H "api-key: $NORDY_API_KEY" \
-H "content-type: application/json" \
--data '{"job_ids":["68abcdef0123456789abcdef"]}'Success response200 OK
JSON
{
"canceled_count": 1,
"results": [
{ "id": "68abcdef0123456789abcdef", "status": "canceled" }
]
}Authentication
api-keystringrequiredSend the user API key in the api-key request header.
Request body
Content-Type: application/json
job_idsstring[]bodyrequired- An array of 1 to 1,000 Job IDs (24-character hexadecimal strings). Duplicate IDs are processed once. Invalid input rejects the entire request before any cancellation.
Success response
200 OK HTTP 200 can include unsuccessful cancellations; check results[].status for each ID.
canceled_countintegerresponserequired- Number newly canceled by this request.
results[].idstringresponserequired- Requested Job ID.
results[].statuscanceled | already_canceled | not_cancelable | not_foundresponserequired- canceled: newly canceled; already_canceled: previously canceled; not_cancelable: execution preparation has begun or the Job is finished; not_found: missing, another account’s, or not an API Job.
Notes
- You can cancel Jobs created with any API key on the same account.
- The queued API status also includes Jobs preparing to execute, which cannot be canceled.
Responses and errors
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_JSON, INVALID_INPUT | Provide a valid job_ids array. |
| 413 | REQUEST_BODY_TOO_LARGE | The JSON body exceeds 50 MiB. |
| 415 | UNSUPPORTED_MEDIA_TYPE | Send Content-Type: application/json. |
| 400 | MULTIPLE_AUTH_CREDENTIALS | Send the API key without login cookies. |
| 401 | AUTHENTICATION_REQUIRED | Missing or invalid API key. |
| 403 | USER_SUSPENDED, PRO_SUBSCRIPTION_REQUIRED, INVALID_INPUT | The account is suspended, lacks an active Pro subscription, or cannot access the API. |
| 500 | INTERNAL_ERROR | An error occurred while processing the request. Check Job status before retrying. |