Skip to content
Demo environment. M-Pesa and DMVIC are simulated; no real money or certificates move. Sandbox details
FlexySure

Reference data

8 endpoints · base URL https://flexysure.intrepidprojects.co.ke/api/v1

Look-ups you need before quoting or saving: the organisation's insurers, branches, staff, levies, motor benefits and product lines. All lists are scoped to the organisation that owns the token and returned as {"data": [...]}. They are small, so none of them paginate.

MethodPathSummaryScope
GET /api/v1/me Who am I Flexysure only read
GET /api/v1/insurers List insurers read
GET /api/v1/branches List branches read
GET /api/v1/risk-managers List risk managers read
GET /api/v1/sales-people List sales people read
GET /api/v1/policy/taxes List levies and duties read
GET /api/v1/motor/benefits List motor benefits read
GET /api/v1/products List product lines and standard products read
GET /api/v1/me Flexysure only

Who am I

The client, organisation, scopes and actor behind the current token. Useful as a connectivity check and to learn which scopes a token actually carries.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/me' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": {
        "client": {
            "id": "fx_live_…",
            "name": "Agency portal",
            "rate_limit_per_minute": 60
        },
        "tenant": {
            "code": "SIMBA",
            "name": "Simba Risk Brokers",
            "type": "brokerage",
            "paybill": "600123"
        },
        "scopes": [
            "read",
            "quote",
            "bind"
        ],
        "actor": {
            "id": 4,
            "name": "Kevin Kiprop",
            "role": "agent",
            "code": "KK01",
            "own_records_only": true
        },
        "token": {
            "expires_at": "2026-10-15T09:00:00+03:00",
            "expires_in": 86000
        },
        "request_id": "0f6d…"
    }
}

Responses

StatusMeaning
200 Client, tenant, scopes, actor and token expiry

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/insurers

List insurers

Underwriters the organisation places business with. insurer_id values from here are what the quote endpoints accept.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Parameters

NameInTypeRequiredDescription
search query string No Case-insensitive match on short or legal name. Example: savanna

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/insurers' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": 1,
            "name": "Savanna General",
            "legal_name": "Savanna General Insurance Ltd",
            "dmvic_member_id": 901,
            "commission_rate_bps": 1000,
            "status": "active",
            "monogram": "SG"
        }
    ]
}

Responses

StatusMeaning
200 Insurers

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/branches

List branches

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/branches' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": 1,
            "code": "NBO",
            "name": "Nairobi HQ",
            "city": "Nairobi"
        }
    ]
}

Responses

StatusMeaning
200 Branches

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/risk-managers

List risk managers

Staff who own client relationships: principals and account executives. Use their id as risk_manager_id when saving a client.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/risk-managers' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": 2,
            "name": "Faith Njeri",
            "email": "ae.simba@example.test",
            "phone": "0711000303",
            "role": "account_exec",
            "code": null,
            "branch_id": 1
        }
    ]
}

Responses

StatusMeaning
200 Users

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/sales-people

List sales people

Agents and account executives with their agent code (what X-Agent-Code expects) and branch. Use id as sales_person_id when saving a client.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/sales-people' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": 4,
            "name": "Kevin Kiprop",
            "email": "agent.simba@example.test",
            "phone": "0711000304",
            "role": "agent",
            "code": "KK01",
            "branch_id": 2
        }
    ]
}

Responses

StatusMeaning
200 Users

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/policy/taxes

List levies and duties

The taxes added to every premium (training levy, policyholders compensation fund, stamp duty). Percent-based items carry rate_bps; flat items carry amount (whole shillings) and amount_minor (cents).

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/policy/taxes' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": 1,
            "code": "TL",
            "name": "Training levy",
            "basis": "percent",
            "rate_bps": 20,
            "rate_percent": 0.2,
            "amount": null,
            "amount_minor": null
        },
        {
            "id": 3,
            "code": "SD",
            "name": "Stamp duty",
            "basis": "flat",
            "rate_bps": null,
            "rate_percent": null,
            "amount": 40,
            "amount_minor": 4000
        }
    ]
}

Responses

StatusMeaning
200 Taxes

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/motor/benefits

List motor benefits

Distinct benefit names across the organisation's motor products. id is a stable hash of the name, so it survives re-seeding.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/motor/benefits' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": [
        {
            "id": "3a9c1f0e7b2d",
            "name": "Courtesy car 10 days"
        },
        {
            "id": "b81e…",
            "name": "Towing"
        }
    ]
}

Responses

StatusMeaning
200 Benefits

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/products

List product lines and standard products

The four product lines with their quote endpoints, plus the standard products catalogue (personal accident, domestic package, WIBA…) once the organisation has one.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/products' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'
Response JSON
{
    "data": {
        "lines": [
            {
                "code": "motor",
                "name": "Motor",
                "quote_endpoint": "/api/v1/motor/quote"
            }
        ],
        "standard_products": [
            {
                "id": 1,
                "code": "PA",
                "name": "Personal accident",
                "description": "…",
                "brochure_url": null,
                "product_line": "standard"
            }
        ]
    }
}

Responses

StatusMeaning
200 Lines and standard products

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.