---
title: "Mint a short-lived realtime access token for a board"
method: POST
path: "/api/realtime/token"
tags: ["Internal"]
---

# Mint a short-lived realtime access token for a board

`POST /api/realtime/token`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/realtime/token`
- Auth: HTTP bearer

Transport plumbing for Tre’s own clients: authorizes a WebSocket to one board with the caller’s board role. PATs require write or admin scope after board visibility. A finite parent caps the child token’s nominal expiry at its own expiry or 15 minutes; existing verifier leeway and socket retirement behavior remain unchanged.

## Request body

- RelayTokenRequest
  - `boardId` string, uuid, required

## Response `200`

Success

- RelayTokenResponse
  - `token` string, required
  - `url` string, required
  - `expiresAt` integer, required

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
