---
title: "Mint Stream Token"
method: POST
path: "/v1/stream/token"
tags: ["stream"]
---

# Mint Stream Token

`POST /v1/stream/token`

## Request

- Base URL: `https://api.ctindex.io`
- URL: `https://api.ctindex.io/v1/stream/token`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Mint a short-lived (5-minute) single-use stream token.

The portal calls this immediately before opening an EventSource — the
token replaces the raw API key in the ``?token=`` URL so the long-lived
key never lands in proxy logs / browser history / Referer headers.

Requires the firehose entitlement (402 otherwise) — minting a token for
a key that would be rejected at stream-open time is pure confusion for
the caller, and the early gate lets the portal render the upgrade CTA
before it even attempts an EventSource connection.

## Cookies

- `ctix_session` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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