---
title: "Submit the answer to a claimed task"
method: POST
path: "/v1/compliance/tasks/{taskId}/submit"
tags: ["Compliance"]
---

# Submit the answer to a claimed task

`POST /v1/compliance/tasks/{taskId}/submit`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/compliance/tasks/{taskId}/submit`
- Auth: HTTP bearer

The answer is checked against the platform's standard and stored by the same code as the model's own answer, with the agent's label recorded as the decider. The checks cover the answer's shape, that every rule is answered once with a known verdict and a reason, and that each quote appears verbatim in the text the package gave. A failed check returns 422 naming what is wrong and stores nothing. Returns 409 without a live claim at the given epoch. Repeating a submit that was stored (same claimant and epoch) returns the stored result again.

## Path parameters

- `taskId` string, uuid, required

## Request body

- object
  - `execution_epoch` integer, required: The epoch the claim returned.
  - `answer` object, required: An object matching the `output_schema` of the claimed package.

## Response `201`

The closed task and the stored result.

- object
  - `task` ComplianceTask
    - `id` string, uuid
    - `kind` 'extraction' | 'rules' | 'evaluation' | 'discrepancy'
    - `evaluation_id` string, uuid, nullable
    - `framework_document_id` string, uuid, nullable
    - `status` 'available' | 'claimed' | 'submitted' | 'cancelled': `claimed` only while the lease runs; an expired claim reads `available`.
    - `execution_epoch` integer: Raised by each claim; sent with heartbeat, release and submit.
    - `claimed_by_label` string, nullable
    - `lease_expires_at` string, date-time, nullable
    - `created_at` string, date-time
  - `result` union: Depends on the task kind.
    - object: Kind `extraction`.
      - `framework_document_id` string, uuid
      - `requirement_count` integer
    - object: Kind `rules`.
      - `framework_document_id` string, uuid
      - `rule_count` integer
    - ComplianceEvaluation
      - `id` string, uuid
      - `document_id` string, uuid, nullable: The evaluated document; null for a set's evaluation.
      - `set_id` string, uuid, nullable: The evaluated document set; null for one document.
      - `status` 'processing' | 'waiting' | 'completed' | 'error': `waiting`: offered to the workspace's external agent, not yet answered. A `processing` evaluation older than the staleness limit reads `error`.
      - `decided_by` string, nullable: The external agent's label when the platform's model did not decide.
      - `error` string, nullable
      - `framework_ids` string[]
      - `rule_count` integer
      - `pass_count` integer
      - `fail_count` integer
      - `not_applicable_count` integer
      - `unclear_count` integer
      - `outdated` boolean: The ON frameworks, their rules or the rule count differ from the evaluation's run. For a set, also when its rule set was swapped or changed, or its documents edited, since.
      - `member_ids` string[], nullable: A set evaluation's members in the order the decider saw them ([D1] is the first); null for one document or before the run.
      - `created_at` string, date-time
      - `finished_at` string, date-time, nullable
    - object: Kind `discrepancy`.
      - `run_id` string, uuid
      - `discrepancy_count` integer

## Other responses

- `400`: The request is invalid.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the current resource state.
- `422`: The request is well-formed but violates the declared task contract.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/compliance/tasks/:taskId/submit/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
