⚽ Convocados Docs GitHub

API Reference

All endpoints accept and return JSON. The base URL is your deployment origin.

Base URL

https://convocados.fly.dev

For local development: http://localhost:4321

Content Type

All requests with a body must include:

Content-Type: application/json

Error format

Errors return a JSON object with an error field:

{ "error": "Not found." }

Common status codes

CodeMeaning
200Success
400Bad request (missing/invalid fields)
403Forbidden (e.g. editing locked history)
404Resource not found
409Conflict (duplicate player name, duplicate webhook URL)
429Rate limited

Rate limiting

Event creation is limited to 10 per hour per IP. The IP is read from fly-client-ip or x-forwarded-for headers.

Endpoints

MethodEndpointDescription
POST/api/eventsCreate an event
GET/api/events/[id]Get event details
GET/api/events/[id]/statusGet event status (compact)
POST/api/events/[id]/playersAdd a player
DELETE/api/events/[id]/playersRemove a player
POST/api/events/[id]/randomizeRandomize teams
PUT/api/events/[id]/teamsSave team assignments
PUT/api/events/[id]/team-namesUpdate team names
GET/api/events/[id]/known-playersGet player suggestions
POST/api/events/[id]/webhooksSubscribe a webhook
GET/api/events/[id]/webhooksList webhooks
DELETE/api/events/[id]/webhooks/[webhookId]Unsubscribe a webhook
POST/api/events/[id]/pushSubscribe to push notifications
DELETE/api/events/[id]/pushUnsubscribe from push
GET/api/push/vapid-public-keyGet VAPID public key
GET/api/events/[id]/historyList game history
PATCH/api/events/[id]/history/[historyId]Update history entry