Skip to main content

Create User

POST /api/v1/users/public

Description

This API allows you to create a new user in the system.

Headers:

  • Content-Type: application/json

  • ApiKey: The platform api key is required to use this endpoint - {{platformApiKey}}

  • Authentication: ApiKey should be provided to use this endpoint.

URL: /api/v1/users/public

Request Body: JSON data containing user information.

  • Roles: Among the user informations that can be passed is role the table below describes supported roles. When a role is not provided the default user role is CUSTOMER.
  • Gender: The request body should also include the new user's gender which can be either Male or Female.

Supported Roles:

RoleDescription
CUSTOMERThis is the default role. An individual or entity purchasing goods or services from a business or seller.
MERCHANTA business or individual that sells goods or services to customers.
SUPPLIERAn entity providing goods or services to another business or individual.
AGENCY_BANKINGA financial institution that offers banking services through third-party agents.
SABI_AGENTAn agent involved in facilitating transactions or services within the Sabi platform.
SABI_OWNAn entity or individual with ownership or administrative rights within the Sabi platform.
TRACE_BUYERA user responsible for tracking or monitoring purchasing activities.
TRACE_SELLERA user responsible for tracking or monitoring selling activities.
TENANT_SUPER_ADMINAn individual with elevated administrative privileges overseeing multiple aspects within a tenant or organizational structure.
TENANT_ADMINAn individual responsible for administrative tasks within a specific tenant or organizational unit.

Supported Gender:

MALE,
FEMALE

/api/v1/users/public

Headers

Content-TypeValue
Content-Typeapplication/json

Body (raw)

{
"username": "<string>",
"password": "<string>",
"tenantId": "<string>",
"role": "CUSTOMER",
"firstName": "<string>",
"lastName": "<string>",
"middleName": "<string>",
"country": {
"name": "<string>",
"code": "<string>",
"currency": "<string>"
},
"state": {
"name": "<string>",
"code": "<string>"
},
"city": {
"name": "<string>",
"code": "<string>"
},
"address": "<string>",
"foreignerResidentialCountry": {
"name": "<string>",
"code": "<string>",
"currency": "<string>"
},
"foreignerResidentialState": {
"name": "<string>",
"code": "<string>"
},
"foreignerResidentialCity": {
"name": "<string>",
"code": "<string>"
},
"photo": "<string>",
"identityType": "<string>",
"identityDoc": "<string>",
"actionBy": "<string>",
"dob": "<string>",
"gender": "FEMALE",
"phone": "<string>",
"bvn": "<string>",
"nin": "<string>"
}

Response: 201

{
"wallet": {
"accounts": [],
"createdAt": null,
"virtualBankCode": "035",
"virtualBankName": "Wema Bank"
},
"settlement": {
"enableAutoSettlement": false
},
"location": {
"coordinates": [0, 0],
"type": "Point"
},
"metadata": {
"essentialCertification": []
},
"_id": "{{$randomId}}",
"__v": 0,
"appDefaultView": {
"TRACE": "NONE",
"LOFT": "NONE",
"KATSU": "NONE",
"SABI_MARKET": "NONE",
"PLATFORM": "NONE",
"DEAL": "NONE"
},
"businesses": [],
"bvmVerified": "PENDING",
"commodityActiveTraderStatus": "NONE",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN",
"_id": "{{$randomId}}"
},
"createdAt": "{{$timestamp}}",
"createdBy": null,
"customerRating": 1,
"driversLicenseVerified": "PENDING",
"emailVerification": false,
"firstName": "{{$randomFirstName}}",
"hasPin": false,
"identityDocVerified": "PENDING",
"invitationType": "SELF",
"isDistributor": false,
"isForeigner": false,
"isManufacturer": false,
"lastName": "{{$randomLastName}}",
"livenessImageVerified": "PENDING",
"ninVerified": "PENDING",
"passId": "{{$randomPassId}}",
"passportNumberVerified": "PENDING",
"password": null,
"passwordExpirationDate": null,
"passwordResetStatus": "NOT_RESET",
"permissions": [],
"phone": "{{randomNumberAdmin}}",
"phoneVerified": "PENDING",
"profileOwners": [],
"proofOfAddressVerified": "PENDING",
"roles": ["TENANT_SUPER_ADMIN", "TENANT_GLOBAL"],
"sellerRating": 1,
"status": "ACTIVE",
"tenants": [],
"type": "USER",
"updatedAt": "{{$timestamp}}",
"userHandle": "{{$randomUserHandle}}",
"username": "{{$randomEmail}}",
"voterCardVerified": "PENDING"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /api/v1/users/public \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!