---
title: Delete an origin cloud region mapping
---

[Skip to content](#_top)

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

[Cache](https://developers.cloudflare.com/api/go/resources/cache)

[Origin Cloud Regions](https://developers.cloudflare.com/api/go/resources/cache/subresources/origin_cloud_regions)

Copy Markdown

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

---

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

# Delete an origin cloud region mapping

client.Cache.OriginCloudRegions.Delete(ctx, originIP, body) (\*[OriginCloudRegionDeleteResponse](<https://developers.cloudflare.com/api/go/resources/cache#(resource)%20cache.origin_cloud_regions%20%3E%20(model)%20OriginCloudRegionDeleteResponse%20%3E%20(schema)>), error)

DELETE/zones/{zone\_id}/origin/cloud\_regions/{origin\_ip}

Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

originIP string

[Link to this property](<#(resource)%20cache.origin_cloud_regions%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20origin_ip%20%3E%20(schema)>)

<details>

<summary>

body OriginCloudRegionDeleteParams

</summary>

ZoneID param.Field\[string]

Identifier.

maxLength32

<a href="#(resource)%20cache.origin_cloud_regions%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cache.origin_cloud_regions%20%3E%20(method)%20delete%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type OriginCloudRegionDeleteResponse struct{…}

Response result for a delete operation. Identifies the deleted mapping.

</summary>

OriginIP string

The origin IP address whose mapping was deleted.

<a href="#(resource)%20cache.origin_cloud_regions%20%3E%20(model)%20OriginCloudRegionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20origin_ip">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cache.origin_cloud_regions%20%3E%20(model)%20OriginCloudRegionDeleteResponse%20%3E%20(schema)>)

### Delete an origin cloud region mapping

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/cache"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  originCloudRegion, err := client.Cache.OriginCloudRegions.Delete(
    context.TODO(),
    "192.0.2.1",
    cache.OriginCloudRegionDeleteParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", originCloudRegion.OriginIP)
}
```

200 example

4XX example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "origin_ip": "192.0.2.1"
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 1142,
      "message": "Unable to retrieve origin_public_cloud_region setting value. The zone setting does not exist."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

##### Returns Examples

200 example

4XX example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "origin_ip": "192.0.2.1"
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 1142,
      "message": "Unable to retrieve origin_public_cloud_region setting value. The zone setting does not exist."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```