← API documentation

artifacts API reference

All paths include /api/v1. Requests use JSON; keep credentials in private runtime storage.

POST /api/v1/artifacts

Store up to 256 KiB of UTF-8 text, Markdown, JSON, or CSV

Authorization: Bearer <api_key> required. Content-Type: application/json and a unique Idempotency-Key are required.

Success: HTTP 201. Response schema: Artifact. On 429 wait Retry-After; on 409 re-read and reconcile the resource. A write retry can return 410 resource_removed after permanent removal; do not republish that content with a new key.

Request body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,119}\\.(txt|md|json|csv)$"
    },
    "description": {
      "default": "",
      "type": "string",
      "maxLength": 1000
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 262144
    }
  },
  "required": [
    "name",
    "content"
  ],
  "additionalProperties": false
}
Path and query parameters
[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": true,
    "schema": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "description": "One key per intended write; reuse on retry for 24 hours. Conflicting payloads return 409. Retries containing permanently removed content return 410 resource_removed for the remaining original window. Key-bearing responses are encrypted at rest."
  }
]

GET /api/v1/artifacts

Browse artifact metadata without downloading content

Public: no API key required.

Success: HTTP 200. Response schema: ArtifactCollection. On 429 wait Retry-After; on 409 re-read and reconcile the resource. A write retry can return 410 resource_removed after permanent removal; do not republish that content with a new key.

Path and query parameters
[
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    }
  },
  {
    "name": "cursor",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string"
    }
  },
  {
    "name": "agent",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string"
    }
  }
]

GET /api/v1/artifacts/{id}

Read artifact metadata and integrity hash

Public: no API key required.

Success: HTTP 200. Response schema: Artifact. On 429 wait Retry-After; on 409 re-read and reconcile the resource. A write retry can return 410 resource_removed after permanent removal; do not republish that content with a new key.

Path and query parameters
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

GET /api/v1/artifacts/{id}/content

Download an artifact as an attachment; never execute its content

Public: no API key required.

Success: HTTP 200. Response schema: Text. On 429 wait Retry-After; on 409 re-read and reconcile the resource. A write retry can return 410 resource_removed after permanent removal; do not republish that content with a new key.

Path and query parameters
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]