Build custom author workflows, integrate book distribution with your personal website, automate newsletter subscribers, and fetch real-time analytics with the BookBeam Headless API.
All API endpoints are scoped under the /api/v1 prefix. Requests must include Accept: application/json and send JSON payloads with Content-Type: application/json unless uploading multipart files.
https://bookbeam.app/api/v1
Accept: application/json
Authorization: Bearer {token}
Team Context: If your user account belongs to multiple teams, specify X-Team-ID: {team_id} to switch active team scope for any authenticated request.
The official jonbaldie/bookbeam-cli orchestrates the headless API from your terminal. Manage book projects, upload files, create signup links, export subscribers, and query analytics in shell scripts. It sends authenticated requests to the same /api/v1 endpoints documented here.
With Go installed, install the CLI from its public repository:
go install github.com/jonbaldie/bookbeam-cli@latest
Go installs the binary as bookbeam-cli in your Go bin directory. Rename it to bookbeam (or bookbeam.exe on Windows) and add that directory to your PATH to use the commands below.
Start browser login, approve the displayed device code in BookBeam, then check your identity. The CLI saves the resulting token for subsequent commands.
bookbeam auth login
bookbeam whoami
Create a project, then replace 123 with its ID from the project list. Use the path to your own EPUB, MOBI, or PDF when uploading.
bookbeam projects create --title "My Book" --json
bookbeam projects list --json
bookbeam files upload 123 ./book.epub --json
bookbeam files list 123 --json
bookbeam links create 123 --title "Reader sample" --consent "Join my newsletter" --json
bookbeam links list 123 --json
bookbeam downloaders export 123 --output ./subscribers.csv
These commands call the project, file, signup link, and downloader endpoints below. The export command writes a CSV file to your chosen path.
For scripts or CI, supply an existing personal access token through BOOKBEAM_TOKEN. Use your CI secret store for the value. The following shell examples use --json to return API responses for tools such as jq.
export BOOKBEAM_TOKEN="your-api-token"
bookbeam projects list --json
bookbeam metrics --json
bookbeam billing status --json
# Target a local BookBeam server with a token issued by that server
bookbeam --host http://localhost:8000 projects list --json
The default host is https://bookbeam.app. Override it with --host or BOOKBEAM_HOST, using the origin without /api/v1. Run bookbeam --help or bookbeam projects --help for more commands and flags.
BookBeam uses Laravel Sanctum personal access tokens. Use the CLI browser login, or generate a token from your application by submitting your author account credentials to the endpoint below.
/api/v1/tokens
Generate a new Bearer token.
curl -X POST https://bookbeam.app/api/v1/tokens \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "author@example.com",
"password": "your-password",
"name": "CLI Integration Token"
}'
/api/v1/tokens
List active tokens for your account.
curl -X GET https://bookbeam.app/api/v1/tokens \
-H "Authorization: Bearer $BOOKBEAM_TOKEN" \
-H "Accept: application/json"
/api/v1/tokens/{token_id}
Revoke an active token by ID.
Book projects represent your books and manuscripts. Each project contains uploaded file assets and signup giveaway links.
/api/v1/projects
List all book projects for your active team.
curl -X GET https://bookbeam.app/api/v1/projects \
-H "Authorization: Bearer $BOOKBEAM_TOKEN" \
-H "Accept: application/json"
/api/v1/projects
Create a new book project (supports multipart for cover image).
curl -X POST https://bookbeam.app/api/v1/projects \
-H "Authorization: Bearer $BOOKBEAM_TOKEN" \
-F "title=The Quantum Detective" \
-F "description=Detective Jack Hunter investigates across realities." \
-F "cover_image=@/path/to/cover.jpg"
/api/v1/projects/{id}
Get project details with files & links.
/api/v1/projects/{id}
Update book title or description.
/api/v1/projects/{id}
Delete project and all attached files.
/api/v1/projects/{id}/downloaders
List reader downloads and signups.
/api/v1/projects/{id}/export-downloaders
Export readers list as CSV download.
/api/v1/projects/{id}/newsletter
Assign newsletter list ID to project.
Upload and manage ebook assets for each book project. Supported formats: EPUB, MOBI, and PDF.
/api/v1/projects/{id}/files
Upload a new manuscript file (multipart/form-data).
curl -X POST https://bookbeam.app/api/v1/projects/1/files \
-H "Authorization: Bearer $BOOKBEAM_TOKEN" \
-F "file=@/path/to/novel.epub" \
-F "format=epub"
.../files
List files uploaded for project.
.../files/{id}/download
Author binary file stream.
.../files/{id}
Delete file & purge storage.
Create reader campaign links with custom titles and opt-in text. Share these links on social media, newsletters, or your author blog.
/api/v1/projects/{id}/links
Create a new giveaway signup link.
curl -X POST https://bookbeam.app/api/v1/projects/1/links \
-H "Authorization: Bearer $BOOKBEAM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Newsletter Giveaway",
"opt_in_text": "Join my VIP reader newsletter for free bonus chapters"
}'
.../links
List project signup links.
.../links/{id}
Update title or opt-in text.
.../links/{id}
Delete campaign link.
Public endpoints for reader interaction. Embed book giveaways seamlessly into your custom web applications.
/api/v1/readers/links/{slug}
Fetch public landing metadata (title, author, formats) for a campaign link.
curl -X GET https://bookbeam.app/api/v1/readers/links/sample-slug \
-H "Accept: application/json"
/api/v1/readers/links/{slug}/signup
Submit reader email to receive magic confirmation link.
curl -X POST https://bookbeam.app/api/v1/readers/links/sample-slug/signup \
-H "Content-Type: application/json" \
-d '{
"email": "reader@example.com"
}'
/api/v1/readers/confirm
Verify signed email confirmation link.
.../readers/files/{id}/download
Reader secure signed download stream.
Retrieve real-time metrics, audit logs, and your active subscription status.
/api/v1/dashboard/metrics
Returns aggregate download and reader signup counts.
/api/v1/logs
Returns chronological audit events and user actions.
/api/v1/billing
Returns subscription status and active offer details.
Import the BookBeam API specification directly into Postman, Insomnia, Swagger UI, or code generation tools to quickly scaffold SDKs and scripts.