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 hubhttp://localhost:4000
Your hubhttp://<hub-host>:4000

There is no canonical public hub. Run your own with brew install tribe, or point at a hub a friend is running.

Submit & feed

MethodPathDescription
POST/v1/submitSubmit any signed envelope (tweets, follows, reactions, DMs, polls, votes, RSVPs, etc.).
POST/v1/uploadUpload media — returns its BLAKE3 hash for use in subsequent envelopes.
GET/v1/feedGlobal feed of recent posts.
GET/v1/feed/:tidPosts authored by a specific TID.
GET/v1/feed/channel/:channelIdPosts addressed to a specific channel.
GET/v1/messages/:hashFetch a single signed envelope by BLAKE3 hash.
GET/v1/media/:hashServe uploaded media by its hash.

Identity & social

MethodPathDescription
GET/v1/user/:tidUser profile and aggregate counters.
GET/v1/followers/:tidList followers of a TID.
GET/v1/following/:tidList who a TID is following.
GET/v1/bookmarks/:tidBookmarked envelope hashes for a TID.
GET/v1/notifications/:tidServer-rendered notifications for a TID.
GET/v1/notifications/:tid/countUnread notification count.

DMs (NaCl-box encrypted)

MethodPathDescription
POST/v1/dm/register-keyPublish your Curve25519 public key for inbound DMs.
GET/v1/dm/key/:tidLook up another TID's DM public key.
POST/v1/dm/sendSend a 1:1 DM ciphertext.
GET/v1/dm/conversations/:tidList a TID's conversation summaries.
GET/v1/dm/messages/:conversationIdFetch ciphertexts for a conversation.
POST/v1/dm/groups/createCreate a group conversation. (+ add-member / remove-member / leave / send / delete)

Channels · polls · events · tasks · crowdfunds

MethodPathDescription
GET/v1/channelsList registered channels.
GET/v1/polls/:idHub-stored poll with current tally.
GET/v1/polls/:id/vote/:tidWhether a TID has voted, and what for.
GET/v1/events/:idEvent details and aggregate RSVPs.
GET/v1/events/:id/rsvp/:tidRSVP state for a specific TID.
GET/v1/crowdfunds/:id/pledgesAll pledges on a campaign.
GET/v1/karma/onchain/:tidKarma score derived from on-chain tip + task proofs.

Operations

MethodPathDescription
GET/healthLiveness probe (no version prefix).
GET/metricsPrometheus metrics.
GET/v1/statsMessage counts, peer count, indexer head.
GET/v1/peersCurrently connected gossip peers and their state.
GET/v1/sync/statusPer-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.