Cria ou executa create
POST/api/profiles/create
- Auth
- Requires a token
- Who can call it:
- owner
- admin
- 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 e admin podem dar qualquer papel atribuível, admin inclusive (a mesma regra da promoção). Owner nunca é dado na entrada; moderator e abaixo recebem 403. A pessoa recebe pela fila (a resposta não espera o envio) o link de uso único `https://<app da comunidade>/_/auth/set-password?id=&token=`, válido por 7 dias (ver `POST /api/auth/set-password`). A resposta não traz mais `tempPassword`.
Headers
| Name | Type | Description |
|---|---|---|
X-CommunityIdoptional | string (uuid) | ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade. |
Request body application/json
| Name | Type | Description |
|---|---|---|
communityIdrequired | string (uuid) | Valid community ID is required |
fullNamerequired | string | Full name must be between 2 and 100 characters · min 2, max 100 |
emailrequired | string (email) | Valid email is required |
rolerequired | admin | moderator | member | finance | Valid role is required |
avatarUrloptional | string (uri) | Avatar URL must be a valid URL |
Responses
| Status | Description |
|---|---|
201 | Operação realizada com sucesso. |
400 | Requisição inválida — falha de validação. |
401 | Token ausente, inválido ou expirado. |
500 | Erro interno do servidor. |
curl example
curl -X POST "https://api.memberfy.net/api/profiles/create" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID" \
-H "Content-Type: application/json" \
-d '{"communityId":"00000000-0000-0000-0000-000000000000","fullName":"string","email":"[email protected]","role":"admin"}'