Hubs API
Create and manage hubs, memberships, invites, ownership transfer, and hub lifecycle actions.
List hubs
GET /v1/hubsReturns all hubs the authenticated user has access to.
Get hub detail
GET /v1/hubs/:idReturns hub metadata, members, the caller's role, and any active ownership transfer.
Get hub summary
GET /v1/hubs/:id/summaryLightweight read that returns only hub counts + caller's role — cheaper than the full detail view. Used by the web app for badge rendering.
Check slug availability
GET /v1/hubs/check-slug?slug=my-teamReturns whether a slug is available for new hub creation.
Record a hub visit
POST /v1/hubs/:id/visitRecords that the caller looked at the hub. Used for read-receipt signals on hub notifications.
Create a hub
POST /v1/hubs{
"name": "Platform Team"
}Update a hub
PATCH /v1/hubs/:idOwner/admin can update name, slug, and contributor permissions.
Delete a hub
DELETE /v1/hubs/:idOwner only. Deletes the team hub and all hub-scoped memories, topics, invites, and dream data.
Membership
Add a member directly
POST /v1/hubs/:id/members{
"user_id": "user_123",
"role": "contributor"
}Update member role
PATCH /v1/hubs/:id/members/:user_id{
"role": "admin"
}Valid managed roles: admin, contributor, viewer.
Remove a member
DELETE /v1/hubs/:id/members/:user_idLeave a hub
POST /v1/hubs/:id/leaveNon-owners can leave directly. Owners must transfer ownership first, or delete the hub if they are the last member.
Ownership transfer
Create transfer
POST /v1/hubs/:id/ownership-transfer{
"target_user_id": "user_456"
}Owner only. The target must already be a member.
Accept transfer
POST /v1/hubs/:id/ownership-transfer/:transfer_id/acceptTarget member only. Accepting makes the target the new owner and demotes the previous owner to admin.
Cancel transfer
POST /v1/hubs/:id/ownership-transfer/:transfer_id/cancelCan be canceled by the current owner or the transfer target while still pending.
Invites
Create invite
POST /v1/hubs/:id/invites{
"role": "viewer"
}List active invites
GET /v1/hubs/:id/invitesRevoke invite
DELETE /v1/hubs/:id/invites/:invite_idRegenerate invite
POST /v1/hubs/:id/invites/:invite_id/regenerateResend invite
POST /v1/hubs/:id/invites/:invite_id/resendRe-sends the invite email (same token). Useful when the original email was lost.
Get invite by token
GET /v1/invites/:tokenPublic endpoint. Returns invite details used by the join page.
Accept invite
POST /v1/invites/:token/acceptRoles
| Role | Description |
|---|---|
owner | Full control, including ownership transfer and deletion |
admin | Manage members, roles, invites, settings, and shared content |
contributor | Push, recall, and contribute content |
viewer | Read-only access |