BookSounds API
Machine-readable spec: /api/openapi.json. Protected routes take Authorization: Bearer <access-token>; responses expose GUIDs and slugs, never numeric ids.
Register, sign in, rotate tokens, recover passwords, manage sessions. Access tokens are Bearer JWTs (15 min); refresh tokens rotate in HttpOnly cookies.
| Method | Path | Description |
|---|---|---|
| POST | /api/auth/register | Create an account (rate limited 5/h/IP) |
| POST | /api/auth/login | Sign in (rate limited 10/15m/IP) |
| POST | /api/auth/refresh | Rotate refresh cookie, issue new access token (reuse revokes the session family) |
| POST | /api/auth/logout π | Revoke current session |
| POST | /api/auth/logout-all π | Revoke every session |
| GET | /api/auth/me π | Current user, plan + limits, accessible creators (owned + team) |
| POST | /api/auth/forgot-password | Request a one-time reset link (always generic response) |
| POST | /api/auth/reset-password | Consume reset token, set new password, revoke sessions |
| POST | /api/auth/verify-email | Consume verification token |
| POST | /api/auth/resend-verification π | Resend verification email (3/h) |
| POST | /api/auth/change-password π | Change password (current session survives) |
| POST | /api/auth/change-email π | Step 1 of email change: sends confirmation link to the new address |
| POST | /api/auth/confirm-email | Step 2 of email change: consume token, swap email, revoke sessions |
| GET | /api/auth/sessions π | List active sessions (current flagged) |
| DELETE | /api/auth/sessions/{guid} π | Revoke one session |
No authentication. GUIDs or slugs accepted. Numeric ids never appear.
| Method | Path | Description |
|---|---|---|
| GET | /api/public/creators/{guid} | Public creator profile (GUID or slug) |
| GET | /api/public/creators/{guid}/series | Creator's active series |
| GET | /api/public/creators/{guid}/works | Creator's published works (paginated: page, per_page β€ 50) |
| GET | /api/public/series/{guid} | Public series (GUID or slug) |
| GET | /api/public/series/{guid}/works | Works in a series (paginated) |
| GET | /api/public/works/{guid} | Work detail with credits and destinations (GUID or slug) |
| GET | /api/public/works/{guid}/destinations | Active destinations for a work |
| GET | /api/public/search | Search profiles and works (?q=, 60/min) |
| POST | /api/public/analytics/events | Analytics ingestion (120/min) |
| GET | /api/health | Liveness probe |
Creator profiles β the public page and its settings. Plan-limited.
| Method | Path | Description |
|---|---|---|
| GET | /api/creators π | List my creators |
| POST | /api/creators π | Create creator (plan-limited) |
| GET | /api/creators/{guid} π | Creator (admin view, includes your_role) |
| PATCH | /api/creators/{guid} π | Update creator (edit access) |
| DELETE | /api/creators/{guid} π | Soft-delete creator (owner only) |
Book series, podcasts, and collections under a creator.
| Method | Path | Description |
|---|---|---|
| GET | /api/series π | List series for a creator (?creator_guid=, paginated) |
| POST | /api/series π | Create series (edit access) |
| GET | /api/series/{guid} π | Series (admin view) |
| PATCH | /api/series/{guid} π | Update series |
| DELETE | /api/series/{guid} π | Soft-delete series |
Books, audiobooks, episodes, playlists. Plan-limited per profile.
| Method | Path | Description |
|---|---|---|
| GET | /api/works π | List works for a creator (?creator_guid=, paginated) |
| POST | /api/works π | Create work (plan-limited) |
| GET | /api/works/{guid} π | Work (admin view with creator/series/destinations) |
| PATCH | /api/works/{guid} π | Update work |
| DELETE | /api/works/{guid} π | Soft-delete work |
Platform links attached to works (Spotify, Audible, Amazonβ¦).
| Method | Path | Description |
|---|---|---|
| GET | /api/works/{guid}/destinations π | List destinations (view access) |
| POST | /api/works/{guid}/destinations π | Add destination (edit access) |
| PATCH | /api/destinations/{guid} π | Update destination / toggle active |
| DELETE | /api/destinations/{guid} π | Remove destination |
Collaborator credits with roles; the credited creator verifies their own credit.
| Method | Path | Description |
|---|---|---|
| GET | /api/works/{guid}/credits π | List credits on a work |
| POST | /api/works/{guid}/credits π | Add credit (creator_guid or creator_ref = slug/URL) |
| GET | /api/credits π | Credits received by my creator (?creator_guid=) β verification inbox |
| PATCH | /api/credits/{guid} π | Edit role/order (work editor) or toggle verified (credited creator) |
| DELETE | /api/credits/{guid} π | Remove credit (work editor) |
Invite members by email with admin/editor/viewer roles.
| Method | Path | Description |
|---|---|---|
| GET | /api/creators/{guid}/memberships π | List team (manage access) |
| POST | /api/creators/{guid}/memberships π | Add member by email (owner only) |
| PATCH | /api/memberships/{guid} π | Change member role (owner only) |
| DELETE | /api/memberships/{guid} π | Remove member (owner) or leave (self) |
Uploads, data export, and account deletion.
| Method | Path | Description |
|---|---|---|
| POST | /api/uploads π | Upload an image (multipart "file", β€ 5 MB, 30/h) |
| GET | /api/account/export π | Download full JSON export of your data |
| POST | /api/account/delete π | Delete account (password required; anonymizes + revokes everything) |
Stripe checkout and portal (503 until configured).
| Method | Path | Description |
|---|---|---|
| POST | /api/billing/checkout π | Create Stripe checkout session (503 until configured) |
| POST | /api/billing/portal π | Open Stripe billing portal |
Platform administration (users.is_admin required).
| Method | Path | Description |
|---|---|---|
| GET | /api/admin/overview π | Platform counts + recents (admins only) |
| GET | /api/admin/users π | List users |
| PATCH | /api/admin/users/{guid} π | Suspend / disable / reactivate a user (revokes sessions) |
| GET | /api/admin/creators π | All creator profiles with owners |
| PATCH | /api/admin/creators/{guid} π | Moderate a profile (hide/restore/delete) |
| GET | /api/admin/audit-logs π | Security audit log (?limit= β€ 500) |
Inbound provider events, signature-verified.
| Method | Path | Description |
|---|---|---|
| POST | /api/webhooks/stripe | Stripe events (signature-verified) |