Skip to content
Link copied to clipboard

API Access & Tokens

Last updated Mar 28, 2026

Overview

Lorekeeper provides a REST API for developers and power users who want to access their data programmatically. The API lets you read and update characters, query campaigns, and search the compendium.

API access must be enabled on your account by an administrator.

Getting an API Token

  1. Go to your Account Settings
  2. Under API Tokens, click Create Token
  3. Give the token a descriptive name (e.g., "My Discord Bot" or "Campaign Dashboard")
  4. Copy the token immediately — it won't be shown again

Store your token securely. Anyone with the token can access your account data.

Authentication

Include your token in the Authorization header of every request:

Authorization: Bearer YOUR_TOKEN_HERE

All API requests must be authenticated. Unauthenticated requests return 401 Unauthorized.

Available Endpoints

All endpoints are under /api/v1 and return JSON.

Characters

Method Endpoint Description
GET /api/v1/characters List all your characters
GET /api/v1/characters/{id} Get a specific character's details
PATCH /api/v1/characters/{id} Update a character
PATCH /api/v1/characters/{id}/hp Update a character's HP
GET /api/v1/characters/{id}/export Export character as JSON

Campaigns

Method Endpoint Description
GET /api/v1/campaigns List all your campaigns
GET /api/v1/campaigns/{id} Get campaign details
GET /api/v1/campaigns/{id}/sessions Get all sessions for a campaign
GET /api/v1/campaigns/{id}/npcs Get all NPCs for a campaign
GET /api/v1/campaigns/{id}/quests Get all quests for a campaign

Compendium

Method Endpoint Description
GET /api/v1/spells Search spells
GET /api/v1/monsters Search monsters
GET /api/v1/magic-items Search magic items

Rate Limiting

API requests are rate-limited to prevent abuse. If you exceed the limit, you'll receive a 429 Too Many Requests response. Wait a moment and retry.

Revoking a Token

To revoke a token:

  1. Go to your Account Settings
  2. Under API Tokens, find the token you want to revoke
  3. Click Delete

The token is immediately invalidated and can no longer be used.

Was this article helpful?

Thanks for the feedback!