Organizations
Team organizations, invites and members.
/organizationsList the organizations you belong to.
[
{
"id": "org_4Nq...",
"name": "Acme Inc",
"slug": "acme-inc",
"role": "owner",
"isOwner": true
}
]role is one of owner, admin, member, billing, read_only.
/organizations/{id}Organization detail with members. Pending invites are included only when your role is owner or admin.
{
"id": "org_4Nq...",
"name": "Acme Inc",
"slug": "acme-inc",
"ownerUserId": "usr_1Ab...",
"role": "owner",
"members": [
{
"userId": "usr_1Ab...",
"username": "alice",
"role": "owner",
"isOwner": true,
"joinedAt": "2026-06-01T10:00:00Z"
}
],
"invites": [
{
"id": "inv_9Zx...",
"email": "[email protected]",
"role": "member",
"invitedBy": "usr_1Ab...",
"expiresAt": "2026-07-08T10:00:00Z",
"createdAt": "2026-07-01T10:00:00Z"
}
]
}/organizations/{id}/invitesInvite a member (owner/admin only, 7-day expiry, emailed to the invitee). DELETE /organizations/{id}/invites/{inviteId} revokes a pending invite. POST /organizations/invites/accept joins the caller using the emailed token.
{
"email": "[email protected]",
"role": "member"
}
→ { "id": "inv_9Zx..." }{
"token": "a1b2c3…"
}
→ { "organizationId": "org_4Nq..." }An already-used invite → 409 invite_already_used; a revoked or expired one → 410 invite_revoked / invite_expired.
/organizations/{id}/members/{userId}Change a member's role (PATCH) or remove them (DELETE) — owner/admin only. POST /organizations/{id}/leave removes the caller. The organization's owner can't be role-changed, removed, or leave this way — ownership transfer is console-only.
{
"role": "admin"
}
→ { "ok": true }{ "ok": true }