Adding a site
Adds the site to the user's site list.
Request format
In the request body, specify the site name and the desired data type in the Content-type
header (application/json
or application/xml
):
POST https://api.webmaster.yandex.net/v3.2/user/{user-id}/hosts/
Content-type: application/xml
Path parameters
Example
Parameter | Description |
---|---|
host_url | URI of the site to add. |
Parameter | Description |
---|---|
host_url | URI of the site to add. |
Response format
Example
Parameter | Description |
---|---|
host_id | ID of the added site. |
Parameter | Description |
---|---|
host_id | ID of the added site. |
Response codes
To view the response structure in detail, click the reason.
Code | Reason | Description |
---|---|---|
201 | CREATED | The site was added to the user's list. |
403 | HOSTS_LIMIT_EXCEEDED | The number of sites in the user's site list exceeded the limit (the current limit is 1703). |
The ID of the user who issued the token differs from the one specified in the request. In the examples below, | ||
409 | HOST_ALREADY_ADDED | A site with this name was already added to the user's site list. |
Code | Reason | Description |
---|---|---|
201 | CREATED | The site was added to the user's list. |
403 | HOSTS_LIMIT_EXCEEDED | The number of sites in the user's site list exceeded the limit (the current limit is 1703). |
The ID of the user who issued the token differs from the one specified in the request. In the examples below, | ||
409 | HOST_ALREADY_ADDED | A site with this name was already added to the user's site list. |