POST
/
v1
/
secrets
Create Secret
curl --request POST \
  --url https://api.devin.ai/v1/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<string>",
  "key": "<string>",
  "value": "<string>",
  "sensitive": true,
  "note": "<string>"
}'
{
  "id": "<string>"
}
Create a new encrypted secret that can be used in Devin sessions. The secret will be available to all sessions created after the secret is added.

Request Body

type
string
required
Type of secret. Must be one of: cookie, key-value, totp
key
string
required
User-defined name for the secret. Must be unique within the organization.
value
string
required
The secret value to store. Will be encrypted at rest.
sensitive
boolean
required
Whether the secret should be treated as sensitive and redacted in logs.
note
string
required
Optional note describing the secret’s purpose.

Response

id
string
The unique identifier of the created secret