Adiciona um anfitrião ao evento
POST/api/events/{id}/hosts
- Auth
- Token erforderlich
- Wer darf:
- owner
- admin
- moderator
- finance
- API-Schlüssel:
- events:write
- X-CommunityId
X-CommunityIdSende die X-CommunityId der Community, in der die Operation stattfindet.
Die Beschreibungen der Endpoints stammen aus der API-Spezifikation und sind vorerst auf Portugiesisch. Die Oberfläche drumherum ist übersetzt.
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`).
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | path | string (uuid) |
Header
| Name | Typ | Beschreibung |
|---|---|---|
X-CommunityIdPflicht | string (uuid) |
Request-Body application/json
| Name | Typ | Beschreibung |
|---|---|---|
memberIdPflicht | string (uuid) | O perfil (membro) desta comunidade. |
Antworten
| Status | Beschreibung |
|---|---|
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-Beispiel
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"}'