Skip to main content
POST
/
v1
/
customers
Create a customer
curl --request POST \
  --url https://api-dev.bsa.ai/v1/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "officeId": 123,
  "firstname": "<string>",
  "middlename": "<string>",
  "lastname": "<string>",
  "fullname": "<string>",
  "mobileNo": "<string>",
  "emailAddress": "<string>",
  "externalId": "<string>",
  "genderId": 123,
  "clientTypeId": 123,
  "legalFormId": 123,
  "active": true,
  "activationDate": "<string>",
  "submittedDate": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.api.bsa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Submit a new customer. If active=true, the customer is activated immediately; otherwise they remain in pending state until you call Activate.

Request body

officeId
integer
required
ID of the office the customer belongs to.
firstname
string
Either firstname + lastname or fullname is required.
middlename
string
lastname
string
fullname
string
Alternative to first/middle/last for non-Western naming.
mobileNo
string
emailAddress
string
externalId
string
Optional client-assigned correlation ID.
genderId
integer
Reference to an LMS code value. Look up valid values with your integration representative.
clientTypeId
integer
1 = Person, 2 = Entity. Required by some LMS deployments (including production) — set to 1 for individual borrowers.
active
boolean
required
When true, the customer is created in active state. activationDate is then required.
activationDate
string
ISO-8601 YYYY-MM-DD. Required when active=true.
submittedDate
string
ISO-8601 YYYY-MM-DD. Defaults to today.

Example

curl -sf -X POST "$BASE/v1/customers" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "officeId": 1,
    "legalFormId": 1,
    "firstname": "Ada",
    "lastname": "Lovelace",
    "mobileNo": "+255700000000",
    "emailAddress": "ada@example.com",
    "externalId": "ext-ada-001",
    "active": true,
    "activationDate": "2026-05-22"
  }'

Response

200 OK returns the full customer object.
{
  "id": "42",
  "accountNo": "000000042",
  "status": "Active",
  "active": true,
  "officeId": "1",
  "firstname": "Ada",
  "lastname": "Lovelace",
  "displayName": "Ada Lovelace",
  "mobileNo": "+255700000000",
  "emailAddress": "ada@example.com",
  "externalId": "ext-ada-001",
  "activationDate": "2026-05-22"
}

Errors

CodeWhen
invalid_argumentMissing officeId, missing name, or active=true without activationDate
abortedA customer with the same externalId already exists