Skip to main content
POST
/
v1
/
secrets
cURL
curl --request POST \
--url https://api.baseten.co/v1/secrets \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
  "name": "my_secret",
  "value": "my_secret_value"
}'
{
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "team_name": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.baseten.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass your Baseten API key. Clients automatically send Authorization: Bearer <key>. Direct callers can also use Authorization: Api-Key <key>; both schemes are accepted.

Body

application/json

A request to create or update a Baseten secret by name.

name
string
required

Name of the new or existing secret

Example:

"my_secret"

value
string
required

Value of the secret

Example:

"my_secret_value"

Response

200 - application/json

A Baseten secret. Note that we do not support retrieving secret values.

created_at
string<date-time>
required

Time the secret was created in ISO 8601 format

name
string
required

Name of the secret

team_name
string
required

Name of the team the secret belongs to