Organization
An organization the user belongs to: list, create, read or change one.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations |
create |
Organization |
GET |
/api/v1/organizations |
list |
Organizations visible to the current user |
GET |
/api/v1/organizations/{id} |
load |
Organization detail |
PATCH |
/api/v1/organizations/{id} |
patch |
Organization |
PUT |
/api/v1/organizations/{id} |
update |
Organization |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
organizations, err := client.Organization(nil).List(nil, nil)
if err != nil {
panic(err)
}
fmt.Println(organizations)
organization, err := client.Organization(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(organization)
created, err := client.Organization(nil).Create(map[string]any{"name": "example", "slug": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.Organization(nil).Update(map[string]any{"id": "example_id", "github_prs_authored_by_change_author": true, "google_workspace_domain": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.Organization(nil).Patch(map[string]any{"id": "example_id", "github_prs_authored_by_change_author": true, "google_workspace_domain": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
Lua
Construct client as shown in the Lua setup, then call the operations:
local organizations, err = client:Organization():list()
local organization, err = client:Organization():load({ id = "example_id" })
local created, err = client:Organization():create({ name = "example", slug = "example" })
local updated, err = client:Organization():update({ id = "example_id", github_prs_authored_by_change_author = true, google_workspace_domain = "example" })
local patched, err = client:Organization():patch({ id = "example_id", github_prs_authored_by_change_author = true, google_workspace_domain = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$organizations = $client->Organization()->list();
$organization = $client->Organization()->load(["id" => "example_id"]);
$created = $client->Organization()->create(["name" => "example", "slug" => "example"]);
$updated = $client->Organization()->update(["id" => "example_id", "github_prs_authored_by_change_author" => true, "google_workspace_domain" => "example"]);
$patched = $client->Organization()->patch(["id" => "example_id", "github_prs_authored_by_change_author" => true, "google_workspace_domain" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
organizations = client.Organization().list()
organization = client.Organization().load({"id": "example_id"})
created = client.Organization().create({ "name": "example", "slug": "example" })
updated = client.Organization().update({"id": "example_id", "github_prs_authored_by_change_author": True, "google_workspace_domain": "example"})
patched = client.Organization().patch({"id": "example_id", "github_prs_authored_by_change_author": True, "google_workspace_domain": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
organizations = client.Organization.list()
organization = client.Organization.load({ "id" => "example_id" })
created = client.Organization.create({ "name" => "example", "slug" => "example" })
updated = client.Organization.update({ "id" => "example_id", "github_prs_authored_by_change_author" => true, "google_workspace_domain" => "example" })
patched = client.Organization.patch({ "id" => "example_id", "github_prs_authored_by_change_author" => true, "google_workspace_domain" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const organizations = await client.Organization().list()
const organization = await client.Organization().load({ id: "example_id" })
const created = await client.Organization().create({ name: "example", slug: "example" })
const updated = await client.Organization().update({ id: "example_id", github_prs_authored_by_change_author: true, google_workspace_domain: "example" })
const patched = await client.Organization().patch({ id: "example_id", github_prs_authored_by_change_author: true, google_workspace_domain: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
activated_products |
array |
Yes | Products this organization has activated (PRD 144). |
agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
created_at |
string |
Yes | Created At |
created_at_label |
one,string,null |
Yes | Created At Label |
github_prs_authored_by_change_author |
boolean |
Yes | Github Prs Authored By Change Author |
google_workspace_domain |
one,string,null |
No | Owners can approve their verified Google Workspace domain, or send null to disable automatic joining. |
id |
string |
Yes | Id |
logo_url |
one,string,null |
Yes | Logo Url |
member_count |
integer |
Yes | Member Count |
name |
string |
Yes | Name |
pending_invitation_count |
integer |
Yes | Pending Invitation Count |
personal |
boolean |
Yes | Personal |
repository_count |
integer |
Yes | Repository Count |
role |
one,string,null |
Yes | Role |
sandbox_region |
string |
Yes | Sandbox Region |
shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. |
slug |
string |
Yes | Slug |
source_control_providers |
array |
No | Connected source control providers for this organization. |
source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
updated_at |
string |
Yes | Updated At |
updated_at_label |
one,string,null |
Yes | Updated At Label |
verify_pr_scenario_writing_enabled |
boolean |
Yes | Verify Pr Scenario Writing Enabled |
create
POST /api/v1/organizations
Operation ID: post_api_v1_organizations.
Authentication: bearer token (bearerAuth).
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
slug |
string |
Yes | |
timezone |
string |
No | IANA timezone; defaults to UTC |
Responses
200: Organization
application/json
| Property | Type | Required | Description |
|---|---|---|---|
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |
201: Organization
application/json
| Property | Type | Required | Description |
|---|---|---|---|
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
list
GET /api/v1/organizations
Operation ID: api_v1_organizations.
Authentication: bearer token (bearerAuth).
Responses
200: Organizations visible to the current user
application/json
| Property | Type | Required | Description |
|---|---|---|---|
active_organization |
object or null |
Yes | |
organizations |
array of object |
Yes | |
organizations[].activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organizations[].agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organizations[].can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organizations[].created_at |
string (date-time) |
Yes | |
organizations[].created_at_label |
string |
Yes | |
organizations[].github_prs_authored_by_change_author |
boolean |
Yes | |
organizations[].id |
string |
Yes | |
organizations[].logo_url |
string |
Yes | |
organizations[].member_count |
integer |
Yes | |
organizations[].name |
string |
Yes | |
organizations[].pending_invitation_count |
integer |
Yes | |
organizations[].personal |
boolean |
Yes | |
organizations[].repository_count |
integer |
Yes | |
organizations[].role |
string |
Yes | |
organizations[].sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organizations[].shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organizations[].slug |
string |
Yes | |
organizations[].source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organizations[].source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organizations[].timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organizations[].updated_at |
string (date-time) |
Yes | |
organizations[].updated_at_label |
string |
Yes | |
organizations[].verify_pr_scenario_writing_enabled |
boolean |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/organizations/{id}
Operation ID: api_v1_organization.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Responses
200: Organization detail
application/json
| Property | Type | Required | Description |
|---|---|---|---|
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
patch
PATCH /api/v1/organizations/{id}
Operation ID: patch_api_v1_organizations_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
github_prs_authored_by_change_author |
boolean |
No | |
google_workspace_domain |
string |
No | Owners can approve their verified Google Workspace domain, or send null to disable automatic joining. |
name |
string |
No | |
sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
No | |
shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. |
slug |
string |
No | |
timezone |
string |
No | IANA timezone such as America/New_York |
verify_pr_scenario_writing_enabled |
boolean |
No |
Responses
200: Organization
application/json
| Property | Type | Required | Description |
|---|---|---|---|
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
update
PUT /api/v1/organizations/{id}
Operation ID: put_api_v1_organizations_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
github_prs_authored_by_change_author |
boolean |
No | |
google_workspace_domain |
string |
No | Owners can approve their verified Google Workspace domain, or send null to disable automatic joining. |
name |
string |
No | |
sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
No | |
shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. |
slug |
string |
No | |
timezone |
string |
No | IANA timezone such as America/New_York |
verify_pr_scenario_writing_enabled |
boolean |
No |
Responses
200: Organization
application/json
| Property | Type | Required | Description |
|---|---|---|---|
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |