Submit Statement for Analysis
curl --request POST \
--url https://gateway.manka.tz/v1/api/analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://gateway.manka.tz/v1/api/analysis"
payload = {
"password": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', callback_url: '<string>'})
};
fetch('https://gateway.manka.tz/v1/api/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.manka.tz/v1/api/analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.manka.tz/v1/api/analysis"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.manka.tz/v1/api/analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.manka.tz/v1/api/analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "processing",
"task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718"
}
Bank Statement Analysis
Submit Statement for Analysis
Submit a bank statement PDF for asynchronous analysis.
POST
/
analysis
Submit Statement for Analysis
curl --request POST \
--url https://gateway.manka.tz/v1/api/analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://gateway.manka.tz/v1/api/analysis"
payload = {
"password": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', callback_url: '<string>'})
};
fetch('https://gateway.manka.tz/v1/api/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.manka.tz/v1/api/analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.manka.tz/v1/api/analysis"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.manka.tz/v1/api/analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.manka.tz/v1/api/analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "processing",
"task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718"
}
Submits a bank statement PDF for asynchronous analysis. The endpoint returns a
task_id immediately. Results are delivered via the optional callback_url and/or by polling GET /analysis/:task_id.
Request body must be
multipart/form-data. One analysis credit is deducted on successful submission.Request body
Bank statement PDF.
Password for protected PDFs. Required if the file is encrypted.
URL to receive the final result payload when analysis completes. See Callback payload.
Response
Always
"processing" on initial submission.Identifier for the analysis job. Use it to poll for results or correlate the callback payload.
{
"status": "processing",
"task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718"
}
Error responses
| Status | Reason |
|---|---|
400 | PDF is password-protected but no password was provided |
401 | Missing or invalid API token |
402 | Insufficient analysis credits |
Example
curl -X POST https://gateway.manka.tz/v1/api/analysis \
-H "Authorization: Bearer $MANKA_API_TOKEN" \
-F "file=@statement.pdf" \
-F "callback_url=https://example.com/manka/webhook"
import requests
with open("statement.pdf", "rb") as f:
r = requests.post(
"https://gateway.manka.tz/v1/api/analysis",
headers={"Authorization": f"Bearer {token}"},
files={"file": f},
data={"callback_url": "https://example.com/manka/webhook"},
)
task_id = r.json()["task_id"]
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"));
form.append("callback_url", "https://example.com/manka/webhook");
const r = await fetch("https://gateway.manka.tz/v1/api/analysis", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANKA_API_TOKEN}` },
body: form,
});
const { task_id } = await r.json();
⌘I