Back to Hytribe
REST API · v1

Wire it once. It runs itself.

Hytribe is a REST API that turns a member list into small, stable tribes. Base URL api.hytribe.xyz. Authenticated with a per-community API key. A typical operator is live in an afternoon.

Getting started

From install to your first tribes

  1. Get keys. Register a community and receive a sandbox key (ht_test_…) and, on go-live, a production key (ht_live_…).
  2. Set tribe size. Keep the 3–5 default or tune with one PATCH /communities/settings call — study pods at 3–4, masterminds at 5–7.
  3. Sync members. On Slack/Discord, joins and profile updates are picked up automatically. On your own platform, fire POST /members from your signup and profile events and backfill your existing roster once.
  4. Run the first match. Trigger /hytribe match or POST /match. The engine forms tribes, queues anyone it couldn't place strongly yet, and returns a coverage report.
  5. Let it run. Anton introduces each tribe, nudges quiet ones and surfaces at-risk ones. Re-run matching on any cadence.
# 1 · Register a community — returns your API key
curl -X POST https://api.hytribe.xyz/communities \
  -H "Content-Type: application/json" \
  -d '{ "name": "Indie Hackers NYC", "platform": "custom" }'

# 2 · Sync a member (fire from your signup / profile-update)
curl -X POST https://api.hytribe.xyz/members \
  -H "X-API-Key: ht_live_9f2c…" \
  -d '{ "platform_user_id": "U012AB",
        "profile_text": "founder, climbing, AI" }'

# 3 · Run matching — returns tribes
curl -X POST https://api.hytribe.xyz/match \
  -H "X-API-Key: ht_live_9f2c…"
Example response
{
  "tribes": [
    { "id": "trb_01", "members": ["U012AB","U023CD","U087QR","U118TT"] },
    { "id": "trb_02", "members": ["U033EF","U041GH","U059IJ"] }
  ],
  "compatibility_score": 0.94,
  "queued": [],
  "processing_time": "132ms"
}
Interactive

API playground

Send authenticated example calls against the Hytribe sandbox and preview responses inline — no signup required. All calls hit synthetic data at sandbox.hytribe.xyz.

Uses the demo key ht_test_9f2c_demo. Swap in your sandbox key for real traffic.
Playground
Sandbox · sandbox.hytribe.xyz
cURL equivalent
curl -X POST https://sandbox.hytribe.xyz/v1/match \
  -H "X-API-Key: ht_test_9f2c_demo" \
  -H "Content-Type: application/json"
  -d '{   "min_tribe_size": 3,   "max_tribe_size": 5 }'
Response
Send a request to preview a synthetic response. All calls hit the sandbox and never touch member data.
Authentication

API keys and environments

All requests are authenticated with a per-community API key in the X-API-Key header over HTTPS. A key is scoped to a single community and can only read or write that community's data. Keys are stored hashed at rest and can be revoked immediately.

EnvironmentBase URLKey prefixNotes
Sandboxsandbox.hytribe.xyzht_test_Isolated database. Outbound messages and email suppressed.
Productionapi.hytribe.xyzht_live_Live infrastructure. TLS 1.2+.
Never ship a sandbox key to production
A key presented to the wrong environment is rejected at authentication before any database access. Even so, keep prefixes distinct in your secret manager.
API reference

Endpoints

Communities
POST/communitiesRegister a community and receive your API key.
GET/communities/{id}Fetch community details.
PATCH/communities/settingsSet tribe size (min_tribe_size / max_tribe_size — defaults 3 and 5).
Members
POST/membersUpsert a member profile — idempotent on platform_user_id; enriches and embeds in the background.
GET/membersList active members. Supports pagination.
DELETE/members/{platform_user_id}Soft-deactivate a member. For erasure, use the erasure endpoint.
POST/members/{platform_user_id}/erasePermanently delete member record, onboarding responses, derived profile and vector embedding.
Matching
POST/matchTrigger tribe formation; returns tribes with engine_used and embedding_coverage.
GET/match/tribesList active tribes.
GET/match/statusCheck embedding coverage and engine readiness.
Slack
GET/slack/installStart Slack OAuth.
GET/slack/oauth/callbackComplete install; register slash commands.
POST/slack/eventsHandle joins and profile changes.
POST/slack/commands/hytribe match · status · help.
Discord
GET/discord/installStart Discord OAuth.
GET/discord/oauth/callbackComplete install; register the /hytribe command.
POST/discord/interactions/hytribe match · sync · status.
Webhooks

