Skip to main content
POST
/
secrets
Create Secret
curl --request POST \
  --url https://api.example.com/secrets \
  --header 'Content-Type: application/json' \
  --cookie fastapiusersauth= \
  --data '
{
  "name": "<string>",
  "keys": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "type": "custom",
  "description": "<string>",
  "tags": {},
  "environment": "default"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

fastapiusersauth
string
cookie
required

Query Parameters

workspace_id
string<uuid>
required

Body

application/json

Create a new secret.

Secret types

  • custom: Arbitrary user-defined types
  • token: A token, e.g. API Key, JWT Token (TBC)
  • oauth2: OAuth2 Client Credentials (TBC)
name
string
required
Required string length: 1 - 100
keys
SecretKeyValue · object[]
required
Required array length: 1 - 100 elements
type
enum<string>
default:custom

The type of a secret.

Available options:
custom,
ssh-key,
mtls,
ca-cert
description
string | null
Maximum string length: 1000
tags
Tags · object
environment
string
default:default

Response

Successful Response