Cria ou executa events
POST/api/events
- Auth
- Richiede un token
- X-CommunityId
X-CommunityIdInvia l’X-CommunityId della community in cui avviene l’operazione.
Le descrizioni degli endpoint provengono dalla specifica dell’API e per ora sono in portoghese. L’interfaccia intorno è tradotta.
Sujeito a verificação de papel (RBAC). Além disso, respeita o `canCreate` do space: `staff` aceita owner, admin e moderator; `admins` aceita owner e admin; `anyone` não restringe. Fora da regra, 403 com `errors[0].param = "spaceId"`. SuperAdmin sempre passa.
Header
| Nome | Tipo | Descrizione |
|---|---|---|
X-CommunityIdfacoltativo | string (uuid) | ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade. |
Corpo della richiesta application/json
| Nome | Tipo | Descrizione |
|---|---|---|
spaceIdfacoltativo | string (uuid) | Valid space ID required if provided |
slugobbligatorio | string | Slug is required |
titleobbligatorio | string | Title is required |
typefacoltativo | online | hybrid | in_person | Type must be online, hybrid, or in_person |
locationfacoltativo | string | Location must be a string |
placeIdfacoltativo | string | Place ID must be a string |
streetfacoltativo | string | Street must be a string |
numberfacoltativo | string | Number must be a string |
neighborhoodfacoltativo | string | Neighborhood must be a string |
cityfacoltativo | string | City must be a string |
statefacoltativo | string | State must be a string |
countryfacoltativo | string | Country must be a string |
postalCodefacoltativo | string | Postal code must be a string |
latitudefacoltativo | number | Latitude must be a number |
longitudefacoltativo | number | Longitude must be a number |
streamingUrlfacoltativo | string (uri) | Streaming URL must be valid |
streamingServicefacoltativo | youtube | vimeo | mux | Streaming service must be youtube, vimeo, or mux |
bannerUrlfacoltativo | string (uri) | Banner URL must be valid |
featuredImageUrlfacoltativo | string (uri) | Featured image URL must be valid |
videoTeaserUrlfacoltativo | string (uri) | Video teaser URL must be valid |
hostIdsfacoltativo | —[] | hostIds must be an array |
hostIds.*facoltativo | string (uuid) | Each hostId must be a valid UUID |
organizerIdsfacoltativo | —[] | organizerIds must be an array |
organizerIds.*facoltativo | string (uuid) | Each organizerId must be a valid UUID |
timezonefacoltativo | string | Timezone must be a string |
audiencefacoltativo | string | Audience must be a string |
visibilityfacoltativo | public | members | plan | Visibility must be public, members, or plan |
Risposte
| Codice | Descrizione |
|---|---|
201 | Operação realizada com sucesso. |
400 | Requisição inválida — falha de validação. |
401 | Token ausente, inválido ou expirado. |
403 | Autenticado, mas sem permissão para esta operação. |
500 | Erro interno do servidor. |
Esempio con curl
curl -X POST "https://api.memberfy.net/api/events" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID" \
-H "Content-Type: application/json" \
-d '{"slug":"string","title":"string"}'