Skip to content

API reference

API: Organization

Markdown version

MethodPathWhat it doesScope
GET/v1/first-runYour first-run checklist: invite a teammate, connect an account, run your first agentsettings:read
GET/v1/invitationsList pending invitations (owner)members:write
POST/v1/invitationsInvite someone by email (owner, web only) (web app only)members:write
DELETE/v1/invitations/:idCancel a pending invitation (owner, web only) (web app only)members:write
POST/v1/invitations/:id/resendResend a pending invitation (owner, web only) (web app only)members:write
GET/v1/membersList members and their rolesmembers:read
DELETE/v1/members/:idRemove a member and revoke their API keys and app connections (owner)members:write
PATCH/v1/members/:idChange a member's role (owner)members:write
DELETE/v1/organizationSchedule the organization's deletion: it's suspended at once and, unless an owner undoes it within 30 days, purged with all its data, including audit history (owner, web only, the exact name to confirm) (web app only)security:write
GET/v1/organizationGet the active organizationsettings:read
PATCH/v1/organizationRename the organization (owner)security:write
POST/v1/organization/acquisitionNote where your new organization came from (the referrer's host and utm tags the browser kept): its channel, once. Recorded for our own product analytics, never shown to anyone else (web app only)—
GET/v1/organization/deletionWhether the organization is scheduled for deletion, and when it will be purged (answers while it's suspended) (web app only)—
POST/v1/organization/deletion/cancelUndo the organization's scheduled deletion before its window ends (owner, web only) (web app only)security:write
GET/v1/organization/exportsYour exports of this organization (owner; each holds what its requester could read, so it's theirs alone)security:write
POST/v1/organization/exportsExport everything this organization holds (every table, as gzipped JSON lines, secrets left out); ready to download for 7 days (owner) (web app only)security:write

Examples

GET /v1/first-run

Your first-run checklist: invite a teammate, connect an account, run your first agent

curl -s "https://api.cubbylark.com/v1/first-run" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/first-run`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

GET /v1/invitations

List pending invitations (owner)

curl -s "https://api.cubbylark.com/v1/invitations" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/invitations`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

GET /v1/members

List members and their roles

curl -s "https://api.cubbylark.com/v1/members" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/members`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

DELETE /v1/members/$ID

Remove a member and revoke their API keys and app connections (owner)

curl -s -X DELETE "https://api.cubbylark.com/v1/members/$ID" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/members/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

PATCH /v1/members/$ID

Change a member's role (owner)

curl -s -X PATCH "https://api.cubbylark.com/v1/members/$ID" \
  -H "Authorization: Bearer $KC_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.cubbylark.com/v1/members/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/organization

Get the active organization

curl -s "https://api.cubbylark.com/v1/organization" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/organization`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

PATCH /v1/organization

Rename the organization (owner)

curl -s -X PATCH "https://api.cubbylark.com/v1/organization" \
  -H "Authorization: Bearer $KC_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.cubbylark.com/v1/organization`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/organization/exports

Your exports of this organization (owner; each holds what its requester could read, so it's theirs alone)

curl -s "https://api.cubbylark.com/v1/organization/exports" \
  -H "Authorization: Bearer $KC_API_KEY"
const res = await fetch(`https://api.cubbylark.com/v1/organization/exports`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();

Request and response schemas: https://www.cubbylark.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.