---
title: "Reconcile and dispatch at most one due recipient of an already running task, preserving all call, credit, concurrency and timing guards"
method: POST
path: "/v1/tasks/{id}/process"
---

# Reconcile and dispatch at most one due recipient of an already running task, preserving all call, credit, concurrency and timing guards

`POST /v1/tasks/{id}/process`

## Request

- Base URL: `https://volai.cz`
- URL: `https://volai.cz/v1/tasks/{id}/process`
- Auth: HTTP bearer

Reconciles actual calls and tries to process at most one due recipient of an already running task. Requires the current `revision`; it never starts or resumes a task. It uses the same calling window, suppression, budget reservation, credit, capacity and atomic claim as cron. The persisted opt-in `dispatchOrder: "first_attempts_first"` prioritizes due recipients without a counted attempt; pre-dial rejections (`countsAsAttempt: false`) retain this priority. Existing item order remains the default, and future `nextAttemptAt` values are respected. Read the current state after an uncertain result instead of blindly repeating a request. Every new logical tick needs a new `Idempotency-Key`, even when the revision has not changed.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `revision` integer, required: Current task revision from GET /v1/tasks/{id}. On revision_conflict reload and review the new state before retrying. Reconciliation accepts omission; other task changes require the current revision.

## Response `200`

Processing outcome and current task

- object
  - `status` string, required
  - `task` object, required
    - `purpose` 'standard' | 'coupon_reminder', required: Immutable task purpose. Coupon reminders require manual/custom, maxAttempts 1, expiresAt and a trusted server preflight.
    - `id` string, required
    - `name` string, required
    - `agentId` string, required
    - `taskType` 'invoice' | 'appointment' | 'custom', required
    - `source` 'manual' | 'integration', required
    - `externalRefs` object
      - `invoice` object
        - `connectionId` string, required
        - `externalId` string, required
        - `provider` 'fakturoid' | 'abra-flexi'
      - `calendar` object
        - `connectionId` string, required
        - `calendarId` string, required
        - `eventId` string, required
        - `provider` 'google-calendar' | 'apple-calendar'
    - `callingWindow` object, required
      - `timezone` 'Europe/Prague', required
      - `start` string, required
      - `end` string, required
      - `days` number[], required
    - `maxAttempts` union, required: Maximum automatic attempts including the first. Values 1-3 without a retry policy; 1-4 with lorela_enterprise.
      - 1
      - 2
      - 3
      - 4
    - `retryPolicy` 'lorela_enterprise': Opt-in retry schedule. Absent on tasks using the existing retry behavior.
    - `dispatchOrder` 'first_attempts_first': Prioritize due recipients without a counted attempt before due retries. Pre-dispatch rejections do not count. Omitted preserves item order.
    - `expiresAt` integer: Unix milliseconds after which no new call may begin, including the first attempt. Does not interrupt an active call.
    - `maxDurationSecs` number, required
    - `budgetHal` number, required
    - `reservedBudgetHal` number, required
    - `spentHal` number, required
    - `status` 'draft' | 'ready' | 'running' | 'paused' | 'completed' | 'needs_attention', required
    - `revision` number, required
    - `createdAt` number, required
    - `updatedAt` number, required
    - `lastError` string
    - `reviewReason` string
    - `activeItemId` string
    - `items` object[], required
      - `id` string, required
      - `phone` string, required
      - `variables` object, required
      - `externalRefs` object
        - `invoice` object
          - `connectionId` string, required
          - `externalId` string, required
          - `provider` 'fakturoid' | 'abra-flexi'
        - `calendar` object
          - `connectionId` string, required
          - `calendarId` string, required
          - `eventId` string, required
          - `provider` 'google-calendar' | 'apple-calendar'
      - `paymentStatus` 'not_applicable' | 'unknown' | 'unpaid' | 'paid' | 'disputed', required
      - `status` 'pending' | 'in_progress' | 'completed' | 'skipped' | 'failed' | 'review', required
      - `attempts` object[], required
        - `id` string, required
        - `startedAt` number, required
        - `finishedAt` number
        - `providerCallId` string
        - `outcome` 'placed' | 'completed' | 'no_answer' | 'busy' | 'failed' | 'unknown'
        - `countsAsAttempt` boolean
        - `errorCode` string
        - `costHal` number
        - `variables` object
        - `goalResult` 'success' | 'failure' | 'unknown'
        - `statement` 'promised' | 'disputed' | 'none' | 'unknown'
        - `nextStep` string
      - `nextAttemptAt` number
      - `resolution` object
        - `action` 'skip', required
        - `reason` 'customer_purchased', required
        - `operationId` string, required
        - `evidenceRef` string, required
        - `fingerprint` string, required
        - `resolvedAt` number, required
      - `lastError` string
      - `reviewReason` string
      - `providerCallId` string
      - `estimatedCostHal` number
      - `reservedCostHal` number
      - `actualCostHal` number

## Other responses

- `400`: Error codes: validation (request).
- `401`: Error codes: unauthorized (request).
- `403`: Error codes: account_suspended (account), agent_suspended (account).
- `404`: Error codes: task_not_found (account).
- `409`: Error codes: idempotency_in_progress (busy), revision_conflict (request), task_not_running (account), task_paused (account), claim_lost (busy), agent_version_changed (account), window_closed (account).
- `429`: Error codes: rate_limited (busy).
- `500`: Error codes: internal_error (service), dispatch_result_unpersisted (service).
- `503`: Error codes: engine_contract_unavailable (service).

---

[API](https://skmtc.dev/volai/apis/volai-rest-api.md) · [All operations](https://skmtc.dev/volai/apis/volai-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volai/apis/volai-rest-api/revisions/12029b05e2fa?raw)
