Skip to main content
POST
/
users
/
onboard
Onboard user
curl --request POST \
  --url https://www.tryunleashx.com/api/v1/global/users/onboard \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "email_id": "jsmith@example.com",
  "first_name": "<string>",
  "last_name": "<string>",
  "company_name": "<string>"
}
'
{
  "message": "<string>",
  "data": {
    "registration_id": 123,
    "user_id": 123,
    "company_id": 123,
    "workspace_id": 123,
    "customer_salt": "<string>"
  }
}
Use this endpoint to onboard a new user/customer into the portal. This creates a complete account setup including registration, company, user, and workspace in a single API call.

Endpoint

POST /users/onboard Content-Type: application/json Authentication: Required (API token)

Request Body

{
  "email_id": "john@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "company_name": "Acme Corp"
}

Parameters

ParameterTypeRequiredDescription
email_idstringYesEmail address of the user to onboard. Also accepts email.
first_namestringYesFirst name of the user. Also accepts firstName.
last_namestringYesLast name of the user. Also accepts lastName.
company_namestringYesCompany name for the new account. Also accepts companyName.

Notes

  • All four fields are required.
  • The email_id must not already be registered in the system.
  • The company_name must be unique — it cannot match an existing company.
  • The email domain is validated against restricted domains. If the domain is restricted, the request will be rejected.
  • A unique 12-digit customer_salt is auto-generated and returned in the response. This can be used later to generate API tokens via the Get Token by Customer ID endpoint.
  • The onboarded user is created as an Admin with a default workspace and 20 free minutes.

Success Response

{
  "message": "User onboarded successfully",
  "data": {
    "registration_id": 101,
    "user_id": 55,
    "company_id": 12,
    "workspace_id": 8,
    "customer_salt": "048372910564"
  }
}

Response Fields

FieldTypeDescription
registration_idnumberID of the registration record created.
user_idnumberID of the newly created user.
company_idnumberID of the newly created company.
workspace_idnumberID of the default workspace created for the user.
customer_saltstringUnique 12-digit customer identifier. Use this to generate API tokens.

Error Responses

ErrorDescription
EMAIL_ALREADY_REGISTEREDThe email is already associated with an account.
WORKFLOW_NAME_ALREADY_REGISTEREDThe company name is already taken.
COMPANY_DOMAIN_ALREADY_REGISTEREDThe email domain is already registered.

Example cURL

curl -X POST https://www.tryunleashx.com/api/v1/global/users/onboard \
  -H "Content-Type: application/json" \
  -H "Authorization: <api_key>" \
  -d '{
    "email_id": "john@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "company_name": "Acme Corp"
  }'

Headers

token
string
required

API token for authentication

Body

application/json
email_id
string<email>
required

Email address of the user to onboard. Also accepts 'email'.

first_name
string
required

First name of the user. Also accepts 'firstName'.

last_name
string
required

Last name of the user. Also accepts 'lastName'.

company_name
string
required

Company name for the new account. Must be unique. Also accepts 'companyName'.

Response

User onboarded successfully

message
string
data
object