API ReferenceEvents
POST /events
Criar um evento
POST
/eventsAuth: accessTokenCria um novo evento para o usuário autenticado.
Request
Body (JSON)
| Campo | Tipo | Descrição |
|---|---|---|
| title * | string | Título do evento |
| description | string | Descrição do evento |
| date * | string (ISO 8601) | Data e hora do evento |
| location | string | Local do evento |
| isOnline | boolean | Se o evento é online |
| maxParticipants | number | Número máximo de participantes |
| coverUrl | string | URL da imagem de capa |
Response
201
{
"id": "uuid",
"title": "string",
"description": "string | null",
"date": "ISO 8601",
"location": "string | null",
"isOnline": false,
"maxParticipants": "number | null",
"coverUrl": "string | null",
"createdAt": "ISO 8601",
"ownerId": "uuid"
}Erros
| Código | Descrição |
|---|---|
| 401 | Não autenticado |
Exemplos
curl -X POST 'https://geeksocialapi.homelab-cloud.com/events' \
-H 'Authorization: Bearer SEU_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"title":"Game Night","date":"2025-12-01T20:00:00Z","isOnline":true}'await fetch('https://geeksocialapi.homelab-cloud.com/events', {
method: 'POST',
headers: { Authorization: 'Bearer ' + accessToken, 'Content-Type': 'application/json' },
body: JSON.stringify({"title":"Game Night","date":"2025-12-01T20:00:00Z","isOnline":true}),
})