> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.shimi.cash/api-reference/shimi-api/customers/create-customer/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.shimi.cash/_mcp/server. # Create Customer POST https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/ Content-Type: application/json Registers a new customer under your company and validates their BVN with the provider. This does not create a bank account yet — call **Generate Customer Account** next. **Errors:** `400` BVN/email/mobile number already exists for your company, or BVN failed provider validation. **Body (JSON)** - checked by Joi (`customerSchema`, all errors returned together). Fields not listed here are rejected. | Field | Type | Required | Rules | | ----------- | ------ | -------- | ------------------------------------------------------------- | | `firstName` | string | yes | trimmed, 2-50 chars | | `lastName` | string | yes | trimmed, 2-50 chars | | `email` | string | yes | valid email; lowercased | | `mobileNo` | string | yes | must match `^\+234\d{10}$` (e.g. `+2348031234567`) | | `bvn` | string | yes | exactly 11 digits | | `dob` | string | yes | `YYYY-MM-DD`, valid date, not in the future, after 1900-01-01 | **Behaviour notes** * `otherName` is read by the controller, but `customerSchema` doesn't list it. Sending it gets `"otherName" is not allowed` when the schema is applied, so leave it out. * `bvn`, `email` and `mobileNo` must each be unique within your company. They are checked in that order and only the first clash is reported. * The BVN is then validated with the provider. A failure returns `400 Invalid BVN`, and a provider OTP is sent to the BVN-linked phone, which you use in **Generate Customer Account**. * Response `data` contains only `id`, `firstName` and `lastName`. * Date-range failures on `dob` come back as the generic Joi text `"dob" contains an invalid value`, not the custom messages in the schema. Reference: https://docs.shimi.cash/api-reference/shimi-api/customers/create-customer ## Authentication - `Authorization` header (bearer token, required) — Access token from Generate Access Token (valid 15 minutes). ## Request ### Body (application/json) This endpoint expects an object. - `firstName` (string, optional) - `lastName` (string, optional) - `email` (string, optional) - `mobileNo` (string, optional) - `bvn` (string, optional) - `dob` (string, optional) ## Response ### 201 Created - `status` (string, optional) - `message` (string, optional) - `data` (CustomerPostResponsesContentApplicationJsonSchemaData, optional) ## Errors ### 400 Bad Request Error Validation error / Invalid mobile number / BVN already exists / Email already exists / Mobile number already exists / Invalid BVN - `status` (string, optional) - `message` (string, optional) - `details` (list of string, optional) ### 401 Unauthorized Error Unauthorized - `message` (string, optional) ### 403 Forbidden Error Invalid or expired access token / KYB not approved / Account deactivated - `message` (string, optional) - `code` (string, optional) - `kybStatus` (string, optional) ## Types ### CustomerPostResponsesContentApplicationJsonSchemaData - `id` (string, optional) - `firstName` (string, optional) - `lastName` (string, optional) ## Examples ### 201 Created **Response** ```json { "status": "success", "message": "Customer created successfully", "data": { "id": "cmg8x2k4p0001qz7h3n9d5v2a", "firstName": "Chiamaka", "lastName": "Okonkwo" } } ``` **SDK Code** ```python 201 Created import requests url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript 201 Created const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 201 Created package main import ( "fmt" "net/http" "io" ) func main() { url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 201 Created require 'uri' require 'net/http' url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 201 Created import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/") .header("Authorization", "Bearer ") .asString(); ``` ```php 201 Created request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 201 Created using RestSharp; var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 201 Created import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Customers_createCustomer_example **Request** ```json { "firstName": "Chiamaka", "lastName": "Okonkwo", "email": "chiamaka.okonkwo@example.com", "mobileNo": "+2348031234567", "bvn": "22345678901", "dob": "1992-03-14" } ``` **Response** ```json { "status": "success", "message": "Customer created successfully", "data": { "id": "cmg8x2k4p0001qz7h3n9d5v2a", "firstName": "Chiamaka", "lastName": "Okonkwo" } } ``` **SDK Code** ```python Customers_createCustomer_example import requests url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/" payload = { "firstName": "Chiamaka", "lastName": "Okonkwo", "email": "chiamaka.okonkwo@example.com", "mobileNo": "+2348031234567", "bvn": "22345678901", "dob": "1992-03-14" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Customers_createCustomer_example const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"firstName":"Chiamaka","lastName":"Okonkwo","email":"chiamaka.okonkwo@example.com","mobileNo":"+2348031234567","bvn":"22345678901","dob":"1992-03-14"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Customers_createCustomer_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/" payload := strings.NewReader("{\n \"firstName\": \"Chiamaka\",\n \"lastName\": \"Okonkwo\",\n \"email\": \"chiamaka.okonkwo@example.com\",\n \"mobileNo\": \"+2348031234567\",\n \"bvn\": \"22345678901\",\n \"dob\": \"1992-03-14\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Customers_createCustomer_example require 'uri' require 'net/http' url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"firstName\": \"Chiamaka\",\n \"lastName\": \"Okonkwo\",\n \"email\": \"chiamaka.okonkwo@example.com\",\n \"mobileNo\": \"+2348031234567\",\n \"bvn\": \"22345678901\",\n \"dob\": \"1992-03-14\"\n}" response = http.request(request) puts response.read_body ``` ```java Customers_createCustomer_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"firstName\": \"Chiamaka\",\n \"lastName\": \"Okonkwo\",\n \"email\": \"chiamaka.okonkwo@example.com\",\n \"mobileNo\": \"+2348031234567\",\n \"bvn\": \"22345678901\",\n \"dob\": \"1992-03-14\"\n}") .asString(); ``` ```php Customers_createCustomer_example request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/', [ 'body' => '{ "firstName": "Chiamaka", "lastName": "Okonkwo", "email": "chiamaka.okonkwo@example.com", "mobileNo": "+2348031234567", "bvn": "22345678901", "dob": "1992-03-14" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Customers_createCustomer_example using RestSharp; var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"firstName\": \"Chiamaka\",\n \"lastName\": \"Okonkwo\",\n \"email\": \"chiamaka.okonkwo@example.com\",\n \"mobileNo\": \"+2348031234567\",\n \"bvn\": \"22345678901\",\n \"dob\": \"1992-03-14\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Customers_createCustomer_example import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "firstName": "Chiamaka", "lastName": "Okonkwo", "email": "chiamaka.okonkwo@example.com", "mobileNo": "+2348031234567", "bvn": "22345678901", "dob": "1992-03-14" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/customer/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```