OrganizationSecret
Operations
Every route this entity exposes. Each route links to its own reference on this page.
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:
organization_secrets, err := client.OrganizationSecret(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(organization_secrets)
organization_secret, err := client.OrganizationSecret(nil).Load(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(organization_secret)
created, err := client.OrganizationSecret(nil).Create(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.OrganizationSecret(nil).Update(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.OrganizationSecret(nil).Patch(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
removed, err := client.OrganizationSecret(nil).Remove(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local organization_secrets, err = client:OrganizationSecret():list({ organization_id = "example" })
local organization_secret, err = client:OrganizationSecret():load({ id = "example_id", organization_id = "example" })
local created, err = client:OrganizationSecret():create({ organization_id = "example" })
local updated, err = client:OrganizationSecret():update({ id = "example_id", organization_id = "example" })
local patched, err = client:OrganizationSecret():patch({ id = "example_id", organization_id = "example" })
local removed, err = client:OrganizationSecret():remove({ id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$organization_secrets = $client->OrganizationSecret()->list(["organization_id" => "example"]);
$organization_secret = $client->OrganizationSecret()->load(["id" => "example_id", "organization_id" => "example"]);
$created = $client->OrganizationSecret()->create(["organization_id" => "example"]);
$updated = $client->OrganizationSecret()->update(["id" => "example_id", "organization_id" => "example"]);
$patched = $client->OrganizationSecret()->patch(["id" => "example_id", "organization_id" => "example"]);
$client->OrganizationSecret()->remove(["id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
organization_secrets = client.OrganizationSecret().list({"organization_id": "example"})
organization_secret = client.OrganizationSecret().load({"id": "example_id", "organization_id": "example"})
created = client.OrganizationSecret().create({ "organization_id": "example" })
updated = client.OrganizationSecret().update({"id": "example_id", "organization_id": "example"})
patched = client.OrganizationSecret().patch({"id": "example_id", "organization_id": "example"})
client.OrganizationSecret().remove({"id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
organization_secrets = client.OrganizationSecret.list({ "organization_id" => "example" })
organization_secret = client.OrganizationSecret.load({ "id" => "example_id", "organization_id" => "example" })
created = client.OrganizationSecret.create({ "organization_id" => "example" })
updated = client.OrganizationSecret.update({ "id" => "example_id", "organization_id" => "example" })
patched = client.OrganizationSecret.patch({ "id" => "example_id", "organization_id" => "example" })
client.OrganizationSecret.remove({ "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const organization_secrets = await client.OrganizationSecret().list({ organization_id: "example" })
const organization_secret = await client.OrganizationSecret().load({ id: "example_id", organization_id: "example" })
const created = await client.OrganizationSecret().create({ organization_id: "example" })
const updated = await client.OrganizationSecret().update({ id: "example_id", organization_id: "example" })
const patched = await client.OrganizationSecret().patch({ id: "example_id", organization_id: "example" })
await client.OrganizationSecret().remove({ id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
app_environment_id |
one,string,null |
Yes | App Environment Id |
app_service_id |
one,string,null |
Yes | App Service Id |
created_at |
string |
Yes | Created At |
created_at_label |
one,string,null |
Yes | Created At Label |
created_by |
one,object,null |
Yes | Created By |
current_version |
one,object,null |
Yes | Current Version |
description |
one,string,null |
Yes | Description |
env_key |
string |
Yes | Env Key |
expose_to_build |
boolean |
Yes | Expose To Build |
expose_to_ci |
boolean |
Yes | Expose To Ci |
hosted_app_id |
one,string,null |
Yes | Hosted App Id |
id |
string |
Yes | Id |
last_accessed_at |
one,string,null |
Yes | Last Accessed At |
last_accessed_at_label |
one,string,null |
Yes | Last Accessed At Label |
last_accessed_by |
one,object,null |
Yes | Last Accessed By |
latest_version_number |
one,integer,null |
Yes | Latest Version Number |
name |
string |
Yes | Name |
organization_id |
one,string,null |
Yes | Organization Id |
owner_service_account_id |
one,string,null |
Yes | Owner Service Account Id |
rotation_policy |
one,string,null |
Yes | Rotation Policy |
scope_kind |
string |
Yes | Scope Kind |
slug |
string |
Yes | Slug |
status |
string |
Yes | Status |
updated_at |
string |
Yes | Updated At |
updated_at_label |
one,string,null |
Yes | Updated At Label |
create
POST /api/v1/identity/organizations/{organization_id}/secrets/{id}/disable
Operation ID: disable_api_v1_organization_secret.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/identity/organizations/{organization_id}/secrets/{id}/enable
Operation ID: enable_api_v1_organization_secret.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/identity/organizations/{organization_id}/secrets/{id}/rotate
Operation ID: rotate_api_v1_organization_secret.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/identity/organizations/{organization_id}/secrets
Operation ID: post_api_v1_identity_organizations_organization_id_secrets.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/identity/organizations/{organization_id}/secrets/upsert
Operation ID: upsert_api_v1_organization_secrets.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
env_key |
string |
Yes | |
expose_to_ci |
boolean |
No | |
name |
string |
No | |
scope_kind |
enum: organization |
No | |
value |
string |
Yes |
Responses
200: Updated organization secret metadata
application/json
| Property | Type | Required | Description |
|---|---|---|---|
secret |
object |
Yes | |
secret.app_environment_id |
string |
Yes | |
secret.app_service_id |
string |
Yes | |
secret.created_at |
string (date-time) |
Yes | |
secret.created_at_label |
string |
Yes | |
secret.created_by |
object |
Yes | |
secret.created_by.email |
string |
Yes | |
secret.created_by.id |
string |
Yes | |
secret.created_by.name |
string |
Yes | |
secret.created_by.picture_url |
string |
Yes | |
secret.current_version |
object |
Yes | |
secret.current_version.created_at |
string (date-time) |
Yes | |
secret.current_version.created_by_user_id |
string |
Yes | |
secret.current_version.expires_at |
string (date-time) |
Yes | |
secret.current_version.has_value |
boolean |
Yes | |
secret.current_version.id |
string |
Yes | |
secret.current_version.rotated_at |
string (date-time) |
Yes | |
secret.current_version.secret_id |
string |
Yes | |
secret.current_version.status |
string |
Yes | |
secret.current_version.updated_at |
string (date-time) |
Yes | |
secret.current_version.value |
string |
Yes | |
secret.current_version.value_digest |
string |
Yes | |
secret.current_version.value_kind |
string |
Yes | |
secret.current_version.version_number |
integer |
Yes | |
secret.description |
string |
Yes | |
secret.env_key |
string |
Yes | |
secret.expose_to_build |
boolean |
Yes | |
secret.expose_to_ci |
boolean |
Yes | |
secret.hosted_app_id |
string |
Yes | |
secret.id |
string |
Yes | |
secret.last_accessed_at |
string (date-time) |
Yes | |
secret.last_accessed_at_label |
string |
Yes | |
secret.last_accessed_by |
object |
Yes | |
secret.last_accessed_by.email |
string |
Yes | |
secret.last_accessed_by.id |
string |
Yes | |
secret.last_accessed_by.name |
string |
Yes | |
secret.last_accessed_by.picture_url |
string |
Yes | |
secret.latest_version_number |
integer |
Yes | |
secret.name |
string |
Yes | |
secret.organization_id |
string |
Yes | |
secret.owner_service_account_id |
string |
Yes | |
secret.rotation_policy |
string |
Yes | |
secret.scope_kind |
string |
Yes | |
secret.slug |
string |
Yes | |
secret.status |
string |
Yes | |
secret.updated_at |
string (date-time) |
Yes | |
secret.updated_at_label |
string |
Yes |
201: Created organization secret metadata
application/json
| Property | Type | Required | Description |
|---|---|---|---|
secret |
object |
Yes | |
secret.app_environment_id |
string |
Yes | |
secret.app_service_id |
string |
Yes | |
secret.created_at |
string (date-time) |
Yes | |
secret.created_at_label |
string |
Yes | |
secret.created_by |
object |
Yes | |
secret.created_by.email |
string |
Yes | |
secret.created_by.id |
string |
Yes | |
secret.created_by.name |
string |
Yes | |
secret.created_by.picture_url |
string |
Yes | |
secret.current_version |
object |
Yes | |
secret.current_version.created_at |
string (date-time) |
Yes | |
secret.current_version.created_by_user_id |
string |
Yes | |
secret.current_version.expires_at |
string (date-time) |
Yes | |
secret.current_version.has_value |
boolean |
Yes | |
secret.current_version.id |
string |
Yes | |
secret.current_version.rotated_at |
string (date-time) |
Yes | |
secret.current_version.secret_id |
string |
Yes | |
secret.current_version.status |
string |
Yes | |
secret.current_version.updated_at |
string (date-time) |
Yes | |
secret.current_version.value |
string |
Yes | |
secret.current_version.value_digest |
string |
Yes | |
secret.current_version.value_kind |
string |
Yes | |
secret.current_version.version_number |
integer |
Yes | |
secret.description |
string |
Yes | |
secret.env_key |
string |
Yes | |
secret.expose_to_build |
boolean |
Yes | |
secret.expose_to_ci |
boolean |
Yes | |
secret.hosted_app_id |
string |
Yes | |
secret.id |
string |
Yes | |
secret.last_accessed_at |
string (date-time) |
Yes | |
secret.last_accessed_at_label |
string |
Yes | |
secret.last_accessed_by |
object |
Yes | |
secret.last_accessed_by.email |
string |
Yes | |
secret.last_accessed_by.id |
string |
Yes | |
secret.last_accessed_by.name |
string |
Yes | |
secret.last_accessed_by.picture_url |
string |
Yes | |
secret.latest_version_number |
integer |
Yes | |
secret.name |
string |
Yes | |
secret.organization_id |
string |
Yes | |
secret.owner_service_account_id |
string |
Yes | |
secret.rotation_policy |
string |
Yes | |
secret.scope_kind |
string |
Yes | |
secret.slug |
string |
Yes | |
secret.status |
string |
Yes | |
secret.updated_at |
string (date-time) |
Yes | |
secret.updated_at_label |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
list
GET /api/v1/identity/organizations/{organization_id}/secrets
Operation ID: api_v1_organization_secrets.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Responses
200: Organization secrets page (organization summary plus secret metadata)
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 | |
secrets |
array of object |
Yes | |
secrets[].app_environment_id |
string |
Yes | |
secrets[].app_service_id |
string |
Yes | |
secrets[].created_at |
string (date-time) |
Yes | |
secrets[].created_at_label |
string |
Yes | |
secrets[].created_by |
object |
Yes | |
secrets[].created_by.email |
string |
Yes | |
secrets[].created_by.id |
string |
Yes | |
secrets[].created_by.name |
string |
Yes | |
secrets[].created_by.picture_url |
string |
Yes | |
secrets[].current_version |
object |
Yes | |
secrets[].current_version.created_at |
string (date-time) |
Yes | |
secrets[].current_version.created_by_user_id |
string |
Yes | |
secrets[].current_version.expires_at |
string (date-time) |
Yes | |
secrets[].current_version.has_value |
boolean |
Yes | |
secrets[].current_version.id |
string |
Yes | |
secrets[].current_version.rotated_at |
string (date-time) |
Yes | |
secrets[].current_version.secret_id |
string |
Yes | |
secrets[].current_version.status |
string |
Yes | |
secrets[].current_version.updated_at |
string (date-time) |
Yes | |
secrets[].current_version.value |
string |
Yes | |
secrets[].current_version.value_digest |
string |
Yes | |
secrets[].current_version.value_kind |
string |
Yes | |
secrets[].current_version.version_number |
integer |
Yes | |
secrets[].description |
string |
Yes | |
secrets[].env_key |
string |
Yes | |
secrets[].expose_to_build |
boolean |
Yes | |
secrets[].expose_to_ci |
boolean |
Yes | |
secrets[].hosted_app_id |
string |
Yes | |
secrets[].id |
string |
Yes | |
secrets[].last_accessed_at |
string (date-time) |
Yes | |
secrets[].last_accessed_at_label |
string |
Yes | |
secrets[].last_accessed_by |
object |
Yes | |
secrets[].last_accessed_by.email |
string |
Yes | |
secrets[].last_accessed_by.id |
string |
Yes | |
secrets[].last_accessed_by.name |
string |
Yes | |
secrets[].last_accessed_by.picture_url |
string |
Yes | |
secrets[].latest_version_number |
integer |
Yes | |
secrets[].name |
string |
Yes | |
secrets[].organization_id |
string |
Yes | |
secrets[].owner_service_account_id |
string |
Yes | |
secrets[].rotation_policy |
string |
Yes | |
secrets[].scope_kind |
string |
Yes | |
secrets[].slug |
string |
Yes | |
secrets[].status |
string |
Yes | |
secrets[].updated_at |
string (date-time) |
Yes | |
secrets[].updated_at_label |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/identity/organizations/{organization_id}/secrets/{id}
Operation ID: api_v1_organization_secret.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/identity/organizations/{organization_id}/secrets/{id}/value
Operation ID: value_api_v1_organization_secret.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/identity/organizations/{organization_id}/secrets/dotenv
Operation ID: dotenv_api_v1_organization_secrets.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
patch
PATCH /api/v1/identity/organizations/{organization_id}/secrets/{id}
Operation ID: patch_api_v1_identity_organizations_organization_id_secrets_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
remove
DELETE /api/v1/identity/organizations/{organization_id}/secrets/{id}
Operation ID: delete_api_v1_identity_organizations_organization_id_secrets_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
204: Organization secret deleted
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
update
PUT /api/v1/identity/organizations/{organization_id}/secrets/{id}
Operation ID: put_api_v1_identity_organizations_organization_id_secrets_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.