Skip to content

Cria ou executa create

POST/api/profiles/create

Auth
Requires a token
Who can call it:
owner
admin
X-CommunityId
X-CommunityId Send 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

NameTypeDescription
X-CommunityIdoptionalstring (uuid)ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade.

Request body application/json

NameTypeDescription
communityIdrequiredstring (uuid)Valid community ID is required
fullNamerequiredstringFull name must be between 2 and 100 characters · min 2, max 100
emailrequiredstring (email)Valid email is required
rolerequiredadmin | moderator | member | financeValid role is required
avatarUrloptionalstring (uri)Avatar URL must be a valid URL

Responses

StatusDescription
201Operação realizada com sucesso.
400Requisição inválida — falha de validação.
401Token ausente, inválido ou expirado.
500Erro 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":"pessoa@exemplo.com","role":"admin"}'