Skip to main content
POST
/
v1
/
teams
/
{team_id}
/
secrets
cURL
curl --request POST \
--url https://api.baseten.co/v1/teams/{team_id}/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>"
}

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.

Path Parameters

team_id
string
required

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