---
title: Delete
slug: rainforestapi/zipcodes-api/delete
docTags: 
createdAt: 2024-07-30T12:48:41.130Z
---

# Delete Zipcode

<font color="#f5222d">`DELETE`</font>  `/zipcodes`

To delete zipcodes from your account you should make an  `HTTP DELETE`  request to the Delete Zipcodes endpoint, specifying an array of objects containing a  `zipcode`  and  `domain`  property describing the zipcodes you'd like to delete.

Zipcodes can also be deleted visually via the [Dashboard](https://app.rainforestapi.com/zipcodes).

:::hint{type="info"}
**Zipcode Deletion & Collections**
Note that when a zipcode is deleted any requests using that zipcode in their  `customer_zipcode`  parameter will fail. This includes any requests that use this zipcode and are part of Collections you may already have set up on your account.
:::

For more information about using zip & postal codes with Rainforest API please see the [zipcodes overview](https://docs.trajectdata.com/rainforestapi/zipcodes-api/overview).

:::CodeblockTabs
```curl
$ curl -X DELETE "https://api.rainforestapi.com/zipcodes?api_key=demo" \
  --data '[ { "zipcode": "10550", "domain": "amazon.com" } ]'
```

```nodejs
const axios = require('axios');

const body = [
  {
    'zipcode': '10550',
    'domain': 'amazon.com'
  }
];

axios.delete('https://api.rainforestapi.com/zipcodes?api_key=demo', body)
  .then(response => {
    const apiResponse = response.data;

    console.log('Zipcodes Deleted: ' + JSON.stringify(apiResponse, 0, 2));

  }).catch(error => {
    console.log(error);
  });
```

```python
import requests
import json

body = [
  {
    'zipcode': '10550',
    'domain': 'amazon.com'
  }
];

api_result = requests.delete('https://api.rainforestapi.com/zipcodes?api_key=demo', json=body)

api_response = api_result.json()

print "Zipcodes Deleted: ", json.dumps(api_response)
```

```php
<?php
      
$body = array(
  array(
    'zipcode' => '10550',
    'domain' => 'amazon.com'
  )
);

$ch = curl_init('https://api.rainforestapi.com/zipcodes?api_key=demo');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
# the following options are required if you're using an outdated OpenSSL version
# more details: https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));

$json = curl_exec($ch);
curl_close($ch);

$api_result = json_decode($json, true);

print_r($api_result);

echo "Zipcodes Deleted", PHP_EOL;

?>
```
:::

An example of a successful response to the Delete Zipcodes API is shown below:

```json
{
  "request_info": {
    "success": true,
    "message": "1 zipcode deleted"
  }
}
```

***

**Next Steps**
     [Zipcodes Overview](https://docs.trajectdata.com/rainforestapi/zipcodes-api/overview)
     [Listing all zipcodes via the Zipcodes API](https://docs.trajectdata.com/rainforestapi/zipcodes-api/list)
     [Adding a zipcode via the Zipcodes API](https://docs.trajectdata.com/rainforestapi/zipcodes-api/add)
