---
title: "Track a search result click"
method: POST
path: "/api/v2/projects/{slug}/search/click/"
tags: ["Projects"]
---

# Track a search result click

`POST /api/v2/projects/{slug}/search/click/`

## Request

- Base URL: `https://app.biel.ai`
- URL: `https://app.biel.ai/api/v2/projects/{slug}/search/click/`
- Auth: one of:
  - API key in header `Authorization`
  - none

Register a click on a search result for analytics. Call this after the user clicks on a result returned by [`GET /api/v2/projects/{slug}/search/`](/api/search-project).

Include the optional `query` and 1-based `position` when they are available to attribute the click to the result list that produced it. Clients that do not provide attribution can continue to send an empty body.

**Required permission:** `search` (private projects only).

## Path parameters

- `slug` string, required

## Request body

- object
  - `query` string: Search query that produced the clicked result.
  - `position` integer: One-based rank of the clicked result in that query's result list.

## Response `200`

Click registered successfully

- object
  - `message` string

## Other responses

- `403`: Forbidden. Missing permissions.
- `404`: Resource not found.

---

[API](https://skmtc.dev/biel/apis/biel-ai-api.md) · [All operations](https://skmtc.dev/biel/apis/biel-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/biel/apis/biel-ai-api/revisions/ac7034d82696?raw)
