Secrets

Upsert a Secret

POST
Insert or Update a Secret by name for environment or space

Request

This endpoint expects an object.
name
stringRequired
The reference name for a secret.
value
stringRequired
The secret value. This is hidden in the UI.
environmentId
stringOptional
The Environment of the secret.
spaceId
stringOptional
The Space of the secret.

Response

This endpoint returns an object
data
list of objects
The value of a secret

Errors

POST
$curl -X POST https://api.x.flatfile.com/v1/secrets \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "My Secret",
> "value": "Sup3r$ecret\\/alue!",
> "environmentId": "us_env_YOUR_ID",
> "spaceId": "us_sp_YOUR_ID"
>}'
Response
1{
2 "data": [
3 {
4 "id": "us_sec_YOUR_ID",
5 "name": "My Secret",
6 "value": "Sup3r$ecret\\/alue!",
7 "environmentId": "us_env_YOUR_ID",
8 "spaceId": "us_sp_YOUR_ID"
9 }
10 ]
11}