Adiciona um anfitrião ao evento
POST/api/events/{id}/hosts
- Auth
- Requires a token
- Who can call it:
- owner
- admin
- moderator
- finance
- API key:
- events:write
- X-CommunityId
X-CommunityIdSend the X-CommunityId of the community the operation happens in.
Endpoint descriptions come straight from the API specification and are in Portuguese for now. The interface around them is translated.
Owner, admin ou um anfitrião do próprio evento (moderador e financeiro que não são anfitriões, 403). Qualquer membro ativo da comunidade pode ser anfitrião. O anfitrião vê o evento em rascunho, edita, publica, vê os inscritos, faz check-in, exporta a lista e pode excluir o evento — só daquele evento. Ingressos pagos e preço continuam com owner e admin. Idempotente (quem já é anfitrião devolve 200). Fica no registro da comunidade (`event.host_added`).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) |
Headers
| Name | Type | Description |
|---|---|---|
X-CommunityIdrequired | string (uuid) |
Request body application/json
| Name | Type | Description |
|---|---|---|
memberIdrequired | string (uuid) | O perfil (membro) desta comunidade. |
Responses
| Status | Description |
|---|---|
200 | Já era anfitrião; `data` é a lista |
201 | Adicionado; `data` é a lista de anfitriões |
403 | Nem owner/admin nem anfitrião deste evento |
404 | Evento ou membro não encontrado nesta comunidade |
curl example
curl -X POST "https://api.memberfy.net/api/events/<id>/hosts" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID" \
-H "Content-Type: application/json" \
-d '{"memberId":"00000000-0000-0000-0000-000000000000"}'