CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceEnvironments

Update an environment

PATCH
https://api.x.flatfile.com/v1/environments/:environmentId
PATCH
/v1/environments/:environmentId
1curl -X PATCH https://api.x.flatfile.com/v1/environments/us_env_YOUR_ID \
2 -H "X-Disable-Hooks: true" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "name": "dev",
7 "isProd": false,
8 "guestAuthentication": [
9 "magic_link"
10 ],
11 "metadata": {
12 "key": "value"
13 },
14 "namespaces": [
15 "default"
16 ]
17}'
Try it
200Updated
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}
Updates a single environment, to change the name for example
Was this page helpful?
Previous

Delete an environment

Next
Built with
Delete an environment
Updates a single environment, to change the name for example

Authentication

AuthorizationBearer
Bearer authentication of the form `Bearer <token>`, where token is your auth token.

Path parameters

environmentIdstringRequired
ID of the environment to update

Headers

X-Disable-Hooks"true"RequiredDefaults to true

Request

This endpoint expects an object.
namestringOptional
The name of the environment
isProdbooleanOptional
Whether or not the environment is a production environment
guestAuthenticationlist of enumsOptional
Allowed values:
metadatamap from strings to anyOptional
translationsPathstringOptional
namespaceslist of stringsOptional
languageOverridestringOptional

Response

This endpoint returns an object.
idstring
Environment ID
accountIdstring
Account ID
namestring
The name of the environment
isProdboolean
Whether or not the environment is a production environment
guestAuthenticationlist of enums
Allowed values:
featuresmap from strings to any
metadatamap from strings to any
translationsPathstring or null
namespaceslist of strings or null
languageOverridestring or null
ID of the environment to update

Bearer authentication of the form Bearer <token>, where token is your auth token.