> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update RSS Feed

> Change settings on an existing RSS feed by its id, toggling useFirstImage to add the article's top image and autoHashtag to add up to 3 relevant hashtags.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Body Parameters

**id** `string` *required*

The RSS feed id returned from the RSS feed POST endpoint.

**useFirstImage** `boolean`

Attempt to get the first or top image in the article and add it to the post.

**autoHashtag** `boolean`

Automatically add up to 3 hashtags to the post text based on the most relevant keywords.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
-X PUT https://api.ayrshare.com/api/feed
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";
const id = "4HZhptaD5";

fetch("https://api.ayrshare.com/api/feed", {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${API_KEY}`
      },
      body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.err
```

```python Python theme={"system"}
import requests

payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
headers = {'Content-Type': 'application/json',
        'Authorization': 'Bearer API_KEY'}

r = requests.put('https://api.ayrshare.com/api/feed',
    json=payload,
    headers=headers)

print(r.json())
```

```php PHP theme={"system"}
$curl = curl_init();

$data = array (
    'id' => '_3yhtyd88',
    'useFirstImage' => false,
    'autoHashtag' => true
);

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.ayrshare.com/api/feed',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => http_build_query($data),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "id": "vVYX3cgJ7"
}
```

```json 400: RSS Feed not found theme={"system"}
{
  "action": "update",
  "status": "error",
  "code": 304,
  "message": "The feed with id vVYX3cgJ does not exist."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.