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:
ApiKeyshould 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
rolethe table below describes supported roles. When a role is not provided the default user role isCUSTOMER. - Gender: The request body should also include the new user's gender which can be either
MaleorFemale.
Supported Roles:
| Role | Description |
|---|---|
| CUSTOMER | This is the default role. An individual or entity purchasing goods or services from a business or seller. |
| MERCHANT | A business or individual that sells goods or services to customers. |
| SUPPLIER | An entity providing goods or services to another business or individual. |
| AGENCY_BANKING | A financial institution that offers banking services through third-party agents. |
| SABI_AGENT | An agent involved in facilitating transactions or services within the Sabi platform. |
| SABI_OWN | An entity or individual with ownership or administrative rights within the Sabi platform. |
| TRACE_BUYER | A user responsible for tracking or monitoring purchasing activities. |
| TRACE_SELLER | A user responsible for tracking or monitoring selling activities. |
| TENANT_SUPER_ADMIN | An individual with elevated administrative privileges overseeing multiple aspects within a tenant or organizational structure. |
| TENANT_ADMIN | An individual responsible for administrative tasks within a specific tenant or organizational unit. |
Supported Gender:
MALE,
FEMALE
/api/v1/users/public
Headers
| Content-Type | Value |
|---|---|
| Content-Type | application/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
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!