/api/v1/clients
Flexysure only
List clients
Newest first, cursor paginated (limit, cursor; page/per_page also accepted).
- Scope
read- Authentication
- Bearer token
- Rate limit
- 60 requests per minute per token (per-client override)
- Idempotency
- Safe to repeat (read only).
- Agent headers
- Accepts
X-Agent-CodeandX-Agent-Key: the call runs as that agent and sees only the agent's own records.
Headers
| Header | Meaning |
|---|---|
| Authorization | Bearer <access_token> (scope read) |
| X-Agent-Code | Optional. Agent code of the selling agent; the call runs with that agent's visibility. |
| X-Agent-Key | Optional, with X-Agent-Code. The agent's API key; a mismatch returns 403 agent_denied. |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| search | query | string | No | Name, client number, phone, ID number or KRA PIN. |
| type | query | string | No |
One of: individual, corporate |
| sales_person_id | query | integer | No | |
| risk_manager_id | query | integer | No | |
| limit | query | integer | No | Default 25, max 100. |
| cursor | query | string | No |
Example
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/clients' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Accept: application/json' \
-H 'X-Agent-Code: KK01' \
-H "X-Agent-Key: $AGENT_KEY"
{
"data": [
{
"id": 42,
"client_no": "C-00042",
"type": "individual",
"name": "Wanjiru Kamau",
"id_no": "27845123",
"kra_pin": "A001234567Z",
"phone": "0712345678",
"email": "wanjiru@example.com",
"date_of_birth": "1988-04-02",
"physical_address": "Kilimani, Nairobi",
"branch": {
"id": 1,
"name": "Head office"
},
"risk_manager": {
"id": 2,
"name": "Faith Njeri",
"role": "account_exec",
"code": null
},
"sales_person": {
"id": 4,
"name": "Kevin Kiprop",
"role": "agent",
"code": "KK01"
},
"business_source": {
"id": 2,
"name": "Referral"
},
"prospect_type": null,
"sector": null,
"alt_name": null,
"alt_phone": null,
"alt_email": null,
"kyc_status": "unverified",
"onboarded_via": "api",
"created_at": "2026-10-14T09:00:00+03:00",
"updated_at": "2026-10-14T09:00:00+03:00"
}
],
"meta": {
"limit": 25,
"has_more": false,
"count": 1
},
"links": {
"next": null
}
}
Responses
| Status | Meaning |
|---|---|
| 200 | Clients |
Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.