POST
/
secrets
Python
from datagrid_ai import Datagrid

client = Datagrid(
    api_key="My API Key",
)
secret = client.secrets.create(
    name="name",
    value="value",
)
print(secret.id)
{
  "object": "secret",
  "id": "<string>",
  "created_at": "<string>",
  "name": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the secret

Maximum length: 300
value
string
required

The secret value to store

Response

201 - application/json

Successfully created secret

The Secret object represents a securely stored secret that can be referenced in converse API calls.

object
enum<string>
required

The object type, which is always secret.

Available options:
secret
id
string
required

The secret identifier, which can be referenced in the converse API.

created_at
string
required

The date and time the secret was created

name
string
required

The name of the secret