---
title: "Ingest server-side pageview"
method: POST
path: "/api/ingest/server/pageview"
tags: ["Ingest"]
---

# Ingest server-side pageview

`POST /api/ingest/server/pageview`

## Request

- Base URL: `https://demo.hitkeep.com`
- URL: `https://demo.hitkeep.com/api/ingest/server/pageview`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Accepts one trusted server-side pageview from an API client. Use this endpoint for backend forwarding, CMS plugins, reverse proxy forwarding, edge workers, and historical pageview replay. It does not require browser Origin or Referer headers. HitKeep resolves the site from the submitted URL hostname, requires site.manage_data for that resolved site, and uses visitor_ip for ingest-time exclusions, spam filtering, and country, region, city, provider, and ASN lookup. UTM values and hk_qr QR attribution are read from the query string in url, for example utm_source, utm_campaign, and hk_qr on the visitor-facing URL, not from top-level JSON fields. Stored analytics records contain derived country, region, city, provider, and ASN context. HitKeep does not store the raw visitor IP. This endpoint uses the ingest rate limiter.

## Request body

- object
  - `dnt` boolean: When true, HitKeep drops the record consistently with browser tracker privacy behavior.
  - `language` string
  - `page_id` string, uuid: Optional page identifier. Generated when omitted.
  - `referrer` string
  - `screen_height` integer
  - `screen_width` integer
  - `session_id` string, uuid: Optional visitor grouping key. If omitted, this record gets its own standalone session.
  - `timestamp` string, date-time, required: Canonical analytics time in RFC3339 format.
  - `url` string, uri, required: Absolute page URL. The hostname resolves the configured HitKeep site. UTM values and hk_qr QR attribution are read from this URL query string.
  - `user_agent` string, required: User agent from the original visitor request context.
  - `viewport_height` integer
  - `viewport_width` integer
  - `visitor_ip` string, ip, required: Trusted transient visitor IP context. Used to derive country, region, city, provider, and ASN metadata. HitKeep does not store the raw visitor IP.

## Response `202`

Accepted. Empty response body.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Access denied
- `404`: Site not found
- `429`: Too many requests
- `503`: Service not available

---

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