Referência de APIMembers
Get or auto-create a member
Look up a member by email and/or externalId. When `autoCreate=true`, automatically creates the member if not found (requires `name` and `email`).
Look up a member by email and/or externalId. When autoCreate=true, automatically creates the member if not found (requires name and email).
Authorization
ApiKeyAuth X-API-Key<token>
API key authentication. Pass your API key via the X-API-Key header. Alternatively, you can use Authorization: Bearer {key}.
In: header
Query Parameters
email?string
Member email address
Format
emailexternalId?string
External customer ID from your system
name?string
Member name. Required when autoCreate=true and the member does not exist yet.
cpf?string
CPF document number
phone?string
Phone number
campaignId?string
Campaign ID to assign to the member on creation
autoCreate?boolean
If true, auto-create the member when not found
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api-base.rafo.work/api/v1/member/me?email=customer%40example.com&externalId=cust_123&name=Jo%C3%A3o+Silva&cpf=123.456.789-00&phone=%2B5511999999999&autoCreate=true"{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "customer@example.com",
"name": "João Silva",
"referralCode": "NUT-JOAOS-A7B3C",
"referralLink": "https://nuture.com.br/?cupom=NUT-JOAOS-A7B3C",
"status": "active",
"wallet": {
"totalEarned": 5000,
"totalRedeemed": 2000,
"available": 3000,
"pending": 1000,
"cancelled": 0
}
},
"created": false
}{
"error": {
"code": "MISSING_FIELDS",
"message": "Name and email are required for auto-creation"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "MEMBER_NOT_FOUND",
"message": "Member not found"
}
}