RSS feed status

Changes the status of the RSS feed update toggle.

Allows you to change the update status of a content feed. The status can only be changed if the feed has passed all validations. If the validations haven't been passed, the API will return an error.

Request format

POST https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/content-feeds/set-enabled/

user-id

Type: int64. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.

host-id

Type: host id (string). The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.

Example

{
  "url": "https://www.example.com/xml/yandex/rss.xml",
  "isEnabled": true
}
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <url>https://www.example.com/xml/yandex/rss.xml</url>
  <isEnabled>true</isEnabled>
</request>
Parameter Type Description
url string URL of the RSS feed.
isEnabled boolean Toggle status: true to enable updates, false to disable updates.

Response format

Example

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

Name

Required

Type

Description

status

Yes

string

HTTP status code. 200 OK indicates the request is successful. The feed's update status will be changed according to the provided isEnabled value.

Response codes

Code

Reason

Description

200

OK

The request is successful.

400

UNABLE_TO_ACTIVATE

The feed hasn't passed validation checks and cannot be activated.

{
  "error_code": "UNABLE_TO_ACTIVATE",
  "error_message": "The feed has validation errors and cannot be activated"
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <error_code>UNABLE_TO_ACTIVATE</error_code>
  <error_message>The feed has validation errors and cannot be activated</error_message>
</response>

404

FEED_NOT_FOUND

The specified feed URL was not found for this domain.

{
  "error_code": "FEED_NOT_FOUND",
  "error_message": "Feed not found"
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <error_code>FEED_NOT_FOUND</error_code>
  <error_message>Feed not found</error_message>
</response>