View Markdown

Org

Settings, feature toggles and entitlements.

Generated from the contract, version 2.0.0-draft.2 (OpenAPI). Base URL https://usekabu.com/api. Errors are problem details, each code with its own page.

Org settings, feature toggles and entitlements

GET/v2/org
  • Auth: an API key, or a signed-in human’s token (the Kabu apps).
  • Scopes: org:write.
  • Signed-in humans: member.
Parameter In Type Required Description
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
200 OK Org
4XX Error Problem
5XX Error Problem
curl "https://usekabu.com/api/v2/org" \
  -H "Authorization: Bearer $KABU_API_KEY"

Update org settings and feature toggles

PATCH/v2/org
  • Auth: an API key, or a signed-in human’s token (the Kabu apps).
  • Scopes: org:write.
  • Signed-in humans: admin.
Parameter In Type Required Description
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.

Request body: OrgUpdate.

Status Means Body
200 OK Org
4XX Error Problem
5XX Error Problem
curl -X PATCH "https://usekabu.com/api/v2/org" \
  -H "Authorization: Bearer $KABU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Orgs create

POST/v2/orgs
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: self.
Parameter In Type Required Description
Idempotency-Key header string, at most 255 characters Optional Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h.

Request body: OrgCreate.

Status Means Body
201 OK Org
4XX Error Problem
5XX Error Problem
curl -X POST "https://usekabu.com/api/v2/orgs" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

Org members list

GET/v2/org/members
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: member.
Parameter In Type Required Description
limit query integer, from 1 to 100 Optional
after query string Optional Opaque cursor from next_cursor.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
200 OK OrgMemberList
4XX Error Problem
5XX Error Problem
curl "https://usekabu.com/api/v2/org/members" \
  -H "Authorization: Bearer $KABU_USER_TOKEN"

Org members update

PATCH/v2/org/members/{user_id}
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: admin.
Parameter In Type Required Description
user_id path string Required Member user id.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.

Request body: OrgMemberUpdate.

Status Means Body
200 OK OrgMember
4XX Error Problem
5XX Error Problem
curl -X PATCH "https://usekabu.com/api/v2/org/members/$USER_ID" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role":"admin"}'

Org members remove

DELETE/v2/org/members/{user_id}
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: admin.
Parameter In Type Required Description
user_id path string Required Member user id.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
204 Done
4XX Error Problem
5XX Error Problem
curl -X DELETE "https://usekabu.com/api/v2/org/members/$USER_ID" \
  -H "Authorization: Bearer $KABU_USER_TOKEN"

Org transfer

POST/v2/org/transfer
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: owner.
Parameter In Type Required Description
Idempotency-Key header string, at most 255 characters Optional Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.

Request body: OrgTransfer.

Status Means Body
200 OK Org
4XX Error Problem
5XX Error Problem
curl -X POST "https://usekabu.com/api/v2/org/transfer" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"…"}'

Org invites list

GET/v2/org/invites
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: admin.
Parameter In Type Required Description
limit query integer, from 1 to 100 Optional
after query string Optional Opaque cursor from next_cursor.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
200 OK OrgInviteList
4XX Error Problem
5XX Error Problem
curl "https://usekabu.com/api/v2/org/invites" \
  -H "Authorization: Bearer $KABU_USER_TOKEN"

Org invites create

POST/v2/org/invites

Team orgs only. Single-use, expiring, hashed tokens; invites confer membership, never recipient pairing.

  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: admin.
Parameter In Type Required Description
Idempotency-Key header string, at most 255 characters Optional Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.

Request body: OrgInviteCreate.

Status Means Body
201 OK OrgInviteWithToken
429 A rate, concurrency or quota limit was reached Problem
4XX Error Problem
5XX Error Problem
curl -X POST "https://usekabu.com/api/v2/org/invites" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"role":"admin"}'

Org invites revoke

DELETE/v2/org/invites/{invite_id}
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: admin.
Parameter In Type Required Description
invite_id path string Required Invite id.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
204 Done
4XX Error Problem
5XX Error Problem
curl -X DELETE "https://usekabu.com/api/v2/org/invites/$INVITE_ID" \
  -H "Authorization: Bearer $KABU_USER_TOKEN"

