Secrets

SecretsResource

Methods

create() ->
Deprecated
post/v5/sgp/secrets

Create an account-level secret.

The secret value is stored in the cloud provider's secret store. SGP only stores metadata (key name, description, audit info). The value is never returned by any API. Returns 409 if a secret with the same key already exists.

list() -> SyncCursorPage[]
Deprecated
get/v5/sgp/secrets

List secret metadata for the account. Values are never returned.

retrieve() ->
Deprecated
get/v5/sgp/secrets/{secret_id}

Get a single secret's metadata by ID. The value is never returned.

update(, ) ->
Deprecated
patch/v5/sgp/secrets/{secret_id}

Update an existing secret's description and/or value.

If value is provided, the cloud provider secret is updated. The secret value is never returned by any API.

Parameters
secret_id: str
description: Optional[str]

Updated human-readable description

value: Optional[str]
(minLength: 1)

Updated secret value to store in cloud provider

Returns
id: str

The unique identifier of the entity.

account_id: str

The ID of the account that owns the given entity.

cloud_secret_path: str

Full path in the cloud secret store.

created_at:
(format: date-time)

The date and time when the entity was created in ISO format.

created_by:

The identity that created the entity.

key: str

Secret name, e.g. OPENAI_API_KEY.

description: Optional[str]

Optional human-readable description of the secret.

object: Optional[Literal["sgp_cloud_secret"]]
(default: "sgp_cloud_secret")
updated_at: Optional[datetime]
(format: date-time)

Timestamp of last update.

updated_by: Optional[str]

User who last updated the secret.

Request example
200Example
delete()
Deprecated
delete/v5/sgp/secrets/{secret_id}

Delete a secret from both the cloud provider and SGP metadata.

Domain types

class CloudSecret: ...

API response model for a secret. Never includes the secret value.