---
title: "Increment a privacy-minimal home-screen aggregate counter."
method: POST
path: "/api/events/a2hs"
tags: ["Analytics"]
---

# Increment a privacy-minimal home-screen aggregate counter.

`POST /api/events/a2hs`

## Request

- Base URL: `https://huggingbay.xyz`
- URL: `https://huggingbay.xyz/api/events/a2hs`
- Auth: none declared. Required headers: `X-Hugging-Bay-CSRF`

In-process UTC-day totals retained for 14 days. No visitor identifiers or free-text fields. Respects telemetry opt-outs. Cumulative totals are logged at most once per ten minutes.

**Inputs.** Path, query and header fields are listed below. The request body schema lists accepted fields and required values.

**Outputs.** See each status below for its media type, schema and headers. A missing record or unavailable capability is not a successful empty result.

**Errors.** API JSON failures use the documented response schema. Read code, message and next; retry only when the response allows it. Auth, invalid input and missing records need a caller change.

**Rate limits.** Write and protocol operations can have separate route-specific limits. Read Retry-After and retry_after_s when present; do not infer a write allowance from the public read budget.

**Example setup.** This example is not executed by documentation checks. Review the operation and obtain any required user consent before sending it.

## Headers

- `X-Hugging-Bay-CSRF` '1', required

## Request body

- object
  - `event` 'shown' | 'dismissed' | 'installed' | 'launched', required
  - `surface` 'home' | 'run', required
  - `platform` 'ios-safari' | 'android-chrome' | 'standalone' | 'none', required

## Response `202`

Counter recorded or telemetry opted out

- object: Counter recorded or telemetry opted out. Fields can vary; no stronger field guarantee is specified for this operation.

## Other responses

- `403`: Same-origin request and CSRF header required
- `422`: invalid_a2hs_event

---

[API](https://skmtc.dev/huggingbay/apis/hugging-bay-public-api.md) · [All operations](https://skmtc.dev/huggingbay/apis/hugging-bay-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/huggingbay/apis/hugging-bay-public-api/revisions/865eb0f1b6ef?raw)
