---
title: "Mint a web tracking identity token"
method: POST
path: "/web-tracking-identities"
tags: ["Web Tracking Keys"]
---

# Mint a web tracking identity token

`POST /web-tracking-identities`

Mints a short-lived HMAC proof bound to one active web tracking key, workspace, and normalized email. Identify the key by keyId or by its publishable publicKey value. If the email is not yet a contact, one is created (active, no lists, no automations triggered) so identified events are attributed instead of being silently dropped. Call this only from an authenticated backend; never expose the secret API key in browser code. Identified browser events without this proof are rejected before queueing. Requires commerce:write, automations:trigger, and subscribers:write (minting can create the contact).

## Request body

- object
  - `keyId` string — Internal web tracking key ID. Provide this or publicKey.
  - `publicKey` string — Publishable key value (seq_pk_...). Provide this or keyId.
  - `email` string, email, required
  - `ttlHours` number

## Response `200`

Identity proof minted

- object
  - `success` boolean
  - `keyId` string
  - `publicKey` string
  - `email` string, email
  - `subscriberId` string — Contact the minted identity resolves to; created on first mint for a new email.
  - `identityToken` string
  - `expiresAt` string, date-time

## Other responses

- `400` — Invalid email or token lifetime, neither keyId nor publicKey provided, or the email cannot be added as a contact
- `401` — Unauthorized
- `403` — API key is missing commerce:write, automations:trigger, or subscribers:write
- `404` — Active web tracking key not found

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/8fbabe82a04d/schema)
