---
title: "Init session"
method: PUT
path: "/6/{hashid}/stats/init"
tags: ["Session & Events"]
---

# Init session

`PUT /6/{hashid}/stats/init`

Starts a session identified by a session_id. The session is used to
"group" events. I.e. it groups user interactions during a session.
Like clicking some banner images, or completing a checkout.

## Path parameters

- `hashid` string, required

## Request body

- InitSessionRequest
  - `session_id` string, required — Identifier of search session
  - `user_id` string — Identifier of user

## Response `200`

OK

- StatsResponse — Response returned over register stat operation.
  - `status` string — Result of the stats request. i.e. 'registered'

## Other responses

- `400` — Bad Request — session_id missing or exceeds 32 characters; user_id exceeds 36 characters.
- `403` — Forbidden — missing or invalid API token, client IP is blocked, or CORS `Origin` not allowed.

---

[API](https://skmtc.dev/doofinder/apis/recommendations-api.md) · [All operations](https://skmtc.dev/doofinder/apis/recommendations-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/doofinder/recommendations-api/revisions/50dc63ab0921/schema)
