LEIA Docs

Cancel job

POST
/jobs/{jobId}/cancel

Cancels a queued, processing, or retrying background job by its ID.

Authorization

AuthorizationBearer <token>

LEIA API key passed as Bearer token (recommended). Keys start with leia_sk_.

In: header

Path Parameters

jobId*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/jobs/string/cancel"
{}
Empty
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Valid LEIA API key required"
  }
}

{
  "error": {
    "code": "FORBIDDEN",
    "message": "API key service user must be a CREATOR user"
  }
}

{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "IDEMPOTENCY_CONFLICT",
    "message": "Idempotency-Key was reused with a different request body"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}