All endpoints accept and return JSON. The base URL is your deployment origin.
https://convocados.fly.dev For local development: http://localhost:4321
All requests with a body must include:
Content-Type: application/json Errors return a JSON object with an error field:
{ "error": "Not found." } | Code | Meaning |
|---|---|
200 | Success |
400 | Bad request (missing/invalid fields) |
403 | Forbidden (e.g. editing locked history) |
404 | Resource not found |
409 | Conflict (duplicate player name, duplicate webhook URL) |
429 | Rate limited |
Event creation is limited to 10 per hour per IP.
The IP is read from fly-client-ip or x-forwarded-for headers.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/events | Create an event |
| GET | /api/events/[id] | Get event details |
| GET | /api/events/[id]/status | Get event status (compact) |
| POST | /api/events/[id]/players | Add a player |
| DELETE | /api/events/[id]/players | Remove a player |
| POST | /api/events/[id]/randomize | Randomize teams |
| PUT | /api/events/[id]/teams | Save team assignments |
| PUT | /api/events/[id]/team-names | Update team names |
| GET | /api/events/[id]/known-players | Get player suggestions |
| POST | /api/events/[id]/webhooks | Subscribe a webhook |
| GET | /api/events/[id]/webhooks | List webhooks |
| DELETE | /api/events/[id]/webhooks/[webhookId] | Unsubscribe a webhook |
| POST | /api/events/[id]/push | Subscribe to push notifications |
| DELETE | /api/events/[id]/push | Unsubscribe from push |
| GET | /api/push/vapid-public-key | Get VAPID public key |
| GET | /api/events/[id]/history | List game history |
| PATCH | /api/events/[id]/history/[historyId] | Update history entry |