Developers

The AfriKDP Publishing API.

Built by AfriStack, live today at afrikdp.com/api — upload books, run checkout, and pay authors, all from your own app.

AfriKDP Publishing API

One request to upload, list, and sell a book.

Every request is made with an API key from your AfriKDP dashboard — a secret key (sk_live_) for server-side writes, a public key (pk_live_) safe to use in the browser.

  • Upload a book — stores the file and cover, generates the slug
  • List or fetch books with the public key, straight from the browser
  • Author sub-accounts — attribute sales and payouts to individual authors
  • Push distribution to partner marketplaces
  • Webhooks for book.created and sale.completed
// Upload a book (server-side, sk_live)
curl https://api-afrikdp.onrender.com/v1/books \
  -H "Authorization: Bearer sk_live_..." \
  -F title="Ubuntu" \
  -F price=2500 \
  -F file=@ubuntu.pdf
// → { "book_id": "bk_8937", "status": "review" }
SDK

A ~14KB client SDK, no dependencies

Wraps the whole API plus a ready-made checkout modal — no fetch calls, no checkout page to build.

Available

Client SDK (vanilla JS)

<script src="https://api-afrikdp.onrender.com/afrikdp-sdk.js">

Available

Node.js & Python packages

Wrap the full REST API — client.uploadBook(), client.createAuthor(), and more.

Status

Rate limits & errors

Every app starts at 100 requests/minute and 20,000/day. Errors return a JSON body with the matching HTTP status — 401 for a bad key, 403 for a missing scope, 429 once you're over your limit.

API is live

Books & Distribution — Live
Checkout & Payments — Live
Webhooks — Live

Ready to build on AfriKDP?

Get your API keys from your AfriKDP dashboard, or read the full reference first.