Skip to main content
PATCH
Update an environment
Requires an Account API key with the account:environments:update scope.
Partially update environment settings. Omitted fields, including fields inside webhooks, retain their existing values. Changing is_production additionally requires account:environments:set_production. The reserved prod environment cannot be renamed or have its production flag changed. Changing OpenTelemetry settings requires access to realtime logs export (included with the Growth add-on).
Supplying otlp_headers replaces the entire header set; pass an empty array to clear it.
To import a webhook signing key, use Rotate the webhook signing key with an Environment API key. The response is an acknowledgement on successful updates or an error on failures. To retrieve the updated configuration, use Get an environment with the required read permissions.

Authorizations

Authorization
string
header
required

An Environment API key from your Nango environment, or an Account API key for account-level endpoints.

Path Parameters

environmentUuid
string<uuid>
required

Environment UUID.

Body

application/json
name
string

Environment name. Lowercase letters, digits, hyphens, and underscores only. Max 255 characters. The reserved prod environment cannot be renamed.

Maximum string length: 255
Pattern: ^[a-z0-9_-]+$
Example:

"staging"

is_production
boolean

Change the production flag. Requires account:environments:set_production in addition to account:environments:update. The reserved prod environment cannot have its production flag changed.

callback_url
string<uri>

Custom OAuth callback URL for this environment.

slack_notifications
boolean

Whether Slack notifications are enabled for this environment.

otlp_endpoint
string

OpenTelemetry collector endpoint. Requires a plan with OpenTelemetry export. Pass an empty string to set an empty endpoint.

otlp_headers
object[]

Headers sent with OpenTelemetry export requests. Requires a plan with OpenTelemetry export. Replaces the entire header set; pass an empty array to clear it. Omitted headers are preserved. Maximum 100 headers.

Maximum array length: 100
webhooks
object

Partial webhook settings. Omitted fields retain their existing values.

Response

Successfully updated the environment.

success
boolean
required
Example:

true