Accounter Agent API
Bank statement PDF extraction API docs
Swagger-style docs for AI agents to sign up, complete Paystack checkout, receive a DB-backed bearer key, upload PDFs, poll extraction jobs, and download CSV results.
Base URL
https://accounter.co.zaExtraction endpoints use Authorization: Bearer <api_key>. Keys are created from Account API Keys or returned once after paid agent onboarding.
Getting an API key
Option A
Self-serve signup
POST /api/agent/v1/onboarding with your name, email, phone, and a planKey (PROFESSIONAL, BUSINESS, PRACTICE, or ENTERPRISE). Complete the returned hosted Paystack checkoutUrl, then poll statusUrl — the raw key is returned once, the first time status is PAID.
Option B
Existing account
Sign in and open Account > API Keys. The raw key is shown once at creation time — store it immediately.
Known gap: Option A accounts start unverified
Self-serve signup does not verify the account's email, so extraction requests from a key issued this way currently return 403 EMAIL_NOT_VERIFIED until the account is verified another way. Option B accounts are unaffected.
Quickstart
Upload a PDF, poll until it completes, then read the result or download CSV.
1. Queue the extraction
curl -s -X POST https://accounter.co.za/api/agent/v1/bank-statement-extractions \
-H "Authorization: Bearer $ACCOUNTER_AGENT_API_KEY" \
-F "[email protected]" \
-F "bankSlug=fnb"2. Poll until COMPLETED or FAILED
curl -s https://accounter.co.za/api/agent/v1/bank-statement-extractions/{jobId} \
-H "Authorization: Bearer $ACCOUNTER_AGENT_API_KEY"Once status is COMPLETED, the response gains statement (masked account number only) and transactions. There is no webhook — polling every 2-3 seconds is the completion signal.
3. Or download CSV directly
curl -s https://accounter.co.za/api/agent/v1/bank-statement-extractions/{jobId}/csv \
-H "Authorization: Bearer $ACCOUNTER_AGENT_API_KEY" \
-o statement.csvRate limits & credits
- Concurrency: 1 active extraction at a time per account on every plan. A second upload while one is in flight returns
429 CONCURRENT_LIMIT. - Credits: 1 credit per page. Monthly allowance depends on plan (Professional 500, Business 1500, Practice 3000, Enterprise custom). Exhausted credits return
429 CREDIT_LIMIT. - Attempt caps: unlimited on all paid plans — hourly/daily attempt limits only apply to anonymous web traffic.
- File size: 50MB hard cap (
413 FILE_TOO_LARGE), checked before any plan-specific limit.
Error codes
Errors are always JSON: { "error": "...", "errorCode": "..." }. No stack traces, storage paths, or provider internals are ever returned.
Auth (any protected route)
INVALID_AGENT_API_KEYMissing, malformed, unknown, revoked key, or inactive userUpload validation
INVALID_FORM_DATABody was not multipart/form-dataMISSING_FILENo file fieldUNSUPPORTED_FILE_TYPEfile is not application/pdfFILE_TOO_LARGEOver 50MBCORRUPT_PDFPDF is malformed or unreadablePDF_PASSWORD_REQUIREDPDF is encrypted — retry with pdfPasswordPDF_PASSWORD_INCORRECTWrong pdfPasswordUNREADABLE_PDFCould not be parsed reliablyBACKGROUND_QUEUE_UNAVAILABLEJob queueing failed — safe to retryAccess & usage limits
EMAIL_NOT_VERIFIEDAccount email is not verifiedNO_ACTIVE_PLANNo active paid subscriptionFILE_SIZE_LIMITOver the plan's per-file size capPAGE_LIMITOver the plan's per-statement page capCONCURRENT_LIMITAnother extraction is already in flightCREDIT_LIMITNot enough credits for this page countSECURITY_UNAVAILABLEUsage-control check failed — safe to retryJob lookup & CSV
JOB_NOT_FOUNDUnknown or foreign jobIdRESULT_NOT_FOUNDCompleted job missing its documentEXTRACTION_NOT_COMPLETECSV requested before the job finishedA completed status check can also report a terminal job failure via its own errorCode (e.g. PROVIDER_TIMEOUT, NO_TRANSACTIONS_EXTRACTED, VALIDATION_FAILED) — re-upload rather than re-polling a failed job.
Endpoint reference
Generated from the live OpenAPI document below.
/api/agent/v1/onboardingStart agent signup and payment
Create an Accounter account for an agent and return a hosted Paystack checkout URL.
Request
- Auth
- No API key required
- Content type
- application/json
Responses
/api/agent/v1/onboarding/{token}Get agent signup/payment status
Poll onboarding status. After hosted checkout succeeds, this returns the raw API key once.
Request
- Auth
- No API key required
- Parameters
tokenin path
Responses
/api/agent/v1/bank-statement-extractionsQueue bank statement extraction
Upload a bank statement PDF and queue extraction.
Request
- Auth
- Bearer API key required
- Content type
- multipart/form-data
Responses
/api/agent/v1/bank-statement-extractions/{jobId}Get extraction status
Poll extraction status and return structured result when completed.
Request
- Auth
- Bearer API key required
- Parameters
jobIdin path
Responses
/api/agent/v1/bank-statement-extractions/{jobId}/csvDownload extraction CSV
Download CSV for a completed extraction.
Request
- Auth
- Bearer API key required
- Parameters
jobIdin path
Responses