> 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/corporate-accounts/create-corporate-sub-account/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.shimi.cash/_mcp/server. # Create Corporate Sub-account POST https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account Content-Type: application/json Creates the dedicated bank sub-account for the business, using a `kyc_id` from a completed **Validate Corporate KYC OTP**. `settlementId` is optional and works the same way as in the Customer flow. **Body** | Field | Type | Required | Rules | | -------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `phoneNumber` | string | yes | Min 7 characters. | | `emailAddress` | string | yes | Valid email. | | `rn_number` | string | yes | Company registration (CAC RC/BN) number, min 3 characters. | | `kyc_id` | string | yes | The `kyc_id` from **Validate Corporate KYC OTP** (not the session id from Initiate). KYC must belong to you and have status VERIFIED/SUCCESS. | | `settlementId` | number | no | Id of one of your settlement accounts. | Unknown fields are rejected (`"" is not allowed`). Validation errors are `400` with an `errors` array using Joi's default messages (field name in double quotes). **Behaviour** * Creates the dedicated NUBAN sub-account at the bank. If the bank returns an account number you already hold, the existing record is updated and returned (the new attempt is stored as `DUPLICATE`). * `coporate_reference` (note spelling) is the sub-account id used by **List / Fetch Corporate Sub-accounts**. * All provider/settlement failures return `400` with `message: "Failed to create COOP subaccount"` and the reason in `error`. Reference: https://docs.shimi.cash/api-reference/shimi-api/corporate-accounts/create-corporate-sub-account ## Authentication - `Authorization` header (bearer token, required) — Access token from Generate Access Token (valid 15 minutes). ## Request ### Body (application/json) This endpoint expects an object. - `phoneNumber` (string, optional) - `emailAddress` (string, optional) - `rn_number` (string, optional) - `kyc_id` (string, optional) - `settlementId` (integer, optional) ## Response ### 200 OK - `status` (string, optional) - `message` (string, optional) - `data` (CoopGenerateAccountPostResponsesContentApplicationJsonSchemaData, optional) ## Errors ### 400 Bad Request Error Validation error / KYC not verified / Settlement account not found / Provider failure - `status` (string, optional) - `message` (string, optional) - `errors` (list of CoopGenerateAccountPostResponsesContentApplicationJsonSchemaErrorsItems, optional) - `error` (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) ### 404 Not Found Error Not Found - `status` (string, optional) - `message` (string, optional) ## Types ### CoopGenerateAccountPostResponsesContentApplicationJsonSchemaData - `coporate_reference` (string, optional) - `accountNumber` (string, optional) - `accountName` (string, optional) - `balance` (integer, optional) - `createdAt` (string, optional) - `rn_number` (string, optional) ### CoopGenerateAccountPostResponsesContentApplicationJsonSchemaErrorsItems - `path` (list of string, optional) - `message` (string, optional) ## Examples ### 200 Sub-account created **Response** ```json { "status": "success", "message": "COOP subaccount created", "data": { "coporate_reference": "cm9x5a1ce0009qy8l3fj7m2pz", "accountNumber": "0115738294", "accountName": "ADEBAYO FOODS LIMITED", "balance": 0, "createdAt": "2026-10-04T10:22:41.512Z", "rn_number": "RC1234567" } } ``` **SDK Code** ```python 200 Sub-account created import requests url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript 200 Sub-account created const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account'; 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 200 Sub-account created package main import ( "fmt" "net/http" "io" ) func main() { url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account" 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 200 Sub-account created require 'uri' require 'net/http' url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account") 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 200 Sub-account 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/coop/generate-account") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 Sub-account created request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 Sub-account created using RestSharp; var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 Sub-account created import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account")! 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() ``` ### Corporate Accounts_createCorporateSubAccount_example **Request** ```json { "phoneNumber": "+2348031234567", "emailAddress": "finance@adebayofoods.ng", "rn_number": "RC1234567", "kyc_id": "{{kyc_id}}", "settlementId": 1 } ``` **Response** ```json { "status": "success", "message": "COOP subaccount created", "data": { "coporate_reference": "cm9x5a1ce0009qy8l3fj7m2pz", "accountNumber": "0115738294", "accountName": "ADEBAYO FOODS LIMITED", "balance": 0, "createdAt": "2026-10-04T10:22:41.512Z", "rn_number": "RC1234567" } } ``` **SDK Code** ```python Corporate Accounts_createCorporateSubAccount_example import requests url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account" payload = { "phoneNumber": "+2348031234567", "emailAddress": "finance@adebayofoods.ng", "rn_number": "RC1234567", "kyc_id": "{{kyc_id}}", "settlementId": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Corporate Accounts_createCorporateSubAccount_example const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"phoneNumber":"+2348031234567","emailAddress":"finance@adebayofoods.ng","rn_number":"RC1234567","kyc_id":"{{kyc_id}}","settlementId":1}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Corporate Accounts_createCorporateSubAccount_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account" payload := strings.NewReader("{\n \"phoneNumber\": \"+2348031234567\",\n \"emailAddress\": \"finance@adebayofoods.ng\",\n \"rn_number\": \"RC1234567\",\n \"kyc_id\": \"{{kyc_id}}\",\n \"settlementId\": 1\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 Corporate Accounts_createCorporateSubAccount_example require 'uri' require 'net/http' url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account") 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 \"phoneNumber\": \"+2348031234567\",\n \"emailAddress\": \"finance@adebayofoods.ng\",\n \"rn_number\": \"RC1234567\",\n \"kyc_id\": \"{{kyc_id}}\",\n \"settlementId\": 1\n}" response = http.request(request) puts response.read_body ``` ```java Corporate Accounts_createCorporateSubAccount_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/coop/generate-account") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"phoneNumber\": \"+2348031234567\",\n \"emailAddress\": \"finance@adebayofoods.ng\",\n \"rn_number\": \"RC1234567\",\n \"kyc_id\": \"{{kyc_id}}\",\n \"settlementId\": 1\n}") .asString(); ``` ```php Corporate Accounts_createCorporateSubAccount_example request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account', [ 'body' => '{ "phoneNumber": "+2348031234567", "emailAddress": "finance@adebayofoods.ng", "rn_number": "RC1234567", "kyc_id": "{{kyc_id}}", "settlementId": 1 }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Corporate Accounts_createCorporateSubAccount_example using RestSharp; var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/coop/generate-account"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"phoneNumber\": \"+2348031234567\",\n \"emailAddress\": \"finance@adebayofoods.ng\",\n \"rn_number\": \"RC1234567\",\n \"kyc_id\": \"{{kyc_id}}\",\n \"settlementId\": 1\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Corporate Accounts_createCorporateSubAccount_example import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "phoneNumber": "+2348031234567", "emailAddress": "finance@adebayofoods.ng", "rn_number": "RC1234567", "kyc_id": "{{kyc_id}}", "settlementId": 1 ] 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/coop/generate-account")! 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() ```