Skip to main content
POST
Create Secret

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json

Request body for creating a secret.

key
string
required

Secret name (e.g. openai-api-key). Must be lowercase alphanumeric with hyphens (no dots or underscores), so it maps 1:1 to a valid secret name on every cloud backend (AWS / Azure Key Vault / GCP Secret Manager).

Required string length: 1 - 90
Pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
value
string
required

The secret value to store

Minimum string length: 1
description
string

Optional human-readable description

Response

Successful Response

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

id
string
required

The unique identifier of the entity.

key
string
required

Secret name, e.g. OPENAI_API_KEY.

cloud_secret_path
string
required

Full path in the cloud secret store.

account_id
string
required

The ID of the account that owns the given entity.

created_at
string<date-time>
required

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

created_by
Identity · object
required

The identity that created the entity.

object
string
default:sgp_cloud_secret
Allowed value: "sgp_cloud_secret"
description
string

Optional human-readable description of the secret.

updated_by
string

User who last updated the secret.

updated_at
string<date-time>

Timestamp of last update.