---
title: "Track Interaction Batch"
method: POST
path: "/v1/public/retrievers/{public_name}/interactions/batch"
tags: ["Public Retriever API"]
---

# Track Interaction Batch

`POST /v1/public/retrievers/{public_name}/interactions/batch`

Track multiple interactions in a single request (batching).

More efficient than sending individual interaction requests.
Use this for batching viewport visibility, bulk actions, etc.

**Authentication:**
- API key is OPTIONAL (same as execute endpoint)
- Password NOT required (tracking should work even without auth)

**Recommended Headers:**
- `X-Session-ID`: Applied to all interactions in the batch

**Limits:**
- Maximum 100 interactions per batch

**Example:**
```bash
curl -X POST "https://api.mixpeek.com/v1/public/retrievers/video-search/interactions/batch" \
  -H "X-Session-ID: sess_xyz..." \
  -H "Content-Type: application/json" \
  -d '{
    "interactions": [
      {
        "document_id": "doc_123",
        "interaction_type": ["VIEW"],
        "position": 0,
        "execution_id": "exec_abc"
      },
      {
        "document_id": "doc_456",
        "interaction_type": ["VIEW"],
        "position": 1,
        "execution_id": "exec_abc"
      }
    ]
  }'
```

## Path parameters

- `public_name` string, required — Public name of the published retriever

## Headers

- `X-Session-ID` string, nullable
- `X-Public-API-Key` string, nullable

## Request body

- PublicInteractionBatchRequest — Request to track multiple interactions in batch.
  - `interactions` PublicInteractionRequest[], required — List of interactions to track (max 100 per batch)
    - `document_id` string, required — ID of the document that was interacted with (from search results)
    - `interaction_type` InteractionType[], required — Type(s) of interaction that occurred
    - `position` integer, required — Position in search results (0-indexed)
    - `execution_id` string, nullable — ID of the retriever execution that generated these results. HIGHLY RECOMMENDED for analytics.
    - `query_snapshot` object, nullable — Snapshot of the query that generated these results. HIGHLY RECOMMENDED for training optimization.
    - `document_score` number, nullable — Initial retrieval score of this document
    - `result_set_size` integer, nullable — Total number of results shown
    - `session_id` string, nullable — Session identifier for tracking user journey
    - `metadata` object, nullable — Additional context about the interaction

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/revisions/5307993e44d3/schema)
