Environments

Update an environment

PATCH
Updates a single environment, to change the name for example

Path parameters

environmentIdstringRequired
ID of the environment to update

Request

This endpoint expects an object.
name
stringOptional
The name of the environment
isProd
booleanOptional
Whether or not the environment is a production environment
guestAuthentication
list of enumsOptional
The type of authentication to use for guests
Allowed values: shared_linkmagic_link
metadata
map from strings to anyOptional
translationsPath
stringOptional
namespaces
list of stringsOptional
languageOverride
stringOptional

Response

This endpoint returns an object
id
string
Environment ID
accountId
string
Account ID
name
string
The name of the environment
isProd
boolean
Whether or not the environment is a production environment
guestAuthentication
list of enums
The type of authentication to use for guests
Allowed values: shared_linkmagic_link
features
map from strings to any
metadata
map from strings to any
translationsPath
stringOptional
namespaces
list of stringsOptional
languageOverride
stringOptional
PATCH
$curl -X PATCH https://api.x.flatfile.com/v1/environments/us_env_YOUR_ID \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "dev",
> "isProd": false,
> "guestAuthentication": [
> "magic_link"
> ],
> "metadata": {
> "key": "value"
> },
> "namespaces": [
> "default"
> ]
>}'
Response
1{
2 "id": "us_env_YOUR_ID",
3 "accountId": "us_acc_YOUR_ID",
4 "name": "dev",
5 "isProd": false,
6 "guestAuthentication": [
7 "magic_link"
8 ],
9 "features": {},
10 "metadata": {},
11 "namespaces": [
12 "default"
13 ]
14}