POST
/
security
/
merchantUsers
/
add
cURL
curl -X POST "https://dev.api.onekhusa.com/sandbox/v1/security/merchantUsers/add" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "Accept-Language: en" \
  -d '{
    "organisationId": "FYH0NTVW0DXK",
    "merchantAccountNumber": 35253486,
    "firstName": "John",
    "lastName": "Phiri",
    "emailAddress": "john.phiri@example.com",
    "phoneNumber": "0881234567",
    "roleId": "MERC_ADMIN",
    "organisationTypeCode": "MER",
    "capturedBy": "admin@example.com"
  }'
"The user account has been created successfully."

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer Token, Where accessToken is the access token used to authenticate the request.

Headers

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
organisationId
string
required

The unique identifier of the organisation

Example:

"FYH0NTVW0DXK"

merchantAccountNumber
integer
required

The unique identifier of the merchant account

Example:

35253486

firstName
string
required

The first name of the user

Example:

"John"

lastName
string
required

The last name of the user

Example:

"Phiri"

emailAddress
string<email>
required

The email address of the user (used as username)

Example:

"john.phiri@example.com"

phoneNumber
string
required

The phone number of the user

Example:

"0881234567"

roleId
string
required

The unique identifier of the role to assign (must be MER or PSP role type)

Example:

"MERC_ADMIN"

organisationTypeCode
string
required

The organisation type code

Example:

"MER"

capturedBy
string
required

The email address of the user creating this merchant user

Example:

"admin@example.com"

Response

201 - application/json

Created

value
string
statusCode
integer