Logstreem
Create a token
POST

Create a token

Issue a scoped token. The secret is returned once.

Scope every token to the least it needs. A shipper needs ingest on one dataset — not admin on all of them.

Store the secret now

token appears exactly once, in this response. There is no way to read it back — only to regenerate, which invalidates the old one.
POST/v1/tokens

Body parameters

namestringrequired

How it appears in the token list and the audit log.

scopesarrayrequired

Any of ingest, query, monitors, dashboards, admin.

datasetsarraydefault ["*"]

Dataset names this token may touch. ["*"] for all.

expires_atdatetime

Optional expiry. Recommended for anything handed to a person.

curl -X POST https://api.logstreem.com/v1/tokens \
  -H "Authorization: Bearer $LOGSTREEM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"CI ingest","scopes":["ingest"],"datasets":["api-gateway-prod"]}'

Responses

201Created
{
  "object": "token",
  "id": "tok_1d7e4b3a09c2f856d4a1",
  "name": "CI ingest",
  "scopes": ["ingest"],
  "datasets": ["api-gateway-prod"],
  "token": "lstrm_live_9f2c7b1a4d8e0c3f6a5b",
  "created_at": "2026-09-06T09:14:22.114Z"
}
401Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "missing_token",
    "message": "No API token provided.",
    "doc_url": "https://logstreem.com/docs/errors#missing_token",
    "request_id": "req_9f3c2a7b41de08c5b2e6"
  }
}
Try itsandbox