Analytics Ingest Keys

Mint a new analytics ingest key.

The returned public_key is not a secret: it is designed to be embedded in client-side JavaScript and sent as X-Temps-Analytics-Key or ?temps_key=. It is returned in full here and on every subsequent read, so an operator can copy it at any time; there is no "reveal" step because there is nothing to conceal.

post/projects/{project_id}/analytics/ingest-keys

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/analytics/ingest-keys
  • Auth: HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

allowed_originsstring[] nullable

Exact origins permitted to use this key from a browser. Omit or send an empty array to allow any origin.

environment_idinteger nullable

Scope the key to a single environment. Recommended: it lets Temps attribute ingested data to that environment's current deployment. Omit for a project-wide key.

namestring nullable

Operator-facing label. Defaults to "Default ingest key".

rate_limit_per_minuteinteger nullable

Requests per minute for this key. Omit for the 600/min default; send a non-positive value for unlimited.

Response

Ingest key created

allowed_originsstring[] nullable

Exact origins (scheme://host[:port]) permitted to use this key from a browser. None or [] means any origin. This is a browser-enforced convenience control, not authentication — a non-browser client ignores Origin entirely.

created_atstring date-time required
created_by_user_idinteger nullable
environment_idinteger nullable

None means the key is scoped to the whole project. An environment-scoped key additionally attributes ingested data to that environment's current deployment, when it has one.

event_countinteger required
idinteger required
is_activeboolean required
last_used_atstring date-time nullable
namestring required

Operator-facing label.

project_idinteger required
public_keystring required

The ingest key itself, pa_ + 64 hex characters.

Not a secret. It is designed to ship in client-side JavaScript and is returned unmasked so operators can copy it. See the module docs.

rate_limit_per_minuteinteger nullable

None or <= 0 means unlimited.

revoked_atstring date-time nullable
updated_atstring date-time required

Example response

{
  "created_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z",
  "revoked_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z"
}

Changes

No recorded changes to this operation across all 50 revisions of this API.