The Manka API uses Bearer token authentication. Every authenticated endpoint requires an Authorization header of the form:
Authorization: Bearer <your_api_token>
Generating a token
Create a key
Click Add an API Key, give it a label, and copy the token shown — it is displayed only once.
Treat API tokens like passwords. Store them in a secrets manager and never commit them to version control.
Example request
curl https://gateway.manka.tz/v1/api/transactions \
-X POST \
-H "Authorization: Bearer $MANKA_API_TOKEN" \
-F "file=@statement.pdf"
import requests
with open("statement.pdf", "rb") as f:
r = requests.post(
"https://gateway.manka.tz/v1/api/transactions",
headers={"Authorization": f"Bearer {token}"},
files={"file": f},
)
print(r.json())
import fs from "node:fs";
import FormData from "form-data";
import fetch from "node-fetch";
const form = new FormData();
form.append("file", fs.createReadStream("statement.pdf"));
const r = await fetch("https://gateway.manka.tz/v1/api/transactions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANKA_API_TOKEN}` },
body: form,
});
console.log(await r.json());
Authentication errors
| Status | Meaning |
|---|
401 | Missing or invalid token |
402 | Token is valid but the account has no analysis credits |
Need help? Email hello@manka.tz.