---
title: "Generate Site Auth"
method: GET
path: "/api/v1/analytics/content/siteauth/generate/{siteId}"
tags: ["Content Analytics"]
---

# Generate Site Auth

`GET /api/v1/analytics/content/siteauth/generate/{siteId}`

Generates and returns a Site Key that must be used by the client-side JS code to send custom Content Analytics Events

## Path parameters

- `siteId` string, required

## Response `200`

The Site key was generated and returned successfully

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Site ID in path is not found or incorrect path
- `405` — Method Not Allowed
- `500` — Internal Server Error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
