---
metadata:
  - name: generator
    content: Diplodoc Platform v5.44.0
alternate:
  - https://yandex.com/dev/webmaster/doc/en/reference/add-rss-feed.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/webmaster/doc/en/llms.txt

# Adding RSS feed

Allows you to add an RSS feed URL to a domain.

## Request format

```
POST https://api.webmaster.yandex.net/v4/user/{user_id}/hosts/{host}/news-feeds/add/
```

#|
||
`user-id`
|
<!-- source: en/_includes/popups.md -->
Type: `int64`. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the [GET /v4/user](https://yandex.com/dev/webmaster/doc/en/reference/user.md) method.
<!-- endsource: en/_includes/popups.md -->
||
||
`host-id`
|
<!-- source: en/_includes/popups.md -->
Type: `host id (string)`. The site ID. To get it, use the [GET /v4/user/{user-id}/hosts](https://yandex.com/dev/webmaster/doc/en/reference/hosts.md) method.
<!-- endsource: en/_includes/popups.md -->
||
|#

### Example

{% list tabs %}

- JSON

  ```json
    {
      "url": "https://www.example.com/rss/feed.xml"
    }
  ```

- XML

  ```xml
    <Data>
      <url>https://www.example.com/rss/feed.xml</url>
    </Data>
  ```

{% endlist %}


| **Name** | **Required** | **Type** | **Description** |
|------|------|----------|-------------|
| `url` | Yes | `string` | The URL of the feed. Pass the login and password together with the URL where it is accessible. For example: `https://yandex:WE9h4FfBml@example.com/feed.yml`. |

## Response format

### Example
  
{% list tabs %}

- JSON

  ```json
  {}
  ```
  
- XML
  
  ```xml
  <?xml version="1.0" encoding="UTF-8"?>
  <response>
  </response>
  ```

{% endlist %}


#|

||
**Name** 
| 
**Required** 
| 
**Type** 
| 
**Description** 
||

||
`status` 
| 
Yes 
| 
`string` 
| 
HTTP status code. `200 OK` indicates the request was successful.
||
|#


## Response codes

#|

||
**Code**
|
**Reason**
|
**Description**
||

||
200
|
OK
|
The request is successful.
||

||
400
|
`FEED_ALREADY_EXISTS`
|
The feed already exists for this domain.

{% list tabs %}

- JSON

  
  ```json
  {
    "error_message": "Feed already exists",
    "error_code": "FEED_ALREADY_EXISTS"
  }
  ```
  

- XML

  
  ```xml
  <?xml version="1.0" encoding="UTF-8"?>
  <error>
    <error_message>Feed already exists</error_message>
    <error_code>FEED_ALREADY_EXISTS</error_code>
  </error>
  ```

{% endlist %}
||

||
400
|
`INVALID_URL`
|
The feed URL is invalid.

{% list tabs %}

- JSON

  
  ```json
  {
    "error_message": "Feed's url is invalid",
    "error_code": "INVALID_URL"
  }
  ```
  

- XML

  
  ```xml
  <?xml version="1.0" encoding="UTF-8"?>
  <error>
    <error_message>Feed's url is invalid</error_message>
    <error_code>INVALID_URL</error_code>
  </error>
  ```

{% endlist %}
||


||
400
|
`LIMIT_EXCEEDED`
|
The domain has reached its maximum number of feeds.

{% list tabs %}

- JSON

  
  ```json
  {
    "error_message": "Domain's feeds limit is exceeded",
    "error_code": "LIMIT_EXCEEDED"
  }
  ```
  

- XML

  
  ```xml
  <?xml version="1.0" encoding="UTF-8"?>
  <error>
    <error_message>Domain's feeds limit is exceeded</error_message>
    <error_code>LIMIT_EXCEEDED</error_code>
  </error>
  ```

{% endlist %}

||
|#

