POST
/
api
/
users
/
link
Create a new user by link
curl --request POST \
  --url https://app.sandbox.rio.trade/api/users/link \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "country": "US",
  "businessName": "My Business Inc.",
  "firstName": "John",
  "middleName": "Michael",
  "lastName": "Doe",
  "secondLastName": "Smith",
  "email": "john.doe@example.com",
  "userType": "individual",
  "brokerId": "655f4084b96e4fb76f5a0e6e"
}'
{
  "userId": "66562bc04fe8bf83c577c178",
  "onboardingLink": "https://verification.example.com/session/123",
  "termsLink": "https://terms.example.com/123"
}

Authorizations

x-api-key
string
header
required

Body

application/json
country
enum<string>
required

Country

Available options:
MX,
PE,
US
Example:

"US"

email
string<email>
required

User's email address.

Example:

"john.doe@example.com"

userType
enum<string>
required

Type of user.

Available options:
business,
individual
Example:

"individual"

businessName
string

Business name (required for business users).

Example:

"My Business Inc."

firstName
string

First name (required for individual users only).

Example:

"John"

middleName
string

Middle name (for individual users only).

Example:

"Michael"

lastName
string

Last name (required for individual users).

Example:

"Doe"

secondLastName
string

Second last name (for individual users only).

Example:

"Smith"

brokerId
string<mongoId>

ID of the broker (optional).

Example:

"655f4084b96e4fb76f5a0e6e"

Response

OK

userId
string

ID of the created user.

Example:

"66562bc04fe8bf83c577c178"

Link for user onboarding verification.

Example:

"https://verification.example.com/session/123"

Link for terms and conditions.

Example:

"https://terms.example.com/123"