Create User

Creates a dashboard user for a location. Use it to grant a person administrative access to a merchant account with a specific role.

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_ACCESS_TOKEN
Content-TypeYesapplication/json

Request Parameters

Path Parameters:

ParameterTypeRequiredDescription
location_idintegerYesLocation the user is created under.

Request Body Fields:

FieldTypeRequiredDescription
first_namestringYesUser's first name.
last_namestringYesUser's last name.
emailstringYesUnique email address.
phonestringnumberNo
role_idintegerYes1 location
2 admin
3 owner
statusintegerNoAccount status (1 = active, 0 = inactive).
user_idintegerNoThe acting user performing the request.

Request Example

{
  "first_name": "Test User",
  "last_name": "Doe",
  "email": "[email protected]",
  "phone": 1234567898,
  "role_id": 2,
  "status": 1,
  "user_id": 2
}

cURL Example

curl --request POST \
  --url https://sandbox-api.softpoint.io/interface/v1/locations/4004699/users \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "first_name": "Test User",
    "last_name": "Doe",
    "email": "[email protected]",
    "phone": 1234567898,
    "role_id": 2
  }'

Success Response

{
  "id": 102,
  "first_name": "Test User",
  "last_name": "Doe",
  "phone": "+1 (123) 456-7898",
  "email": "[email protected]",
  "global_country_id": 3,
  "created_datetime": "2023-03-09T20:03:39.000000Z"
}

Response Fields

FieldTypeDescription
idintegerUnique identifier of the new user.
first_namestringFirst name as stored.
last_namestringLast name as stored.
phonestringPhone number, normalized to international format.
emailstringEmail address.
global_country_idintegerCountry associated with the user, inferred from the phone number.
created_datetimestring (ISO 8601)Creation timestamp in UTC.

Error Responses

Duplicate Email

{
  "error": {
    "code": 10258,
    "message": "The selected email is already in use, please select a different email.",
    "details": ["email"]
  }
}

Status Codes

CodeDescription
200User created
400Validation failed (for example, duplicate email)

Workflow Placement

Part of merchant setup, after the location exists:

  1. Create Location

  2. Create User

  3. Retrieve All Users / Retrieve a User

Notes

  • email must be unique across the platform.

  • phone may be sent as a number or string; it is returned formatted.

  • role_id must reference a role that exists for the account.

Common Mistakes

  • Reusing an email that already exists.

  • Omitting role_id, which defines the user's permissions.

  • Sending an invalid Authorization token.

Body Params
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json