TAK Bridge API
This document describes the API for client developers, for example people who build a messenger client on top of it.
The API connects clients to a TAK server. A client sends a report, which becomes a marker on the TAK map, or a chat message, which goes into the TAK chat. The API stores everything in its own database and sends a webhook to every subscriber when something happens, so clients don't have to poll. The API does not talk to end users. How a report is collected, for example the dialog in a messenger, is entirely up to the client.
Concepts
A few terms from TAK that come up in this document:
- TAK (Team Awareness Kit) is a system for sharing a common operational picture: a map where many people see the same markers, plus a chat. The server is the TAK Server. The apps are ATAK (Android), WinTAK (Windows) and WebTAK (browser). The people who watch the map and answer in the chat are called operators here.
- A marker is a point on that map with a title, a color, a type and some remarks. Its identity is a
uid. Sending a marker again with the sameuidreplaces the old one. A marker disappears from the map when its stale time has passed. - The CoT type (Cursor on Target) is a short code like
b-m-p-s-mthat tells TAK clients which icon to draw. - A Data Sync mission is a shared collection of items on the TAK Server, kept in sync between clients. The API adds every report to a mission called
Buergermeldungen, so operators have the reports as one list. A mission has a change log, which is what the API reads to notice that an operator removed something. - All Chat is the TAK chat room that everybody can read.
Basics
- Requests and responses are JSON. The only exception is
POST /reportswith a photo, which is sent asmultipart/form-data. - Times are ISO 8601 in UTC, e.g.
2026-11-25T14:05:00.000Z. Ids are integers. - Every call except
/health*,/openapi.jsonand/docsneeds an API key in the headerAuthorization: Bearer <key>. You get the key from the operator of the API. They also tell you the base URL, which is written as$BASEbelow. - A key can read everything, including reports, photos and messages from the other clients.
Quick start
Create a report:
curl -X POST "$BASE/reports" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"category":"road_blocked","lat":48.5667,"lon":13.4319,"sender":"anna","description":"Baum auf der Straße"}'
The answer is the stored report with status 201, and a marker appears on the TAK map. Then subscribe to the events:
curl -X POST "$BASE/webhooks" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.org/hook"}'
The answer contains a secret that you need to verify the signature of each delivery (see Webhooks), and the result of a test event that was sent to your URL. After that, your endpoint gets a POST for every report and message, also for the ones other clients create.
Errors
Every response with an HTTP status of 400 or higher has the same body, with a fixed error code and a message for humans:
{ "error": "bad_request", "message": "lat must be between -90 and 90" }
| Status | error |
When |
|---|---|---|
| 400 | bad_request |
A field is invalid or missing. |
| 401 | unauthorized |
The key is missing, wrong or disabled. |
| 404 | not_found |
Unknown id, or a webhook that belongs to someone else. |
| 413 | too_large |
The photo is over 20 MB. |
| 503 | tak_unavailable |
The API has no connection to TAK. Nothing was stored, so tell your user and try again later. |
Lists
List calls return { "items": [...], "nextCursor": "..." } and are paged with a cursor. To get the next page, pass nextCursor as the query parameter cursor. On the last page nextCursor is null. limit sets the page size, 1 to 200, default 50. Lists are sorted newest first, except /events, which is oldest first (see there).
Health
GET /health
Tells you whether the service itself is running. It answers 200 even while TAK is down.
{ "status": "ok", "uptime_s": 1234 }
GET /health/tak
Tells you whether the API is connected to TAK: 200 when it is, 503 when it isn't. While TAK is down, the calls that write to TAK answer with 503 too.
{ "status": "ok", "tak": true }
{ "status": "down", "tak": false }
GET /openapi.json
The same API as an OpenAPI document, if you want to generate a client or look at the schemas.
GET /docs
Swagger UI for the same document. You can browse all calls and fields there and try them out. Click Authorize and enter your key first, otherwise the calls answer 401. This page and /openapi.json need no key.
Reports
Report
{
"id": 17,
"category": "road_blocked",
"lat": 48.5667,
"lon": 13.4319,
"alt": null,
"description": "Baum auf der Straße",
"sender": "anna",
"client": "gruppe-a",
"title": "Straße gesperrt - anna",
"color": "orange",
"cotType": "b-m-p-s-m",
"markerUid": "bridge-3f1c0c9e-8d0b-4d6e-9d2a-0f6f0c1d2e3a",
"photo": "/reports/17/photo",
"status": "open",
"resolvedAt": null,
"createdAt": "2026-11-25T14:05:00.000Z"
}
| Field | |
|---|---|
alt |
number, or null when not sent |
category |
flood, road_blocked, injured, fire or other |
description |
text or null |
sender |
the label the client sent, shown in TAK |
client |
name of the API client that created the report (taken from the key) |
title, color, cotType |
what the marker actually got, with the defaults filled in. color is null for categories without a default color |
markerUid |
uid of the marker in TAK |
photo |
path to the photo, or null when there is none |
status |
open or resolved. A resolved report is no longer in the mission and its marker has expired, so TAK clients remove it from the map |
resolvedAt |
time it was resolved, null while open |
POST /reports
Creates a report, puts a marker on the TAK map and adds the marker to the Data Sync mission Buergermeldungen. Send the fields as application/json. If you have a photo, use multipart/form-data instead, with the same fields as form parts and the file in the part photo.
| Field | ||
|---|---|---|
category |
required | see above |
lat |
required | number, -90 to 90 |
lon |
required | number, -180 to 180 |
alt |
optional | height in meters above the WGS84 ellipsoid (hae in TAK), -500 to 10000. Phones usually report height above sea level, which in Germany is off by tens of meters, so only send this if you can convert it. Default: not set |
sender |
required | 1 to 100 chars, shown to the operators in TAK, e.g. anna. Must not start with !, because a chat bot in the TAK network reacts to lines that start with ! |
description |
optional | up to 1000 chars, line breaks are fine. It becomes the first part of the marker remarks in TAK |
photo |
optional | jpeg, png, gif or webp, up to 20 MB and 40 megapixels |
title |
optional | marker title in TAK, up to 100 chars. Default: the German category label and the sender, e.g. Straße gesperrt - anna |
color |
optional | blue, orange, red, yellow, green, white or #RRGGBB. Default depends on the category |
cotType |
optional | CoT type of the marker, e.g. b-m-p-s-m. Up to 40 chars, only letters, digits and -. Default depends on the category |
staleHours |
optional | how long the marker stays on the map, 1 to 720. Default 168 (7 days) |
How the marker looks is up to you. The API checks the format of title, color, cotType and staleHours, but it can't know whether ATAK has an icon for a given cotType, so test your types on a real map. category on the other hand is always one of the five fixed values, which keeps reports from all clients comparable. The marker remarks (description, sender, client name, time and photo link) are always built by the API.
{
"category": "road_blocked",
"lat": 48.5667,
"lon": 13.4319,
"description": "Baum auf der Straße",
"sender": "anna"
}
The API answers 201 with the report. Some details:
- The photo is checked by its content, not its file name, then rotated, stripped of metadata and scaled down to 2560 px. If the photo fails this check, the report itself still goes through: the marker is placed without a photo and
photoisnullin the answer. - A report doesn't write anything into TAK chat. If you want a chat line for it, send one with
POST /messages. - A
503means nothing was stored and nothing is on the map, so it is safe to retry later.
GET /reports
Lists reports. Query parameters: category, status, since (a time, only reports created after it), limit, cursor.
GET /reports/{id}
Returns one report.
GET /reports/{id}/photo
Returns the image with its content type, or 404 when the report has no photo. Like every other call it needs your key, so a webhook subscriber gets the path in the event and fetches the image with its own key.
PATCH /reports/{id}
Changes a report. Send only the fields that change. Allowed are category, lat, lon, alt, description, title, color, cotType, staleHours and status, with the same rules as in POST /reports. The photo and the sender can't be changed. Any key can change any report, not only the one that created it.
{ "status": "resolved" }
The API answers 200 with the updated report, or 503 when TAK is not connected, in which case nothing changed. What happens in TAK depends on the fields:
- Changed marker fields: the marker is sent again with the same uid, and TAK replaces it in place.
"status": "resolved": the report is removed from the mission and its marker is sent again with a stale time of about one second from now, so TAK clients treat it as expired and drop it from the map.resolvedAtis set. The report and its photo stay in the API."status": "open"on a resolved report: the report is added to the mission again and the marker is sent again. While a report is resolved, other changes are stored but not shown in TAK until it is open again.
Every change sends a report.updated event (see Events). The event carries the whole report after the change, not only the changed fields.
Resolving in TAK
Operators can resolve reports in TAK too. They do this by removing the report from the Data Sync mission Buergermeldungen.
The TAK server records every change to the mission in a change log. The API reads this log every few seconds (5 s by default). When it finds that the marker of an open report was removed, it sets the report to resolved, expires the marker (same as with PATCH) and sends report.updated with source: "tak". The API remembers which changes it has already seen, so a report that was removed while the API was down or disconnected is picked up as soon as it is back. Removing only the photo file from the mission is ignored.
Messages
Message
{
"id": 52,
"direction": "in",
"sender": "Operator 1",
"senderUid": "ANDROID-3a5f9c",
"direct": false,
"text": "Ist die Straße noch gesperrt?",
"client": null,
"createdAt": "2026-11-25T14:07:10.000Z"
}
| Field | |
|---|---|
direction |
out: sent through the API into TAK. in: came from TAK |
sender |
out: the label the client sent. in: the callsign of the TAK user |
senderUid |
in: TAK uid of the sender. out: null |
direct |
in: true for a direct message to the API's own TAK contact, false for All Chat. out: always false |
text |
the text without the sender prefix |
client |
out: name of the API client. in: null |
The API stores everything that arrives in All Chat Rooms and every direct message to its own TAK contact, including the answers of the chat bot. Messages the API sent itself come back from TAK as an echo. Those are ignored, since they are already stored as out.
POST /messages
Sends a message into TAK All Chat, where it shows up as <sender>: <text>. Because the line always starts with the sender and the sender can't start with !, a message can never trigger that bot.
| Field | ||
|---|---|---|
sender |
required | 1 to 100 chars, must not start with ! |
text |
required | 1 to 4000 chars |
{ "sender": "anna", "text": "Hier ist ein Baum auf der Straße" }
Answers 201 with the stored message (direction: "out"), or 503 when TAK is not connected.
GET /messages
Lists messages. Query parameters: direction (in or out), since (a time), limit, cursor.
Events
Everything that happens is stored as an event with an increasing id. The same events go out as webhooks and can be read with GET /events.
Event
{
"id": 301,
"type": "report.created",
"source": "gruppe-a",
"createdAt": "2026-11-25T14:05:00.000Z",
"data": { "id": 17, "category": "road_blocked", "...": "the report" }
}
type |
source |
data |
|---|---|---|
report.created |
name of the client that created it | Report |
report.updated |
name of the client that changed it, or tak when an operator removed it from the mission |
Report (after the change) |
message.created |
name of the client that sent it | Message |
message.received |
tak |
Message |
You also get the events you caused yourself. Compare source with your client name to skip them.
GET /events
Returns events in order, oldest first, so you can follow along. Query parameters: since (an event id, you get the events after it) and limit. There is no nextCursor here: you ask again with since set to the last id you got. This is the way to catch up after your client was offline, and it also covers deliveries that failed for good.
{ "items": [ { "id": 302, "type": "message.received", "...": "..." } ] }
Webhooks
A webhook is a URL that gets every event as an HTTP POST. Webhooks belong to the key that created them, and you only see your own.
Webhook
{ "id": 4, "url": "https://example.org/hook", "createdAt": "2026-11-25T14:00:00.000Z" }
POST /webhooks
Creates a webhook. url must be http or https, private addresses are allowed.
{ "url": "https://example.org/hook" }
The API answers 201 with the webhook and a secret, which you need to check the signature of each delivery. The secret is only shown in this answer, so save it.
{ "id": 4, "url": "https://example.org/hook", "createdAt": "...", "secret": "k3J...random..." }
Before answering, the API also sends a test event to the new URL and puts the result into the answer as test. A failed test does not stop the webhook from being created, since your endpoint may not be running yet.
{ "id": 4, "url": "...", "createdAt": "...", "secret": "k3J...", "test": { "ok": true, "status": 200, "error": null } }
POST /webhooks/{id}/test
Sends a webhook.test event to the webhook right away, so you can check your endpoint or your signature check without waiting for real traffic. It is one attempt with a 10 second timeout. The call answers 200 with the result, also when the test failed:
{ "ok": false, "status": null, "error": "timeout" }
ok is true for any 2xx. status is the HTTP status your endpoint answered with, or null if there was no answer, and then error says why.
The test event looks like any other event and is signed the same way. It has "id": 0 and "source": "api", and only this one webhook gets it. It is not stored, so it doesn't show up in GET /events or in the deliveries.
{
"id": 0,
"type": "webhook.test",
"source": "api",
"createdAt": "2026-11-25T14:00:00.000Z",
"data": { "webhookId": 4 }
}
GET /webhooks
Lists your webhooks, without their secrets.
DELETE /webhooks/{id}
Deletes the webhook. Answers 204.
GET /webhooks/{id}/deliveries
Lists the recent delivery attempts for a webhook, newest first, with the usual limit and cursor. This is where to look when nothing arrives.
{
"items": [
{
"eventId": 301,
"status": "pending",
"attempts": 2,
"nextAttemptAt": "2026-11-25T14:12:00.000Z",
"lastStatus": 503,
"lastError": null
}
],
"nextCursor": null
}
status is pending, done or failed. lastStatus is the HTTP status of the last attempt, or null if there was no answer, and then lastError says why (timeout, connection refused and so on).
What we send
Each delivery is a POST to your URL with the event as the JSON body, the same as Event above.
| Header | |
|---|---|
X-Event-Id |
event id |
X-Event-Type |
event type |
X-Signature |
sha256= followed by the hex HMAC-SHA256 of the raw body, with the webhook secret as key |
Your endpoint has to answer with a 2xx within 10 seconds. Anything else counts as a failure: another status, a timeout, or no connection at all. Redirects are not followed. A failed delivery is retried after 10 s, 1 min, 5 min, 30 min and 2 h. If the last retry fails too, the delivery is marked failed and stays that way, but the event is still in GET /events.
Because of the retries, events can arrive late or out of order, so sort them by id. The same event can also arrive twice, so remember which ids you have already handled.
Checking the signature in Node:
import { createHmac, timingSafeEqual } from "node:crypto";
function valid(rawBody, header, secret) {
const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(header ?? "");
return a.length === b.length && timingSafeEqual(a, b);
}
Compute the HMAC over the raw body as it arrived. If you parse the JSON and serialize it again, the bytes can differ and the signature won't match.