curl --request POST \
--url https://app.mlm-platform.com/api/v1/users \
--header 'Content-Type: application/json' \
--header 'x-tenant-api-key: <api-key>' \
--data '
{
"email": "newmember@example.com",
"membership_tier": "ORDINARY"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"membership_tier": "ORDINARY",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"can_recruit": true,
"is_test_user": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Core APIs
Create a new member
Creates a new member in the MLM hierarchy. The member can optionally be placed
under a parent (sponsor) using parent_id or referral_code.
Guardrails:
- If
can_recruitis false for the parent, the request will fail with 403 - Email must be unique within the tenant
POST
/
api
/
v1
/
users
curl --request POST \
--url https://app.mlm-platform.com/api/v1/users \
--header 'Content-Type: application/json' \
--header 'x-tenant-api-key: <api-key>' \
--data '
{
"email": "newmember@example.com",
"membership_tier": "ORDINARY"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"membership_tier": "ORDINARY",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"can_recruit": true,
"is_test_user": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Tenant API key for authentication. Keys are scoped to specific environments (LIVE or SANDBOX). Obtain keys from the admin dashboard.
Body
application/json
User's email address (must be unique)
Member's tier in the hierarchy
Available options:
ORDINARY, SENIOR, MANAGER, DIRECTOR Parent/sponsor user ID
Referral code to attribute to a sponsor
Whether the user is active
Whether the user can recruit new members
Response
Member created successfully
Member's tier in the hierarchy
Available options:
ORDINARY, SENIOR, MANAGER, DIRECTOR