Skip to content

Create Secret

POST
/secrets
curl --request POST \
--url https://api.mengi.cloud/secrets \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "value": "example", "deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create a new secret.

The secret is stored in OpenBao - nothing is stored in our database.

Media typeapplication/json
SecretCreate
object
name
required
Name
string
value
required
Value
string
deployment_id
Any of:
string format: uuid
organization_id
Any of:
string format: uuid
Examplegenerated
{
"name": "example",
"value": "example",
"deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Successful Response

Media typeapplication/json
SecretResponse
object
name
required
Name
string
key
required
Key
string
deployment_id
Any of:
string
database_id
Any of:
string
organization_id
Any of:
string
Examplegenerated
{
"name": "example",
"key": "example",
"deployment_id": "example",
"database_id": "example",
"organization_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}