API Reference
Authentication: Most endpoints require a JWT token in the Authorization header:
Authorization: Bearer <token>
Authentication
POST
/api/auth/register
Register a new user account.
// Request
{ "name": "John", "email": "[email protected]", "password": "secret" }
// Response
{ "token": "...", "user": { "id": 1, "name": "John", "email": "[email protected]" } }
POST
/api/auth/login
Login with email and password.
GET
/api/auth/me
Get current user info.
Shows
GET
/api/shows
List all shows the user is a member of.
POST
/api/shows
Create a new show. Creator becomes admin.
{ "name": "Hamlet 2024", "description": "Spring production" }
GET
/api/shows/:id
Get show details including user_role.
Invitations
POST
/api/shows/:id/invite
Generate a magic invite link.
// Response
{ "token": "abc-123", "inviteUrl": "/join/abc-123", "show": { "id": 1, "name": "Hamlet" } }
GET
/api/invite/:token
Validate an invite link (public).
POST
/api/invite/:token/join
Join a show via invite link.
Announcements
GET
/api/shows/:id/announcements
List announcements (all members).
POST
/api/shows/:id/announcements
Create announcement (admin only).
DELETE
/api/shows/:id/announcements/:announcementId
Delete announcement (admin only).
Events
GET
/api/shows/:id/events
List events with RSVP counts.
POST
/api/shows/:id/events
Create event (admin only).
{ "title": "Rehearsal", "event_date": "2024-03-15", "start_time": "19:00", "group_id": 1 }
POST
/api/shows/:id/events/:eventId/rsvp
RSVP to event.
{ "status": "yes" } // or "maybe"
Groups
GET
/api/shows/:id/groups
List user groups.
POST
/api/shows/:id/groups
Create group (admin only).
{ "name": "Leads", "color": "#ff3366" }
POST
/api/shows/:id/groups/:groupId/members
Add member to group (admin only).
{ "userId": 5 }
Media
GET
/api/shows/:id/media
List media files.
POST
/api/shows/:id/media
Upload file (admin only). Use multipart/form-data with "file" field.
Chat
GET
/api/shows/:id/messages
Get messages. Optional ?after=timestamp param.
POST
/api/shows/:id/messages
Send a message.
{ "content": "Hello team!" }