Outbound events

Subscribe to events per community. Payloads are signed with HMAC-SHA256; verify the X-Hytribe-Signature header before processing.

EventWhenPayload
match.completedA match run finishesengine_used, embedding_coverage, tribes[]
tribe.formedA new tribe shipstribe_id, members[], compatibility_score
tribe.health.changedDaily health score changestribe_id, previous, current, signals
member.enrichedProfile enrichment completesplatform_user_id, interests, goals
Limits & errors

Rate limits, idempotency and errors

Rate limits
  • · 60 rps per community on read endpoints.
  • · 20 rps per community on write endpoints.
  • · /match is asynchronous; only 1 concurrent run per community.
  • · 429 responses include Retry-After.
Idempotency
  • · POST /members is idempotent on platform_user_id.
  • · Send an Idempotency-Key header on write requests to safely retry.
  • · Duplicate keys within 24h return the original response.
Pagination
  • · Cursor-based: ?cursor=…&limit=100 (max 200).
  • · Next cursor returned in meta.next_cursor.
Errors
  • · 400 validation · 401 auth · 403 scope
  • · 404 not found · 409 conflict · 429 rate limit
  • · 5xx server — safe to retry with backoff.
  • · Every error includes error.code and error.message.
SDKs

Official clients

LanguagePackageStatusLatest
Node / TypeScript@hytribe/sdkGAv1.4.0
PythonhytribeGAv1.3.2
Gogithub.com/hytribe/go-sdkBetav0.9.1
Rubyhytribe-rbCommunityv0.6.0

Install snippet and a versioned quickstart for each language — every SDK covers the same three endpoints so you can port a proof of concept between stacks without rewriting logic.

Install · GA
# npm
npm install @hytribe/sdk

# bun
bun add @hytribe/sdk

# pnpm
pnpm add @hytribe/sdk
Quickstart · v1.4.0
import { Hytribe } from "@hytribe/sdk";
// v1.4.0 · Node 18+, ESM & CJS

const hy = new Hytribe({ apiKey: process.env.HYTRIBE_API_KEY! });

// 1 · Register a community (once)
const community = await hy.communities.create({
  name: "Indie Hackers NYC",
  platform: "custom",
});

// 2 · Sync a member — idempotent on platform_user_id
await hy.members.upsert({
  platform_user_id: "U012AB",
  profile_text: "founder, climbing, AI",
});

// 3 · Run a match — returns tribes + coverage report
const { tribes, embedding_coverage } = await hy.match.run();

// 4 · Subscribe to webhooks (verify HMAC signature)
hy.webhooks.on("tribe.formed", (evt) => console.log(evt.tribe_id));

No SDK? The API is a plain REST surface — every response is JSON, every write accepts an Idempotency-Key, and every list endpoint is cursor-paginated.

Operations

Versioning, changelog and status

  • Versioning. URL-versioned (/v1). Backwards-incompatible changes ship under a new version; minimum 12 months' notice before deprecation.
  • Changelog. Published monthly. Breaking changes announced 30 days in advance to security and engineering contacts.
  • Status. Public status page at status.hytribe.xyz with subscribe-by-email.
  • Sandbox parity. Sandbox tracks production within 24 hours of any API change.
Ready to wire it in?
We'll issue sandbox keys and pair with your engineer on the first match.
Solutions engineering

Get sandbox keys and a paired integration call

Sandbox keys within an hour. A Hytribe engineer joins your first match to tune tribe size, scopes and webhooks.

30-day paid pilot Enterprise DPA ready
Enterprise pilot · DPA + sandbox + solutions engineer
Book pilot call