Preview a membership invite

GET/v2/org/invites/preview
  • Auth: no credentials.
Parameter In Type Required Description
token query string Optional
Status Means Body
200 OK OrgInvite
429 A rate, concurrency or quota limit was reached Problem
4XX Error Problem
5XX Error Problem
curl "https://usekabu.com/api/v2/org/invites/preview"

Org invites accept

POST/v2/org/invites/accept
  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: self.
Parameter In Type Required Description
Idempotency-Key header string, at most 255 characters Optional Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h.

Request body: OrgInviteAccept.

Status Means Body
200 OK Membership
4XX Error Problem
5XX Error Problem
curl -X POST "https://usekabu.com/api/v2/org/invites/accept" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"token":"…"}'

Members leave

POST/v2/org/members/me/leave

Self-leave only: target comes from the user token, never a body. Admins/members may leave; an owner receives 409 owner_must_transfer_first and must transfer before leaving. Account deletion remains unblocked and uses succession instead.

  • Kabu apps only: a signed-in human’s token. Integrations use API keys.
  • Signed-in humans: member.
Parameter In Type Required Description
Idempotency-Key header string, at most 255 characters Optional Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h.
Kabu-Org header string Optional Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner.
Status Means Body
204 Done
4XX Error Problem
5XX Error Problem
curl -X POST "https://usekabu.com/api/v2/org/members/me/leave" \
  -H "Authorization: Bearer $KABU_USER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Schemas

Org

Property Type Required Description
object "org" Required
id string Required
name string Required
api_version string Required
settings SettingsView Required Layered: org → project → agent → recipient. Unset fields inherit.
features object Required Admin toggles; can disable a purchased feature, never grant one.
entitlements Entitlements Required Read-only. What the org has bought.
kind string Optional
role string Optional
brand Brand Optional

Entitlements

Read-only. What the org has bought.

Property Type Required Description
plan string Required
features array of string Required
limits object Required

Brand

Property Type Required Description
object "brand" Required
logo_media_id string or null Required
logo_url string (uri) or null Required
accent Accent or null Required
updated_at Timestamp or null Required

OrgUpdate

Property Type Required Description
name string, at most 80 characters Optional
api_version string, matching ^\d{4}-\d{2}-\d{2}$ Optional
settings Settings Optional Layered: org → project → agent → recipient. Unset fields inherit.
features object Optional
brand BrandUpdate Optional

Unknown properties are refused.

BrandUpdate

Property Type Required Description
logo_media_id string or null Optional
accent AccentKnown or null Optional

Unknown properties are refused.

OrgCreate

Property Type Required Description
name string, 1 to 80 characters Required

Unknown properties are refused.

OrgMemberList

Property Type Required Description
object "list" Required
data array of OrgMember Required
has_more boolean Required
next_cursor string or null Required

OrgMember

Property Type Required Description
object "org_member" Required
user_id string Required
name string or null Required
role string Required
joined_at Timestamp Required

OrgMemberUpdate

Admins cannot alter the owner; ownership changes only through org.transfer.

Property Type Required Description
role string, one of "admin", "member" Required

Unknown properties are refused.

OrgTransfer

Transfer a team org to an active member atomically with membership and billing ownership.

Property Type Required Description
user_id string Required

Unknown properties are refused.

OrgInviteList

Property Type Required Description
object "list" Required
data array of OrgInvite Required
has_more boolean Required
next_cursor string or null Required

OrgInvite

Property Type Required Description
object "org_invite" Required
id string Required
org string Required
org_name string Required
role string Required
email string or null Required
status string Required
expires_at Timestamp Required

OrgInviteCreate

Property Type Required Description
email string (email) Optional
role string, one of "admin", "member" Required
expires_in integer, from 60 to 604800 Optional

Unknown properties are refused.

OrgInviteWithToken

Type: OrgInvite and object.

OrgInviteAccept

Property Type Required Description
token string, 1 to 256 characters Required

Unknown properties are refused.

Membership

Property Type Required Description
org string Required
name string Required
kind string Required
role string Required
pending_asks integer Required