Sub-Accounts

Create a sub-account

POST
/api/sandbox/v1/multiaccount/new/organisation

Create a sub-organisation under your parent organisation, together with its first API user.

The user.password you supply becomes that user's initial credential — send it over HTTPS only, never log it, and have the user change it.

Authorization

bearerAuth
AuthorizationBearer <token>

The access_token returned by POST /api/v1/get-token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/sandbox/v1/multiaccount/new/organisation" \  -H "Content-Type: application/json" \  -d '{    "name": "subaccount",    "email": "subacct@example.com",    "phone": "254756980820",    "user": {      "userType": "API_USER",      "firstName": "Jon",      "lastName": "Doe",      "username": "johndoe",      "password": "<generate-a-strong-password>",      "roles": [        "ADMIN"      ],      "email": "jon.doe@example.com"    }  }'
{  "status": 201,  "message": "Created Successfully",  "data": {    "uuid": "e09a5d6c-7f98-4b47-845d-e8420c012b32",    "name": "subaccount",    "phoneNumber": "254756980820",    "email": "subacct@example.com",    "uniqueReference": "4780606363",    "environment": null,    "collectionCallbackUrl": null,    "parentOrganisation": {      "uuid": "4d6e1ea9-5ab8-496a-978f-7e9b2bce80c4",      "name": "Maina Properties Limited Ke",      "parent": true    },    "parent": false,    "createdAt": "2025-05-01T08:24:36.00312271",    "updatedAt": "2025-05-01T08:24:36.00312271"  }}