Skip to main content
POST
/
v1
/
jobs
Error
A valid request URL is required to generate request examples
{
  "id": "job_M4qT8YH7xW2pL9nB",
  "status": "pending",
  "url": "<string>",
  "method": "GET",
  "queue": "<string>",
  "attempts": 1,
  "max_attempts": 50,
  "created_at": "2023-11-07T05:31:56Z",
  "required_approval": true,
  "deduplicated": true,
  "payload": {},
  "headers": {},
  "dedupe_key": "<string>",
  "delay_until": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "finished_at": "2023-11-07T05:31:56Z",
  "next_retry_at": "2023-11-07T05:31:56Z",
  "last_error": "<string>",
  "response_code": 123,
  "response_body": null,
  "duration_ms": 123,
  "approved_at": "2023-11-07T05:31:56Z",
  "approved_by": "<string>",
  "callback_url": "<string>",
  "schedule_id": "sch_TW2qf5b1Ra7mP3Xy",
  "idempotency_key": "<string>",
  "retries_remaining": 1,
  "next_retry_in_seconds": 1,
  "actions": [
    "approve"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Request-Id
string

Optional client request ID. Echoed back on response.

Idempotency-Key
string

Deduplicates create-job requests within a 24-hour window.

Content-Type
string
required
Pattern: ^application/json(;.*)?$

Body

application/json
url
string<uri>
required
method
enum<string>
default:POST
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
payload
object
headers
object
delay
string

Delay string like 30s, 5m, 1h, 1d.

Pattern: ^(\d+)(s|m|h|d)$
dedupe_key
string
max_attempts
integer
default:3
Required range: 1 <= x <= 100
requires_approval
boolean
default:false
callback_url
string<uri>
queue
string
default:default
Pattern: ^[a-zA-Z0-9_-]+$

Response

Existing deduplicated/idempotent job returned

id
string
required
Pattern: ^job_[A-Za-z0-9_-]+$
Example:

"job_M4qT8YH7xW2pL9nB"

status
enum<string>
required
Available options:
pending,
active,
awaiting_approval,
completed,
failed,
cancelled
url
string<uri>
required
method
enum<string>
required
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
queue
string
required
attempts
integer
required
Required range: x >= 0
max_attempts
integer
required
Required range: 1 <= x <= 100
created_at
string<date-time>
required
required_approval
boolean
required
deduplicated
boolean
required
payload
object
headers
object
dedupe_key
string | null
delay_until
string<date-time> | null
started_at
string<date-time> | null
finished_at
string<date-time> | null
next_retry_at
string<date-time> | null
last_error
string | null
response_code
integer | null
response_body
unknown
duration_ms
integer | null
approved_at
string<date-time> | null
approved_by
string | null
callback_url
string<uri> | null
schedule_id
string | null
Pattern: ^sch_[A-Za-z0-9_-]+$
Example:

"sch_TW2qf5b1Ra7mP3Xy"

idempotency_key
string | null
retries_remaining
integer
Required range: x >= 0
next_retry_in_seconds
integer
Required range: x >= 0
actions
enum<string>[]
Available options:
approve,
cancel,
retry