Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt

Use this file to discover all available pages before exploring further.

Sync tokens are the credentials your local BurnGuard proxy uses to authenticate against POST /v1/usage. Each token is a bg_-prefixed random string; the raw value is only ever returned once at creation time. After that, only a SHA-256 hash is stored — BurnGuard Cloud can validate future requests but cannot reconstruct or display the original token. You can create one token per environment (production, staging, local) and list all tokens to review activity via last_used_at.
The raw token value is returned only once, immediately after creation. Copy it to your burnguard.yaml or a secrets manager before closing the response — there is no way to retrieve it again.

POST /v1/tokens

Creates a new sync token for the authenticated user and returns the raw bg_... value. Auth: Requires session — Authorization: Bearer session_<id>. Request body:
name
string
required
A human-readable label for this token. Use something that identifies the environment or deployment, e.g. "production-proxy" or "local-dev". The name is stored in plain text and shown in GET /v1/tokens responses; it is not a secret.
Response: 201 Created
token
string
The raw sync token value prefixed with bg_. This is the value to set as sync_token in burnguard.yaml. Shown only once.
message
string
A reminder that the token will not be shown again.
curl -X POST https://api.burnguard.run/v1/tokens \
  -H "Authorization: Bearer session_abc123" \
  -H "Content-Type: application/json" \
  -d '{ "name": "production-proxy" }'
{
  "data": {
    "token": "bg_a1b2c3d4e5f6g7h8i9j0klmnopqrstuvwxyz",
    "message": "Save this token — it won't be shown again"
  }
}
Add the returned token to your proxy config file:
sync:
  token: "bg_a1b2c3d4e5f6g7h8i9j0klmnopqrstuvwxyz"
  url: "https://api.burnguard.run"

GET /v1/tokens

Lists all sync tokens belonging to the authenticated user. Token values are not included — only metadata. Use last_used_at to confirm that a proxy is actively syncing. Auth: Requires session — Authorization: Bearer session_<id>. Request: No parameters or body. Response: Array of sync token metadata objects.
id
number
Internal numeric ID of the token record.
user_id
number
ID of the user who owns this token.
name
string
The human-readable label supplied at creation time.
last_used_at
string | null
ISO 8601 timestamp of the last successful POST /v1/usage call authenticated by this token. null if the token has never been used.
created_at
string
ISO 8601 timestamp of when the token was created.
curl https://api.burnguard.run/v1/tokens \
  -H "Authorization: Bearer session_abc123"
{
  "data": [
    {
      "id": 3,
      "user_id": 42,
      "name": "production-proxy",
      "last_used_at": "2025-01-19T14:35:00Z",
      "created_at": "2025-01-10T09:00:00Z"
    },
    {
      "id": 4,
      "user_id": 42,
      "name": "local-dev",
      "last_used_at": null,
      "created_at": "2025-01-18T16:22:10Z"
    }
  ]
}
Token values are never returned in list responses. If you lose a token, create a new one and update your proxy configuration — the old token can be revoked once the DELETE /v1/tokens/{id} route is available. The store method exists but this route is not yet mounted on the server.

Build docs developers (and LLMs) love