Skip to content

Create a customer

Request

Creates a new customer.

  • regular: only name is required. email, phone, address, taxPin and person are optional.
  • walkIn: only type is required. Name is auto-set to "WalkIn" and all other fields are null. Only one Walk-In customer is allowed per business at a time (active OR archived).
Security
oauth2ClientCredentials(Required scopes: customers:write)
Headers
business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
typestringrequired

Customer type. "walkIn" auto-sets name to "WalkIn" and nulls all other fields. "regular" requires name and taxPin.

Enum:"regular""walkIn"
Example:"regular"
namestring

Customer name. Required when type is regular; ignored for walkIn (auto-set to "WalkIn").

Example:"Acme Corp"
emailstring

Customer email address (optional).

Example:"billing@acme.com"
phonestring

Customer phone number (optional).

Example:"+254700000000"
addressstring

Customer physical address.

Example:"123 Main Street, Nairobi"
personArray of strings

Array of person identifiers associated with this customer.

Example:
[ "person-001", "person-002" ]
taxPinstring

KRA Tax PIN.

Example:"A123456789Z"
curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/customers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -d '{
    "type": "regular",
    "name": "Acme Corp",
    "taxPin": "A123456789Z",
    "email": "billing@acme.com",
    "phone": "+254700000000",
    "address": "123 Main Street, Nairobi",
    "person": []
  }'

Responses

Customer created successfully