Hub API
The Tribe Hub serves a REST API for everything you can't reasonably read from the chain directly — tweets, DMs, notifications, indexed counters, and signed envelope storage. Onchain endpoints expose the hub's indexed view of Solana program accounts.
Base URL
Local hub
http://localhost:4000Your hub
http://<hub-host>:4000There is no canonical public hub. Run your own with brew install tribe, or point at a hub a friend is running.
Submit & feed
| Method | Path | Description |
|---|---|---|
| POST | /v1/submit | Submit any signed envelope (tweets, follows, reactions, DMs, polls, votes, RSVPs, etc.). |
| POST | /v1/upload | Upload media — returns its BLAKE3 hash for use in subsequent envelopes. |
| GET | /v1/feed | Global feed of recent posts. |
| GET | /v1/feed/:tid | Posts authored by a specific TID. |
| GET | /v1/feed/channel/:channelId | Posts addressed to a specific channel. |
| GET | /v1/messages/:hash | Fetch a single signed envelope by BLAKE3 hash. |
| GET | /v1/media/:hash | Serve uploaded media by its hash. |
Identity & social
| Method | Path | Description |
|---|---|---|
| GET | /v1/user/:tid | User profile and aggregate counters. |
| GET | /v1/followers/:tid | List followers of a TID. |
| GET | /v1/following/:tid | List who a TID is following. |
| GET | /v1/bookmarks/:tid | Bookmarked envelope hashes for a TID. |
| GET | /v1/notifications/:tid | Server-rendered notifications for a TID. |
| GET | /v1/notifications/:tid/count | Unread notification count. |
DMs (NaCl-box encrypted)
| Method | Path | Description |
|---|---|---|
| POST | /v1/dm/register-key | Publish your Curve25519 public key for inbound DMs. |
| GET | /v1/dm/key/:tid | Look up another TID's DM public key. |
| POST | /v1/dm/send | Send a 1:1 DM ciphertext. |
| GET | /v1/dm/conversations/:tid | List a TID's conversation summaries. |
| GET | /v1/dm/messages/:conversationId | Fetch ciphertexts for a conversation. |
| POST | /v1/dm/groups/create | Create a group conversation. (+ add-member / remove-member / leave / send / delete) |
Channels · polls · events · tasks · crowdfunds
| Method | Path | Description |
|---|---|---|
| GET | /v1/channels | List registered channels. |
| GET | /v1/polls/:id | Hub-stored poll with current tally. |
| GET | /v1/polls/:id/vote/:tid | Whether a TID has voted, and what for. |
| GET | /v1/events/:id | Event details and aggregate RSVPs. |
| GET | /v1/events/:id/rsvp/:tid | RSVP state for a specific TID. |
| GET | /v1/crowdfunds/:id/pledges | All pledges on a campaign. |
| GET | /v1/karma/onchain/:tid | Karma score derived from on-chain tip + task proofs. |
Operations
| Method | Path | Description |
|---|---|---|
| GET | /health | Liveness probe (no version prefix). |
| GET | /metrics | Prometheus metrics. |
| GET | /v1/stats | Message counts, peer count, indexer head. |
| GET | /v1/peers | Currently connected gossip peers and their state. |
| GET | /v1/sync/status | Per-peer sync coverage and last-sync timestamps. |
WebSockets
GET /v1/wsClient subscription stream — receives new validated envelopes as they arrive.GET /gossipHub-to-hub gossip endpoint. hello → have → want → messages on a 5 s tick.