Tasks API
Use these endpoints to create tasks from your own tools and read them back. You can also prevent duplicate tasks and handle approvals or refusals.
A task is a single change you want to make in one repository. You send a repository ID along with a description of the change. Vroni checks the repository, your credits, and your approval settings, then tells you whether it queued a run or is waiting for an approver.
To track what happens next, see the Runs API or Webhooks. For how tasks work in the app, see Tasks.
Create a task
POST /api/v1/tasks
Requires the Create tasks permission. To follow the run afterward, your token also needs Read runs.
| Field | Required | What it is |
|---|---|---|
repository_id |
yes | The repository’s ID from the repositories endpoint, exactly as returned. The repository must be ready. |
requested_outcome |
yes | What you want changed, up to 65,536 bytes. See Writing a good task for what to include. |
title |
no | A title for display in lists, up to 255 characters. Vroni uses requested_outcome for the actual work and ignores the title. |
correlation_id |
no | Your own reference, such as a ticket or build number, up to 191 characters. Vroni echoes it back in responses so you can match them up. |
source_ref |
no | Where the request originated in your system, such as refs/heads/main, up to 120 characters. |
source_url |
no | A link to the originating ticket or CI run, up to 500 characters. |
ci |
no | Metadata about the build or test system that triggered the task: provider, workflow, job, branch, commit_sha, pull_request_number, pipeline_url, external_run_id, and changed_files. Vroni stores these with the task for your reference. The OpenAPI document lists the limits for each field; changed_files accepts up to 100 paths. |
execution_mode |
no | standard or deep. Both run the same full workflow today. |
Vroni rejects any unrecognized field with 422. Put everything Vroni needs to know about the work, such as a CI error message, inside requested_outcome.
curl -X POST https://app.vroni.com/api/v1/tasks \
-H "Authorization: Bearer $VRONI_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ticket-4711" \
-d '{
"repository_id": "01J00000000000000000000030",
"title": "CSV export for orders",
"requested_outcome": "Add a CSV export to the orders page in the admin area. Export the orders that match the current filters, with order number, date, customer email, total and status.",
"correlation_id": "ticket-4711",
"source_url": "https://tracker.example.com/tickets/4711"
}'
Avoiding duplicates
Scripts and CI jobs often retry requests after a network failure. To keep a retry from creating a second task, send an Idempotency-Key header with up to 255 characters using letters, digits, and _ - : .. A ticket number or build ID works well.
Vroni tracks each key per repository on your team, and tokens on the same team share those keys. If you send the same key again with the same task payload, Vroni returns the stored result with "replay": true instead of starting a new task, and keeps the correlation_id from the first request. If you reuse a key with a different payload, Vroni returns 409 trigger_key_conflict.
Reuse a key when you aren’t sure whether your first request went through, or after an admission_temporarily_unavailable error. Use a new key when you want a fresh attempt, such as after fixing the cause of an admission_denied error; reusing the old key will only replay the original refusal.
The responses
201 Created: The task exists and its first run is queued.
{
"data": {
"task": {
"id": "01J00000000000000000000020",
"source": "api",
"title": "CSV export for orders"
},
"run": {
"id": "01J00000000000000000000010",
"status": "queued",
"status_label": "Queued",
"terminal": false
},
"repository": {
"id": "01J00000000000000000000030",
"name": "shop-backend"
},
"correlation_id": "ticket-4711",
"replay": false,
"links": {
"status": "https://app.vroni.com/api/v1/runs/01J00000000000000000000010/status",
"events": "https://app.vroni.com/api/v1/runs/01J00000000000000000000010/events",
"task": "https://app.vroni.com/tasks/01J00000000000000000000020",
"run": "https://app.vroni.com/runs/10",
"repository": "https://app.vroni.com/projects/30"
}
}
}
Use links.status to follow the run. The runs page explains polling.
200 OK: A replay of an earlier request with the same idempotency key. If the original request created a run, the response matches 201 with "replay": true. If the task is waiting for approval, or was declined or cancelled, the response won’t include a run. Check data.run before you start polling.
202 Accepted: Your team has task approval enabled. API tasks always wait for a human approver because tokens can’t approve tasks. The response includes "approval_required": true, sets the task status to waiting_for_review, and omits the run. Save the task ID so you can check it later, or resend the same request with the same key. Once someone approves the task, that request returns the run. See Approvals and pull request proposals for details.
409 admission_denied: Vroni couldn’t start the task. The reason is in errors.reason[0], and the response includes next_action and next_action_url when there is a step you can take. Common reasons:
| Reason | What it means |
|---|---|
repository_setup_in_progress |
The repository is still in onboarding. |
project_not_ready |
The repository isn’t ready, for example because its status needs a re-check. |
project_paused, project_archived |
The repository is paused or archived in Vroni. |
project_disconnected |
The repository lost its GitHub connection. |
credit_entitlement_missing, insufficient_credits |
Your team has no credits to spend. |
dunning_active |
A payment problem needs attention first. |
subscription_gate_blocked, reserve_not_met |
Your plan or balance doesn’t allow new work right now. |
team_runs_paused |
Work for your team is paused. Contact support. |
Other reasons can appear, so make sure your code handles unknown values. A refused task won’t start on its own later; fix the cause and send a new request with a new idempotency key.
List tasks
GET /api/v1/tasks
Requires the Read tasks permission.
| Query parameter | What it does |
|---|---|
status |
blocked, waiting_for_review, pending, queued, running, cancellation_requested, declined, completed, failed, timed_out, or cancelled. Repeat with status[]= to filter by multiple statuses. |
source |
github, dashboard, or api. Repeat with source[]= to filter by multiple sources. |
repository_id |
Filter to tasks for a single repository. |
created_at_from, created_at_until |
A time range in ISO 8601 format with a time zone. The start is inclusive and the end is exclusive. |
sort |
created_at, updated_at, or status. Prefix with - for descending order. |
page, per_page |
Pagination controls. |
Each task includes its id, title, status, status_label, repository, latest_run, pull_request (with url and state), source, approval and publication state, canonical_url, and links. A task that couldn’t start also includes a denial object with the reason. See the OpenAPI document for the full schema.
Show one task
GET /api/v1/tasks/{task_id}
Returns the same fields as the list endpoint, plus the task description in requested_outcome and the next_actions the app would offer.
Publication state
If your team uses pull request approval, a finished run doesn’t open a pull request right away. Tasks and runs then show "held_for_review": true and "publication_state": "awaiting_review". When an approver creates the pull request in Vroni, or links an existing one, the state changes to delivered. If the approver discards the proposal, no pull request is created, and the task’s publication block reflects that.
Last updated November 25, 2026. Something missing or unclear? Write to [email protected].