Skip to main content
POST
/
v5
/
sgp
/
secrets
Create Secret
curl --request POST \
  --url https://api.egp.scale.com/v5/sgp/secrets \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "key": "<string>",
  "value": "<string>",
  "description": "<string>"
}
'
{
  "id": "<string>",
  "key": "<string>",
  "cloud_secret_path": "<string>",
  "account_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": {
    "id": "<string>",
    "type": "user",
    "object": "identity"
  },
  "object": "sgp_cloud_secret",
  "description": "<string>",
  "updated_by": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}

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/dots, matching Kubernetes secret naming conventions.

Required string length: 1 - 253
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
key
string
required
cloud_secret_path
string
required
account_id
string
required
created_at
string<date-time>
required
created_by
Identity · object
required

The identity that created the entity.

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

User who last updated the secret.

updated_at
string<date-time>

Timestamp of last update.