---
title: Environments
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Zones](https://developers.cloudflare.com/api/typescript/resources/zones)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Environments

##### [List zone environments](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/list)

client.zones.environments.list(EnvironmentListParams {zone\_id } params, RequestOptionsoptions?): [EnvironmentListResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)>) {environments }

GET/zones/{zone\_id}/environments

##### [Create zone environments](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/create)

client.zones.environments.create(EnvironmentCreateParams {zone\_id, environments } params, RequestOptionsoptions?): [EnvironmentCreateResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)>) {environments }

POST/zones/{zone\_id}/environments

##### [Upsert zone environments](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/update)

client.zones.environments.update(EnvironmentUpdateParams {zone\_id, environments } params, RequestOptionsoptions?): [EnvironmentUpdateResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)>) {environments }

PUT/zones/{zone\_id}/environments

##### [Partially update zone environments](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/edit)

client.zones.environments.edit(EnvironmentEditParams {zone\_id, environments } params, RequestOptionsoptions?): [EnvironmentEditResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)>) {environments }

PATCH/zones/{zone\_id}/environments

##### [Delete zone environment](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/delete)

client.zones.environments.delete(stringenvironmentID, EnvironmentDeleteParams {zone\_id } params, RequestOptionsoptions?): [EnvironmentDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)>) {environments }

DELETE/zones/{zone\_id}/environments/{environment\_id}

##### [Roll back zone environment](https://developers.cloudflare.com/api/typescript/resources/zones/subresources/environments/methods/rollback)

client.zones.environments.rollback(stringenvironmentID, EnvironmentRollbackParams {zone\_id } params, RequestOptionsoptions?): [EnvironmentRollbackResponse](<https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)>) {environments }

POST/zones/{zone\_id}/environments/{environment\_id}/rollback

##### ModelsExpand Collapse

<details>

<summary>

EnvironmentListResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_list_response%20%3E%20(schema)>)

<details>

<summary>

EnvironmentCreateResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_create_response%20%3E%20(schema)>)

<details>

<summary>

EnvironmentUpdateResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_update_response%20%3E%20(schema)>)

<details>

<summary>

EnvironmentEditResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_edit_response%20%3E%20(schema)>)

<details>

<summary>

EnvironmentDeleteResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_delete_response%20%3E%20(schema)>)

<details>

<summary>

EnvironmentRollbackResponse {environments }

</summary>

<details>

<summary>

environments: Array&lt;Environment&gt;

</summary>

expression: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20expression">Link to this property</a>

locked\_on\_deployment: boolean| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20locked_on_deployment">Link to this property</a>

name: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

position: <a href="https://developers.cloudflare.com/api/typescript/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)">ListCursor</a> {after, before }

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20position">Link to this property</a>

ref: string

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20ref">Link to this property</a>

version: number| null

formatint64

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20version">Link to this property</a>

http\_application\_id?: string| null

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments%20%3E%20(items)%20%3E%20(property)%20http_application_id">Link to this property</a>

</details>

<a href="#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)%20%3E%20(property)%20environments">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.environments%20%3E%20(model)%20environment_rollback_response%20%3E%20(schema)>)