API reference
Organizations and members
Read and rename an organization, check what it still contains, delete it, and list its members.
Membership changes, invites, teams and keys are made in the identity app; see Organizations.
GET /v1/orgs/:orgId/members
Members with their role, email, name and join time, and the organization's teams with their size. Callers with members:write also get pending invites.
Auth: user access token or platform agent key · Scope: members:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Response 200
{
members: {
userId: string
role: "owner" | "admin" | "developer" | "viewer"
email?: string
name?: string
joinedAt?: number
}[]
teams: {
teamId: string
slug: string
name: string
description?: string
members: number
}[]
invites?: {
inviteId: string
email: string
role: "owner" | "admin" | "developer" | "viewer"
expiresAt: number
createdAt?: number
}[]
}GET /v1/orgs/:orgId
The organization's id, slug, name, kind and creation time.
Auth: user access token or platform agent key · Scope: org:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Response 200
{
org: {
orgId: string
slug: string
name: string
kind: "platform" | "customer"
createdAt?: number
}
}Errors
| Status | Message |
|---|---|
404 | Organization not found |
PATCH /v1/orgs/:orgId
Renames the organization. The slug doesn't change.
Auth: user access token or platform agent key · Scope: org:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | 1–64 characters; trimmed |
Response 200
{
org: {
orgId: string
slug: string
name: string
kind: "platform" | "customer"
createdAt?: number
}
}Errors
| Status | Message |
|---|---|
404 | Organization not found |
GET /v1/orgs/:orgId/contents
What still has to be removed before the org can be deleted.
Auth: user access token or platform agent key · Scope: org:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Response 200
{
contents: {
projects: number
repositories: number
databases: number
buckets: number
connectors: number
agents: number
docs: number
}
}DELETE /v1/orgs/:orgId
Deletes an empty customer org: owners only, and only once it has no projects, repositories, databases, buckets, connectors, active agents or docs. Members, teams, invites and keys go with it.
Auth: user access token or platform agent key · Scope: org:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Response 204 with no body.
Errors
| Status | Message |
|---|---|
400 | The platform organization can't be deleted. |
403 | Only owners can delete an organization. |
404 | Organization not found |
409 | Remove its … first. |