---
title: "Track an App interaction event"
method: POST
path: "/v1/public/apps/{slug}/interactions"
tags: ["Public Apps API"]
---

# Track an App interaction event

`POST /v1/public/apps/{slug}/interactions`

Record a user interaction event for a public App — no authentication required.

Interaction events are written to the ``app_interactions`` collection for
analytics and relevance tuning. Write errors are swallowed server-side so
that a transient storage failure never surfaces as an error to the caller.

**Example:**
```json
{
  "event_type": "click",
  "document_id": "doc_abc123",
  "position": 2,
  "query": "red sneakers",
  "session_id": "sess_xyz"
}
```

## Path parameters

- `slug` string, required — Globally unique app slug

## Request body

- InteractionRequest — Request body for tracking a user interaction with a public App. Extra top-level fields are stored as-is alongside the standard fields, allowing callers to attach arbitrary metadata without schema changes.
  - `event_type` string, required — Interaction event type (e.g. 'click', 'search')
  - `document_id` string, nullable — ID of the document interacted with
  - `position` integer, nullable — Zero-based position of the result
  - `query` string, nullable — Search query that produced the result
  - `result_count` integer, nullable — Number of results returned
  - `latency_ms` integer, nullable — Time from request to first result (ms)
  - `dwell_ms` integer, nullable — Time the user spent on the result (ms)
  - `session_id` string, nullable — Client-side session identifier
  - `metadata` object, nullable — Arbitrary extra metadata

## Response `200`

Acknowledgement that the event was recorded

- object

## 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/versions/23e05292e326/schema)
