Skip to main content
POST
/
test
/
users
curl -X POST 'https://api.sandbox.wealthyhood.com/test/users' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_M2M_TOKEN' \
  -d '{
    "email": "[email protected]",
    "status": "INVESTED_WITH_CASH"
  }'
{
  "user": {
    "_id": "64f0c51e7fb3fc001234abcd",
    "email": "[email protected]",
    "status": "INVESTED_WITH_CASH",
    "currency": "EUR",
    "portfolios": [...]
  }
}
These test endpoints are only available in development and staging environments. They are disabled in production for security reasons.
Create a test user account with a predefined status. This endpoint is useful for setting up test scenarios with users in various lifecycle states.
B2B Test User Builder Restriction: Only three statuses are allowed for B2B test user creation:
  • INVESTED - User with investments
  • INVESTED_WITH_CASH - User with investments and cash
  • INVESTED_WITH_SAVINGS - User with investments and savings
curl -X POST 'https://api.sandbox.wealthyhood.com/test/users' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_M2M_TOKEN' \
  -d '{
    "email": "[email protected]",
    "status": "INVESTED_WITH_CASH"
  }'
{
  "user": {
    "_id": "64f0c51e7fb3fc001234abcd",
    "email": "[email protected]",
    "status": "INVESTED_WITH_CASH",
    "currency": "EUR",
    "portfolios": [...]
  }
}

Request body

email
string
required
Email address for the test user. Must be a valid email format.
status
string
required
User status. Must be one of the allowed statuses for B2B test user builder. Use GET /test/help/statuses to retrieve the list of valid status values.Allowed statuses:
  • INVESTED - User with investments
  • INVESTED_WITH_CASH - User with investments and cash
  • INVESTED_WITH_SAVINGS - User with investments and savings
Use the Get available statuses endpoint to see all available user status options.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string<email>
required

Email address for the test user

status
enum<string>
required

User status. Must be one of the allowed statuses for B2B test user builder.

Available options:
INVESTED,
INVESTED_WITH_CASH,
INVESTED_WITH_SAVINGS
Example:

"INVESTED_WITH_CASH"

Response

Test user created successfully

user
object

Test user object with populated portfolios