---
title: "Post Task Artifact"
method: POST
path: "/api/v1/tasks/{task_id}/artifacts"
---

# Post Task Artifact

`POST /api/v1/tasks/{task_id}/artifacts`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/api/v1/tasks/{task_id}/artifacts`
- Auth: none declared

Post one journal-anchored artifact against a task the caller holds.

## Path parameters

- `task_id` string, required

## Request body

- TaskArtifactPost: Body for POST /tasks/{task_id}/artifacts (#2553). An agent-posted, journal-anchored artifact. ``artifact_type`` selects the payload shape: ``report`` uses ``body`` (markdown); ``table`` uses ``columns`` and ``rows``; ``link`` uses ``url`` and ``link_kind`` (``preview`` / ``dashboard`` / ``document``). ``poster`` is the claim identity: a caller may only post against a task whose claim it holds. There is deliberately no progress field. Progress is a chain-computed projection of journaled work, never postable.
  - `key` string, required
  - `artifact_type` string, required
  - `poster` string, required
  - `body` string
  - `columns` string[]
  - `rows` array[]
    - string[]
  - `url` string
  - `link_kind` string
  - `sarif_result` object
  - `tool` string
  - `tool_version` string
  - `pinned_ruleset_or_feed_digest` string
  - `invocation_argv_hash` string
  - `target` string

## Response `201`

Successful Response

- TaskArtifactContentResponse: A posted artifact version plus its decoded content (for rendering). ``content`` carries the type-specific fields (``body`` for a report, ``columns``/``rows`` for a table, ``url``/``kind`` for a link). When the stored blob fails its hash check ``verified`` is False and ``content`` is omitted -- the surface must render *tampered*, never the bytes.
  - `task_id` string, required
  - `key` string, required
  - `artifact_type` string, required
  - `content_hash` string, required
  - `version` integer, required
  - `prev_version_hash` string, required
  - `spine_entry_hash` string, required
  - `journal_index` integer, required
  - `journal_event_hash` string, required
  - `link_kind` string
  - `size` integer
  - `verified` boolean
  - `verify_reason` string
  - `content` object, nullable

## Other responses

- `403`: Caller does not hold the task's claim
- `404`: Task not found
- `413`: Artifact payload exceeds the per-blob cap
- `422`: Invalid artifact payload

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
