SkyTalk Docs
API Reference

Talkgroups

REST API for talkgroup management — create, list, join, leave, list members, and delete. Includes admin-only restrictions.

Talkgroups API

Talkgroups are communication channels. All members of a talkgroup receive each other's audio over the WebSocket relay.


List My Talkgroups

GET /talkgroups
Authorization: Bearer <jwt>

Returns talkgroups the authenticated user is a member of.

Response 200 OK:

{
  "talkgroups": [
    {
      "talkgroup_id": "5d647cf3-7d7f-4f59-b9f1-38a91c3bf4d7",
      "talkgroup": {
        "id": "5d647cf3-7d7f-4f59-b9f1-38a91c3bf4d7",
        "name": "Ground Ops",
        "rotation_counter": 0,
        "created_at": "2026-03-02T..."
      }
    }
  ]
}

Note: master_secret is never included in any response. Only the rotation_counter (needed for KDF) is returned.


Create Talkgroup

Admin only.

POST /talkgroups
Authorization: Bearer <admin-jwt>
Content-Type: application/json
 
{
  "name": "Ground Ops"
}

Response 200 OK:

{
  "talkgroup": {
    "id": "5d647cf3-7d7f-4f59-b9f1-38a91c3bf4d7",
    "name": "Ground Ops",
    "rotation_counter": 0,
    "created_at": "2026-03-02T..."
  }
}

Creates the talkgroup with a random 32-byte master_secret. The creator is not automatically added as a member — use POST /talkgroups/:id/join separately.


Join a Talkgroup

POST /talkgroups/:id/join
Authorization: Bearer <jwt>

Adds the authenticated user to the talkgroup. If already a member, this is a no-op (upsert).

Response 200 OK:

{ "ok": true }

The site is pulled from the user's linked device. If no device is linked, site defaults to "unknown".


Leave a Talkgroup

DELETE /talkgroups/:id/leave
Authorization: Bearer <jwt>

Response 200 OK:

{ "ok": true }

List Members

GET /talkgroups/:id/members
Authorization: Bearer <jwt>

Response 200 OK:

{
  "members": [
    {
      "user_id": "037008e8-...",
      "site": "YVR",
      "user": {
        "id": "037008e8-...",
        "username": "admin",
        "role": "admin"
      }
    }
  ]
}

Response 404 Not Found: Talkgroup does not exist.


Delete Talkgroup

Admin only.

DELETE /talkgroups/:id
Authorization: Bearer <admin-jwt>

Cascades to all memberships for this talkgroup.

Response 200 OK:

{ "ok": true }

Key Rotation (per talkgroup)

See Keys → for GET /keys/rotation and POST /keys/rotate.

On this page