Jobs, tasks and idempotency
Follow long-running Local API operations as jobs, run RPA Plus workflows as tasks, and retry POST requests safely with Idempotency-Key.
Some operations take longer than an HTTP request should wait: opening a Quin Cloud profile (download, lease, runtime), closing and saving it, or running a workflow on many profiles. The Local API reports these as jobs you can poll, cancel or follow through events.
Where jobs come from
| Job kind | Started by | Id |
|---|---|---|
browser.open | POST /browsers/open with "wait": false → 202 {"job_id", "state"} | job_… |
browser.close | POST /browsers/{sid}/close with "wait": false → 202 {"job_id", "state"} | job_… |
rpa.task | POST /tasks → 201 with task_id and job_id (the same id) | task_… |
A job is written to Quin's database before it starts and after every change, so its final state survives a restart.
The job object
{
"id": "job_8c41d0e2b9a3",
"kind": "browser.open",
"state": "COMPLETED",
"subject": "6f1c2a9e-3b7d-4c55-9a0e-2d8f1b6c4e77",
"created_by": "api:AbCdEfGhJkMn",
"created_at": "2026-11-02T09:20:01",
"updated_at": "2026-11-02T09:20:48",
"finished_at": "2026-11-02T09:20:48",
"progress": null,
"result": {"session_id": "s_3f9c1d2e8a7b6c5d", "state": "RUNNING", "kind": "cloud"}
}A failed job carries "error": {"code", "message"}. For browser.open the result is the session
object; for browser.close it is the session in its final state. An rpa.task job adds
task_state (the task's own state) and progress: {"done", "total"} (finished runs / all runs).
Job states
| State | Meaning |
|---|---|
QUEUED | Recorded, not started |
RUNNING | Working |
WAITING_FOR_BROWSER | An RPA task waiting (shown for the task state WAITING_FOR_AGENT) |
COMPLETED | Done — a Cloud close job only after the profile is SYNCED |
FAILED | Ended with an error (also tasks that ended PARTIAL or MISSED) |
CANCELLED | Cancelled (also tasks that ended SKIPPED) |
RECOVERY_REQUIRED | Quin stopped while the job ran (error.code: interrupted); it is not restarted automatically |
Endpoints
| Method & path | Scope | Notes |
|---|---|---|
GET /jobs | jobs:read | Newest first; query state, page, page_size (≤ 200) |
GET /jobs/{id} | jobs:read | Unknown id → 404 job_not_found |
POST /jobs/{id}/cancel | jobs:cancel | Returns the job; a finished job is returned unchanged |
Cancelling a browser job stops waiting for it and records CANCELLED. Cancelling an rpa.task job
cancels the task. Finished jobs are kept for 30 days.
JOB=$(curl -s -X POST http://127.0.0.1:50380/api/v1/browsers/open \
-H "Authorization: Bearer $QUIN_API_TOKEN" -H "Content-Type: application/json" \
--data '{"profile_id": "AbCd1234", "wait": false}' | jq -r .job_id)
curl -s http://127.0.0.1:50380/api/v1/jobs/$JOB -H "Authorization: Bearer $QUIN_API_TOKEN"Idempotency keys
Send Idempotency-Key: <your key> (at most 100 characters) on a POST to make a retry safe. If the
same token sends the same key to the same path again, Quin does not run the request again: it returns
the first response with the header Idempotent-Replay: true.
- Keys are remembered for about 24 hours.
- Only JSON responses below HTTP 500 are remembered; after a server error the request can run again.
- A key longer than 100 characters is
400 invalid_idempotency_key. - Use one key per intended operation, for example
"{run id}-open","{run id}-task".
Use it on POST /browsers/open, POST /tasks, POST /profiles and other creating requests. The SDKs
retry a non-GET request only when you pass an idempotency key (and always after a 429, which Quin
answers before doing anything).
RPA tasks
POST /tasks — scope rpa:execute (and RPA Plus allowed for the account) — runs a published workflow
version on one or more profiles, one run per profile.
| Field | Type | Default | Notes |
|---|---|---|---|
workflow_id | string | required | |
version | int ≥ 1 | the published version | Tasks pin a version; editing the workflow never changes a running task. Unpublished → 409 not_published |
profile_ids | string[] | [] | Up to 1000; local or Cloud ids |
group_id | string | – | Every profile of a group |
filter | object | – | {q, tags}: name contains q and carries every tag |
inputs | object | {} | Workflow inputs |
dataset | string | – | A CSV/XLSX file in the automation workspace (one row per run; at most 10,000 rows) |
concurrency | int 1–8 | 1 | Also capped by RPA Plus → Settings |
timeout_s | int 10–86400 | – | Per run |
retries | int 0–5 | 0 | A failed run is retried unless retrying cannot help (for example profile_not_saved, lease_lost, taken_over) |
error_policy | continue | stop_all | continue | |
close_policy | keep_open | close_and_sync | close_if_opened_by_task | close_if_opened_by_task | See Browser lifecycle |
A workflow that uses the browser needs at least one profile (400 no_targets).
The answer (and GET /tasks/{id}) is the task:
{"id": "task_1d2e3f4a5b6c", "task_id": "task_1d2e3f4a5b6c", "job_id": "task_1d2e3f4a5b6c",
"workflow_id": "…", "version": 3, "name": "Daily report", "source": "api", "state": "QUEUED",
"created_at": "…", "started_at": null, "finished_at": null, "settings": {…}, "summary": {},
"runs": [{"id": "run_9a8b7c6d5e4f", "profile_id": "AbCd1234", "idx": 0, "state": "QUEUED",
"attempt": …, "error_code": null, "error_message": null, "steps_count": …}]}Task states: QUEUED, RUNNING, COMPLETED, PARTIAL (some runs failed), FAILED, CANCELLED,
RECOVERY_REQUIRED, and for scheduled Quin Cloud workflows WAITING_FOR_AGENT, MISSED, SKIPPED.
Run states: QUEUED, WAITING_FOR_BROWSER, RUNNING, PAUSED, SAVING, COMPLETED, FAILED,
CANCELLED, RECOVERY_REQUIRED.
| Method & path | Scope | Notes |
|---|---|---|
GET /tasks | rpa:read | Query state, workflow_id, page, page_size |
GET /tasks/{id} | rpa:read | With its runs |
POST /tasks/{id}/cancel | jobs:cancel | |
GET /runs/{id} | rpa:read | One run with its steps (values redacted) |
POST /runs/{id}/signal | rpa:execute | {"name", "value"} for a run waiting in a Wait for external signal block; otherwise 409 not_waiting |
Workflows and schedules
| Method & path | Scope | Notes |
|---|---|---|
GET /workflows, GET /workflows/{id} | rpa:read | List (query q, page, page_size) and read |
POST /workflows | rpa:write | {name, description?, tags?, graph?} or a bare quin.workflow/1 graph → 201 |
PUT /workflows/{id}, DELETE /workflows/{id} | rpa:write | |
POST /workflows/{id}/publish | rpa:write | {"note"?} — creates a numbered version |
POST /workflows/import | rpa:write | {"data", "mode": "new" | "replace" | "append", "preview"}; validated as untrusted input |
GET /workflows/{id}/export | rpa:read | Optional version; no secrets |
GET /schedules | rpa:read | |
POST /schedules | rpa:write | {name, workflow_id, spec, task_settings?, enabled?} → 201 |
PATCH /schedules/{id}, DELETE /schedules/{id} | rpa:write |
A schedule spec has a kind and its fields: once (at), interval (every_minutes), daily
(time HH:MM), weekly (time, days 0 = Monday … 6 = Sunday), monthly (time, day 1–31),
cron (cron, five fields); plus timezone (IANA, default UTC) and missed (skip or
run_once).