QANATIX
API Reference

Records API

CRUD operations on records — create, list, get, update, delete, bulk.

Records API

Records are the core data objects in QANATIX. Each record belongs to a collection and has structured data in collection_data.

POST /records

Create a single record.

curl -X POST https://api.qanatix.com/api/v1/records \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Stainless Steel Bolt M8x40",
    "collection": "manufacturing",
    "record_type": "fastener",
    "collection_data": {
      "part_number": "SS-M8-40-A2",
      "material": "Stainless Steel A2",
      "price_eur": 0.12,
      "in_stock": true
    }
  }'

Response (201)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Stainless Steel Bolt M8x40",
  "collection": "manufacturing",
  "record_type": "fastener",
  "visibility": "private",
  "collection_data": { "..." },
  "indexing_status": "indexed",
  "created_at": "2026-03-07T10:00:00Z"
}

The record is created immediately with visibility: "private" by default. Set "visibility": "public" in the request body to publish to QANATIX Open. The record is instantly searchable.

GET /records

List records with cursor-based pagination and optional filtering.

curl "https://api.qanatix.com/api/v1/records?collection=manufacturing&limit=10" \
  -H "Authorization: Bearer sk_live_abc123..."

Query parameters

ParameterTypeDefaultDescription
collectionstringFilter by collection
record_typestringFilter by record type
qstringFull-text search on name
statusstringactiveactive, archived, or draft
limitinteger20Results per page (1-100)
cursorstringPagination cursor from previous response

Response (200)

{
  "items": [
    {
      "id": "550e8400-...",
      "name": "Stainless Steel Bolt M8x40",
      "collection": "manufacturing",
      "record_type": "fastener",
      "indexing_status": "indexed",
      "created_at": "2026-03-07T10:00:00Z",
      "updated_at": "2026-03-07T10:05:00Z"
    }
  ],
  "cursor": "eyJpZCI6...",
  "has_more": true
}

GET /records/{id}

Get a single record with all fields.

curl https://api.qanatix.com/api/v1/records/550e8400-... \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

Returns the full record including collection_data, description_llm, and timestamps.

PATCH /records/{id}

Update an record. Only include fields you want to change.

curl -X PATCH https://api.qanatix.com/api/v1/records/550e8400-... \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "collection_data": {
      "price_eur": 0.15,
      "in_stock": false
    }
  }'

Updates automatically rebuild the search index for the record.

Response (200)

Returns the updated record.

DELETE /records/{id}

Soft-delete (archive) an record. Removes it from search results.

curl -X DELETE https://api.qanatix.com/api/v1/records/550e8400-... \
  -H "Authorization: Bearer sk_live_abc123..."

Response

204 No Content

PATCH /records/bulk

Bulk update multiple records.

curl -X PATCH https://api.qanatix.com/api/v1/records/bulk \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "record_ids": ["550e8400-...", "660f9500-..."],
    "update": {
      "collection_data": {
        "in_stock": false
      }
    }
  }'

Response (200)

{
  "updated": 2
}

POST /records/bulk-delete

Soft-delete multiple records.

curl -X POST https://api.qanatix.com/api/v1/records/bulk-delete \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "record_ids": ["550e8400-...", "660f9500-..."]
  }'

Response (200)

{
  "deleted": 2
}

PATCH /records/{id}/visibility

Set record visibility to private or public. Public records are searchable on QANATIX Open by any AI agent without authentication.

curl -X PATCH https://api.qanatix.com/api/v1/records/550e8400-.../visibility \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"visibility": "public"}'

Response (200)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "visibility": "public"
}

Changing to public dual-writes the record to the shared Open collection. Changing back to private removes it from Open instantly.

POST /records/bulk-visibility

Set visibility for up to 1,000 records at once.

curl -X POST https://api.qanatix.com/api/v1/records/bulk-visibility \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "record_ids": ["550e8400-...", "660f9500-..."],
    "visibility": "public"
  }'

Response (200)

{
  "updated": 2
}

PATCH /collections/{collection}/default-visibility

Set the default visibility for new records in a collection. Does not affect existing records.

curl -X PATCH https://api.qanatix.com/api/v1/collections/manufacturing/default-visibility \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"default_visibility": "public"}'

Response (200)

{
  "collection": "manufacturing",
  "default_visibility": "public"
}

POST /records/retry-reset

Reset failed upload retries. Records stuck in failed status are reset to pending so the pipeline retries them.

curl -X POST https://api.qanatix.com/api/v1/records/retry-reset \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

{
  "reset": 5
}

On this page