---
title: "Send Hit Event."
method: POST
path: "/event/hit"
tags: ["event"]
---

# Send Hit Event.

`POST /event/hit`

Send a hit event to register a user view.

## Headers

- `User-Agent` string
- `Accept-Language` string

## Request body

- union — Website hit event.
  - EventLoad — Page view load event.
    - `b` string, required — Beacon ID generated for each user to link multiple events on the same page together.
    - `u` string, uri, required — Page URL including query parameters.
    - `r` string — Referrer URL.
    - `p` boolean, required — If the user is a unique user or not.
    - `q` boolean, required — If the user has visited this page before or not.
    - `t` string — Timezone of the user.
  - EventUnload — Page view unload event.
    - `b` string, required — Beacon ID generated for each user to link multiple events on the same page together.
    - `m` integer, required — Time spent on page in milliseconds.

## Response `204`

OK.

## Other responses

- `400` — 400 Bad Request.
- `404` — 404 Not Found.
- `500` — 500 Unexpected Internal Server Error.

## Changes

- **2024-01-31** `cc4d2bf1b3e9` — 1 info
  - added request discriminator
- **2024-01-30** `eefc6adaa33a` — 1 breaking, 7 warning, 1 info
  - the request's body type changed from `object` to no type
  - removed the request property `b`
  - removed the request property `d`
  - removed the request property `e`
  - …5 more
- **2024-01-22** `6551306b6ea8` — 3 warning
  - removed the request property `h`
  - removed the request property `t`
  - removed the request property `w`
- **2023-11-30** `b14c4d77339a` — 1 info
  - the `r` request property format was generalized from `uri` to no format
- **2023-11-30** `1f9213be2375` — 5 breaking, 4 info
  - request property `e` was restricted to a list of enum values
  - the request property `d` became required
  - the request property `p` became required
  - the `r` request property format changed from no format to `uri`
  - …5 more

[Full history](https://skmtc.dev/medama-io/apis/medama-analytics-api/changes/event/hit/post.md)

---

[API](https://skmtc.dev/medama-io/apis/medama-analytics-api.md) · [All operations](https://skmtc.dev/medama-io/apis/medama-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/medama-io/medama-analytics-api/revisions/7e58a00a419e/schema)
