Create a new event.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Game title (max 100 chars) |
dateTime | string | Yes | ISO 8601 date, must be in the future |
sport | string | No | Sport preset ID (e.g. "football-5v5", "padel", "basketball"). Defaults to "football-5v5" |
location | string | No | Location text or URL (max 200 chars) |
maxPlayers | number | No | 2–30, defaults based on sport preset |
teamOneName | string | No | Defaults to "Ninjas" |
teamTwoName | string | No | Defaults to "Gunas" |
isRecurring | boolean | No | Enable recurrence |
recurrenceFreq | string | No | "weekly" or "monthly" |
recurrenceInterval | number | No | Repeat interval (default 1) |
recurrenceByDay | string | No | Day code: MO, TU, WE, TH, FR, SA, SU |
curl -X POST https://convocados.fly.dev/api/events \
-H "Content-Type: application/json" \
-d '{
"title": "Friday Game Night",
"dateTime": "2026-03-20T19:00:00Z",
"sport": "basketball",
"location": "Community Center",
"maxPlayers": 10
}' { "id": "clx1abc2d..." } Get full event details including players and team results. Also triggers lazy recurrence reset if applicable.
{
"id": "clx1abc2d...",
"title": "Friday Game Night",
"location": "Community Center",
"sport": "basketball",
"dateTime": "2026-03-20T19:00:00.000Z",
"maxPlayers": 10,
"teamOneName": "Ninjas",
"teamTwoName": "Gunas",
"isRecurring": false,
"nextResetAt": null,
"wasReset": false,
"players": [...],
"teamResults": [...]
} Compact event status with player counts and team assignments. Useful for polling.
{
"id": "clx1abc2d...",
"title": "Friday Game Night",
"maxPlayers": 10,
"players": {
"active": [{ "id": "...", "name": "Alice" }],
"bench": [],
"total": 1,
"spotsLeft": 9
},
"teams": [
{ "name": "Ninjas", "players": ["Alice", "Bob"] },
{ "name": "Gunas", "players": ["Carol", "Dave"] }
]
}