---
title: Update Destination
slug: rainforestapi/destinations-api/update
docTags: 
createdAt: 2024-07-30T12:48:41.130Z
---

# Update Destination

Destinations can be updated by making an `HTTP PUT` to the `/destinations/DESTINATION_ID` endpoint (where `DESTINATION_ID` is the `id` of the Destination). The body can be either `x-www-form-urlencoded` parameters or a `JSON` object.

The [parameters](https://docs.trajectdata.com/rainforestapi/destinations-api/create#parameters) for updating a Destination are the same as those used when [creating](https://docs.trajectdata.com/rainforestapi/destinations-api/create) a Destination.

***

### Example

<font color="#faad14">`PUT`</font>  `/destinations/DESTINATION_ID`

In the example below we update a Destination with `id=ABCDEFG`  to be disabled:

:::CodeblockTabs
```curl
$ curl -X PUT "https://api.rainforestapi.com/destinations/ABCDEFG?api_key=demo" \
  -d enabled="false"
```

```nodejs
const axios = require('axios');
const body = {
  enabled: false,
}

axios.put('https://api.rainforestapi.com/destinations/ABCDEFG?api_key=demo', body)
  .then(response => {
    const apiResponse = response.data;

    console.log('Destination Updated: ' + JSON.stringify(apiResponse, 0, 2));

  }).catch(error => {
    console.log(error);
  });
```

```python
import requests
import json

body = {
  'enabled': False,
}

api_result = requests.put('https://api.rainforestapi.com/destinations/ABCDEFG?api_key=demo', json=body)

api_response = api_result.json()

print "Destination Updated: ", json.dumps(api_response)
```

```php
<?php

$body = http_build_query([
  'enabled' => false,
]);

$ch = curl_init('https://api.rainforestapi.com/destinations/ABCDEFG?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, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);

$json = curl_exec($ch);
curl_close($ch);

$api_result = json_decode($json, True);

print_r($api_result);

echo "Destination Updated", PHP_EOL;

?>
```
:::

Rainforest API responds with a JSON object containing details of the updated Destination.

:::hint{type="info"}
**Verifying your Destination**
Whenever you enable a previous disabled Destination, or update an existing Destination's credentials, Rainforest API will upload and then delete a small test file to the Destination to verify connectivity. If this connectivity test fails then the update operation itself fails.
:::

***

**Next Steps**
     [Create Destination](https://docs.trajectdata.com/rainforestapi/destinations-api/create)
     [List Destinations](https://docs.trajectdata.com/rainforestapi/destinations-api/list)
