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": "test.user@example.com",
    "status": "INVESTED_WITH_CASH",
    "props": {
      "firstName": "John",
      "lastName": "Doe"
    }
  }'
{
  "user": {
    "_id": "64f0c51e7fb3fc001234abcd",
    "email": "test.user@example.com",
    "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": "test.user@example.com",
    "status": "INVESTED_WITH_CASH",
    "props": {
      "firstName": "John",
      "lastName": "Doe"
    }
  }'
{
  "user": {
    "_id": "64f0c51e7fb3fc001234abcd",
    "email": "test.user@example.com",
    "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
props
object
Optional user properties to override defaults. If omitted, random values are used for firstName and lastName.
props.firstName
string
First name for the test user. Must be 1-100 characters. Optional.
props.lastName
string
Last name for the test user. Must be 1-100 characters. Optional.
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

Example:

"test.user@example.com"

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,
FULL_USER_NBG
Example:

"INVESTED_WITH_CASH"

props
object

Optional user properties to override defaults (e.g. firstName, lastName).

Response

Test user created successfully

user
object

Test user object with populated portfolios