Introduction
Every endpoint lives under /v3 and returns a consistent JSON envelope. Requests are authenticated with an API key; sensitive endpoints support request signing, idempotency keys and per-client rate limits. Data sources are abstracted — you consume one clean interface.
Authentication
Send your client credentials as a bearer token. Optionally sign requests with HMAC for banking-grade integrity.
Authorization: Bearer <client_id>:<client_secret> # Optional request signing X-Timestamp: <unix_ms> X-Nonce: <random> X-Signature: HMAC_SHA256(secret, "<ts>.<nonce>.<method>.<path>.<sha256(body)>")
Generate and rotate credentials from the Console. Never embed a secret in client-side code.
Response format
All responses share one shape. Read success first, then data or error.
{
"success": true,
"data": { },
"error": null,
"meta": {
"request_id": "req_...",
"timestamp": "2026-01-01T00:00:00Z",
"api_version": "v3",
"environment": "live"
}
}
Errors & rate limits
Errors return a stable machine code and a human message. Rate-limit state is returned in response headers.
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication failed |
| 403 | Missing scope / forbidden |
| 404 | Not found |
| 409 | Conflict / replay detected |
| 429 | Rate limit exceeded |
X-RateLimit-Limit: 120 X-RateLimit-Remaining: 118 X-RateLimit-Reset: 1735689600000
Customer Operations
Onboarding & retrieval matching the Farmsky Customer Onboarding UI, plus plug-and-play widgets for lenders with existing websites.
/v3/applicants
Onboard an applicant (farmer / business).
Show example
{
"applicant_type": "INDIVIDUAL_FARMER",
"national_id": "31234567",
"phone": "+254700123456",
"farm": {
"gps": {
"lat": -0.2827,
"lon": 36.0662
},
"crop": "MAIZE",
"acreage_ha": 1.4
}
}
curl -X POST "https://score.farmsky.africa/v3/applicants" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"applicant_type":"INDIVIDUAL_FARMER","national_id":"31234567","phone":"+254700123456","farm":{"gps":{"lat":-0.2827,"lon":36.0662},"crop":"MAIZE","acreage_ha":1.4}}'
/v3/applicants/:id
Retrieve an onboarded applicant.
Show example
curl -X GET "https://score.farmsky.africa/v3/applicants/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/applicants
List recent applicants.
Show example
curl -X GET "https://score.farmsky.africa/v3/applicants" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/consents
Create a granular consent record (consent ledger).
Show example
{
"applicant_id": "appl_...",
"scopes": [
"CRB",
"STATEMENTS",
"IPRS",
"GPS",
"AGRONOMY"
]
}
curl -X POST "https://score.farmsky.africa/v3/consents" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"applicant_id":"appl_...","scopes":["CRB","STATEMENTS","IPRS","GPS","AGRONOMY"]}'
/v3/consents/:token/revoke
Revoke consent (propagates within 60s).
Show example
curl -X POST "https://score.farmsky.africa/v3/consents/{token}/revoke" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/plug-and-play/config
Get drop-in onboarding widget config & embed snippet.
Show example
curl -X GET "https://score.farmsky.africa/v3/plug-and-play/config" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
Statement & Financing Evaluation
Automated parsing and financial scoring of M-Pesa, Till, Paybill and Bank statements with tamper detection.
/v3/statements/mpesa
Analyse an M-Pesa statement.
Show example
{
"reference": "+254700123456"
}
curl -X POST "https://score.farmsky.africa/v3/statements/mpesa" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"+254700123456"}'
/v3/statements/till
Analyse a Till Number statement.
Show example
{
"reference": "5203451"
}
curl -X POST "https://score.farmsky.africa/v3/statements/till" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"5203451"}'
/v3/statements/paybill
Analyse a Paybill Number statement.
Show example
{
"reference": "888880"
}
curl -X POST "https://score.farmsky.africa/v3/statements/paybill" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"888880"}'
/v3/statements/bank
Analyse a Bank statement (PDF/CSV).
Show example
{
"reference": "KCB-2026-H1"
}
curl -X POST "https://score.farmsky.africa/v3/statements/bank" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"KCB-2026-H1"}'
/v3/statements/upload
Upload a PDF statement → authenticity confidence + transaction extraction (multipart: file).
Show example
curl -X POST "https://score.farmsky.africa/v3/statements/upload" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/statements/analyse
Generic analyse with statement_type in body.
Show example
{
"statement_type": "MPESA",
"reference": "+254700123456"
}
curl -X POST "https://score.farmsky.africa/v3/statements/analyse" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"statement_type":"MPESA","reference":"+254700123456"}'
Government & Identity Verification
Real-time National ID / alien card / citizen verification via IPRS.
/v3/iprs/verify
IPRS national ID verification.
Show example
{
"national_id": "31234567"
}
curl -X POST "https://score.farmsky.africa/v3/iprs/verify" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"national_id":"31234567"}'
Verification & Credit Data Operations
KYC/KYB identity checks, biometrics, credit bureau (CRB) and the full composite credit/financing evaluation engine.
/v3/kyc
KYC — IPRS + biometric liveness for a natural person.
Show example
{
"national_id": "31234567"
}
curl -X POST "https://score.farmsky.africa/v3/kyc" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"national_id":"31234567"}'
/v3/kyb
KYB — business registration + directors.
Show example
{
"brs_number": "PVT-XYZ12345",
"tax_pin": "P051234567X",
"directors": [
{
"national_id": "12345678",
"shareholding_pct": 100
}
]
}
curl -X POST "https://score.farmsky.africa/v3/kyb" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"brs_number":"PVT-XYZ12345","tax_pin":"P051234567X","directors":[{"national_id":"12345678","shareholding_pct":100}]}'
/v3/biometrics/verify
Biometric liveness + face match with configurable thresholds.
Show example
{
"reference": "31234567",
"t_approve": 0.85,
"t_reject": 0.5
}
curl -X POST "https://score.farmsky.africa/v3/biometrics/verify" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"31234567","t_approve":0.85,"t_reject":0.5}'
/v3/crb
Credit Bureau pull (individual or business).
Show example
{
"national_id": "31234567",
"subject_type": "INDIVIDUAL"
}
curl -X POST "https://score.farmsky.africa/v3/crb" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"national_id":"31234567","subject_type":"INDIVIDUAL"}'
/v3/credit/evaluations
Full composite credit decision (300–850 + SHAP).
Show example
{
"applicant_type": "INDIVIDUAL_FARMER",
"lender_reference": "LN-2026-000123",
"applicant": {
"national_id": "31234567",
"phone": "+254700123456",
"consent_token": "cst_..."
},
"farm": {
"gps": {
"lat": -0.2827,
"lon": 36.0662
},
"crop": "MAIZE",
"acreage_ha": 1.4,
"planting_date": "2026-03-14"
},
"loan_application": {
"amount_kes": 45000,
"tenor_months": 6,
"purpose": "INPUTS"
}
}
curl -X POST "https://score.farmsky.africa/v3/credit/evaluations" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"applicant_type":"INDIVIDUAL_FARMER","lender_reference":"LN-2026-000123","applicant":{"national_id":"31234567","phone":"+254700123456","consent_token":"cst_..."},"farm":{"gps":{"lat":-0.2827,"lon":36.0662},"crop":"MAIZE","acreage_ha":1.4,"planting_date":"2026-03-14"},"loan_application":{"amount_kes":45000,"tenor_months":6,"purpose":"INPUTS"}}'
Transaction Operations
Digital invoicing and invoice-financing (factoring) eligibility evaluation.
/v3/invoices
Create a digital invoice (auto VAT).
Show example
{
"issuer": {
"name": "Green Agri Ltd"
},
"buyer": {
"name": "Nakuru Millers"
},
"line_items": [
{
"description": "Maize 90kg bags",
"qty": 200,
"unit_price": 4200
}
],
"due_date": "2026-09-01"
}
curl -X POST "https://score.farmsky.africa/v3/invoices" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"issuer":{"name":"Green Agri Ltd"},"buyer":{"name":"Nakuru Millers"},"line_items":[{"description":"Maize 90kg bags","qty":200,"unit_price":4200}],"due_date":"2026-09-01"}'
/v3/invoices/:id
Retrieve an invoice.
Show example
curl -X GET "https://score.farmsky.africa/v3/invoices/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/invoice-financing/evaluate
Evaluate invoice-financing / factoring eligibility.
Show example
{
"invoice_amount_kes": 840000,
"buyer_reference": "Nakuru Millers",
"tenor_days": 60
}
curl -X POST "https://score.farmsky.africa/v3/invoice-financing/evaluate" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"invoice_amount_kes":840000,"buyer_reference":"Nakuru Millers","tenor_days":60}'
SDK, Workflows & Embeddable Verification
Drop-in client SDK plus the Workflow Builder Console (OTP-authenticated) that lets lenders assemble verification flows and embed them in native mobile & web apps. Console endpoints (/v3/app/*) require a Bearer session token; the embeddable verify runner (/v3/verify/*) is called by the SDK using a public Workflow Client ID.
/sdk/v1/farmsky.js
Hosted client SDK. Embed with <script src>, then call Farmsky.verify({ clientId, flow, onComplete }).
Show example
curl -X GET "https://score.farmsky.africa/sdk/v1/farmsky.js" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/auth/otp/request
Request a one-time passcode for Console sign-in (rate-limited per IP).
Show example
{
"email": "lender@bank.co.ke"
}
curl -X POST "https://score.farmsky.africa/v3/auth/otp/request" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"email":"lender@bank.co.ke"}'
/v3/auth/otp/verify
Verify OTP → returns an opaque 7-day session token (fss_…).
Show example
{
"email": "lender@bank.co.ke",
"code": "123456"
}
curl -X POST "https://score.farmsky.africa/v3/auth/otp/verify" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"email":"lender@bank.co.ke","code":"123456"}'
/v3/auth/me
Current session identity (Bearer token).
Show example
curl -X GET "https://score.farmsky.africa/v3/auth/me" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/auth/logout
Revoke the current session token.
Show example
curl -X POST "https://score.farmsky.africa/v3/auth/logout" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/bootstrap
Console bootstrap: org, user, members, roles, workflows, tools, payments (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/bootstrap" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/workflows
List workflows for the org (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/workflows" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/workflows
Create a workflow (Bearer).
Show example
{
"name": "Onboarding flow",
"type": "onboarding"
}
curl -X POST "https://score.farmsky.africa/v3/app/workflows" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"name":"Onboarding flow","type":"onboarding"}'
/v3/app/workflows/:id
Update workflow settings/steps: certified timestamp, GDPR retention, redirect options, timeouts, retry block, steps (Bearer).
Show example
curl -X PUT "https://score.farmsky.africa/v3/app/workflows/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/app/workflows/:id
Delete a workflow (Bearer).
Show example
curl -X DELETE "https://score.farmsky.africa/v3/app/workflows/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/app/workflows/:id/integration
Reveal Client ID + SDK/webhook snippets (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/workflows/{id}/integration" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/app/workflows/:id/regenerate
Rotate the workflow Client ID + secret (Bearer).
Show example
curl -X POST "https://score.farmsky.africa/v3/app/workflows/{id}/regenerate" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/app/workflows/:id/history
Workflow audit trail / history (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/workflows/{id}/history" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/app/checkout/quote
Price premium modules used in a workflow before publish (Bearer).
Show example
{
"workflow_id": "wf-uuid"
}
curl -X POST "https://score.farmsky.africa/v3/app/checkout/quote" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"workflow_id":"wf-uuid"}'
/v3/app/checkout/pay
Start M-Pesa STK push to unlock premium modules (Bearer).
Show example
{
"workflow_id": "wf-uuid",
"msisdn": "254712345678"
}
curl -X POST "https://score.farmsky.africa/v3/app/checkout/pay" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"workflow_id":"wf-uuid","msisdn":"254712345678"}'
/v3/app/checkout/confirm
Confirm payment & publish (sandbox completes instantly) (Bearer).
Show example
curl -X POST "https://score.farmsky.africa/v3/app/checkout/confirm" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/org
Organization profile (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/org" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/org
Update org profile & security/compliance settings (Bearer).
Show example
curl -X PUT "https://score.farmsky.africa/v3/app/org" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/members
List members (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/members" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/members
Invite a member (Bearer).
Show example
{
"email": "agent@bank.co.ke",
"role": "Agent"
}
curl -X POST "https://score.farmsky.africa/v3/app/members" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"email":"agent@bank.co.ke","role":"Agent"}'
/v3/app/roles
List roles & access matrix (Bearer).
Show example
curl -X GET "https://score.farmsky.africa/v3/app/roles" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/app/roles
Create a custom role (Bearer).
Show example
{
"title": "Reviewer",
"workflow_access": "All workflows"
}
curl -X POST "https://score.farmsky.africa/v3/app/roles" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"title":"Reviewer","workflow_access":"All workflows"}'
/v3/verify/sessions
Start an embeddable verification session (SDK; header X-Workflow-Client).
Show example
{
"flow": "wf-uuid"
}
curl -X POST "https://score.farmsky.africa/v3/verify/sessions" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"flow":"wf-uuid"}'
/v3/verify/sessions/:id/steps/:step
Submit a verification step (Compliance: document, face_match, proof_address, bank_statement, mobile_money, till_statement, paybill_statement, video_agreement, doc_signing, watchlist; Gov Checks: gov_id, business_verify, tax_verify; Credit Decisioning: credit_check, credit_individual, credit_business; custom).
Show example
curl -X POST "https://score.farmsky.africa/v3/verify/sessions/{id}/steps/{step}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"/v3/verify/sessions/:id
Get verification session status & verdict.
Show example
curl -X GET "https://score.farmsky.africa/v3/verify/sessions/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"Bulk & Pricing
Batch/bulk evaluation jobs and the Admin-backed pricing catalogue that powers the on-site cost calculator (the calculator and simulator are on-site tools, not consumable product APIs).
/v3/pricing
Get the Admin-configured pricing catalogue.
Show example
curl -X GET "https://score.farmsky.africa/v3/pricing" \ -H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"
/v3/bulk/jobs
Create a batch evaluation job.
Show example
{
"applicant_type": "INDIVIDUAL_FARMER",
"rows": [
{
"applicant": {
"national_id": "31234567",
"consent_token": "cst_demo"
},
"farm": {
"gps": {
"lat": -0.28,
"lon": 36.06
},
"crop": "MAIZE",
"acreage_ha": 1.2
},
"loan_application": {
"amount_kes": 30000,
"tenor_months": 6,
"purpose": "INPUTS"
}
}
]
}
curl -X POST "https://score.farmsky.africa/v3/bulk/jobs" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"applicant_type":"INDIVIDUAL_FARMER","rows":[{"applicant":{"national_id":"31234567","consent_token":"cst_demo"},"farm":{"gps":{"lat":-0.28,"lon":36.06},"crop":"MAIZE","acreage_ha":1.2},"loan_application":{"amount_kes":30000,"tenor_months":6,"purpose":"INPUTS"}}]}'
/v3/bulk/jobs/:id
Get bulk job status & results.
Show example
curl -X GET "https://score.farmsky.africa/v3/bulk/jobs/{id}" \
-H "Authorization: Bearer $CLIENT_ID:$CLIENT_SECRET"