Developer API
API Overview
Bot API keys cover characters, campaigns, and crews. First-party mobile clients use Firebase auth on /api/app/v1/groups for revisioned campaign and crew sync.
Interactive Documentation
Explore the full API specification with our interactive Swagger UI. Test endpoints, view request/response schemas, and understand the complete API capabilities.
Open Swagger UIAPI Key
Bot API endpoints require authentication via the X-Bot-API-Key header.
# Example request
curl -H "X-Bot-API-Key: your-bot-api-key" \
"https://jollyrogenerator.com/api/bot/characters?discordId=123456789"
Contact us to obtain an API key for your integration.
App Groups routes under /api/app/v1 use Authorization: Bearer with a Firebase ID token. They are private and outside public CORS.
Rate Limits
Rate limits are applied per API key to ensure fair usage and system stability.
| Operation Type | Limit |
|---|---|
| Read (GET) | 100 requests/minute |
| Write (POST, PATCH, DELETE) | 30 requests/minute |
Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in all responses.
Endpoints
Highlights below. Swagger lists the full surface, including App Groups schemas.
Characters (Bot)
/api/bot/charactersList all characters for a Discord user
/api/bot/characters/:idGet full character details including items and abilities
/api/bot/characters/:idUpdate HP, luck, silver, or ability scores
/api/bot/characters/:id/inventoryGet character inventory categorized by type
/api/bot/characters/:id/inventoryAdd a new item to character inventory
/api/bot/characters/:id/inventory/:itemIdRemove an item from character inventory
/api/bot/characters/:id/advanceLevel up character with automatic HP roll
Campaigns (Bot)
/api/bot/campaignsList campaigns for a Discord user
/api/bot/campaignsCreate a campaign with the user as GM
/api/bot/campaigns/:idGet campaign details, members, and characters
/api/bot/campaigns/join/:inviteCodeJoin a campaign with an invite code
/api/bot/campaigns/:id/charactersAssign an owned character to a campaign
/api/bot/campaigns/:id/membersList campaign members
Crews (Bot)
/api/bot/crewsList crews for a Discord user
/api/bot/crewsCreate a crew with equal member permissions
/api/bot/crews/:idGet crew details, members, and characters
/api/bot/crews/join/:inviteCodeJoin a crew with an invite code
/api/bot/crews/:id/notesRead or update shared crew notes
/api/bot/crews/:id/leaveLeave a crew
App Groups (Firebase)
/api/app/v1/groups?type=…List campaigns or crews for the signed-in user
/api/app/v1/groupsCreate a campaign or crew with a mutation envelope
/api/app/v1/groups/joinJoin by invite code with clientMutationId
/api/app/v1/groups/:idFetch a revisioned group snapshot
/api/app/v1/groups/:idUpdate group fields against baseRevision
/api/app/v1/groups/:id/activityCursor-paginated activity for a group
Error Codes
All errors return a JSON response with an error code for easy handling.
| Code | Description |
|---|---|
UNAUTHORIZED | Authentication required |
INVALID_API_KEY | Invalid API key provided |
OWNERSHIP_DENIED | User does not own the resource |
RATE_LIMITED | Rate limit exceeded |
NOT_FOUND | Resource not found |
CHARACTER_NOT_FOUND | Character not found |
ITEM_NOT_FOUND | Item not found |
CAMPAIGN_NOT_FOUND | Campaign not found |
NOT_CAMPAIGN_MEMBER | User is not a campaign member |
CREW_NOT_FOUND | Crew not found |
NOT_CREW_MEMBER | User is not a crew member |
REVISION_CONFLICT | Stale baseRevision on an app group write |
VALIDATION_ERROR | Request validation failed |