POST /api/v1/sorteos
Creates a new sorteo (lottery draw) for a specific loteria. The sorteo will be created inSCHEDULED status by default.
Sorteos can be created manually or automatically via the seed sorteos endpoint.
Authentication
Request Body
UUID of the loteria this sorteo belongs to. The loteria must be active.
ISO 8601 datetime when the sorteo is scheduled to run. Must be in Costa Rica timezone (GMT-6).Example:
"2025-03-03T12:55:00-06:00" (12:55 PM Costa Rica time)Display name for the sorteo. Typically includes the loteria name and time.Examples:
"Lotto 12:55 PM", "Tica 6:55 PM"Min: 1 character, Max: 100 charactersNumber of digits for winning numbers (2 or 3).
- 2 digits: Times/Tiempos lotteries (00-99)
- 3 digits: Monazos lotteries (000-999)
rulesJson.digits configuration.Whether the sorteo is active and available for ticket sales.
Response
Indicates if the operation was successful
The created sorteo object
Example Request
Example Response
Error Responses
Sorteo Lifecycle
After creation, a sorteo goes through the following states:Digits Configuration
Thedigits field determines the valid range of numbers:
Timezone Handling
See Timezone Handling for details.Related Endpoints
List Sorteos
Get all sorteos with filtering
Open Sorteo
Open a sorteo for ticket sales
Evaluate Sorteo
Set winning number and evaluate tickets
Seed Sorteos
Auto-generate sorteos from schedule