Backlink groups API
Getting a list of backlink groups
The method allows to get a list and number of backlink groups.
Request format
GET /backlink-groups/{site_id}
Request parameters
| Name | Required | Description |
| site_id | Yes | Website ID |
Result
If successful, the server returns the list and number of backlink groups.
Response example
{
“total_groups”: 2,
“groups”: [
{
“id”: 1,
“name”: “General”,
“count”: 5
},
{
“id”: 2,
“name”: “Second group”,
“count”: 1
}
]
}
Response parameters
| Name | Description |
| total_groups | Total number of groups |
| groups | Array of groups |
| id | Group ID |
| name | Group name |
| count | Number of backlinks in group |
Errors
| HTTP code | Error message |
| 403 | Access denied (wrong site_id) |
Creating a group of backlinks
The method allows to create a group of website backlinks.
Request format
POST /backlink-groups/{site_id}
{
“name”: “Group name”
}
Request parameters
| Name | Required | Description |
| site_id | Yes | Website ID |
| name | Yes | Group name |
Result
If successful, the server returns a backlink group ID.
Response example
Response parameters
| Name | Description |
| group_id | Backlink group ID |
Errors
| HTTP code | Error message |
| 403 | Access denied (wrong site_id) |
| 400 | Invalid name |
| 400 | Group already exists |
Deleting a backlink group
The method allows to delete a group of a website’s backlinks.
Request format
DELETE /backlink-groups/{site_id}?id={id}
Request parameters
| Name | Required | Description |
| site_id | Yes | Website ID |
| id | Yes | Backlink group ID |
Result
If successful, the server returns the 204 HTTP code.
Errors
| HTTP code | Error message |
| 403 | Access denied (wrong site_id) |
| 400 | Invalid group ID |
| 400 | Group does not exist |
Renaming a backlink group
The method allows to change the name of a backlink group.
Request format
PUT /backlink-groups/{site_id}
{
“id”: 2,
“name”: “New group name”
}
Request parameters
| Name | Required | Description |
| site_id | Yes | Website ID |
| id | Yes | Backlink group ID |
| name | Yes | New backlink group name |
Result
If successful, the server returns the 204 HTTP code.
Errors
| HTTP code | Error message |
| 403 | Access denied (wrong site_id) |
| 400 | Invalid name |
| 400 | Group already exists |
Moving backlinks to another group
The method allows to move backlinks from one group to another.
Request format
POST /backlink-groups/{site_id}/move
{
“id”: 1,
“backlink_ids”: [1],
“group_ids”: [2]
}
Request parameters
| Name | Required | Description |
| site_id | Yes | Website ID |
| id | Yes | Backlink group ID to move to |
| backlink_ids | No | Array of IDs of backlinks to be moved |
| group_ids | No | Array of IDs of backlink groups to be moved |
Result
If successful, the server returns the 204 HTTP code.
Errors
| HTTP code | Error message |
| 403 | Access denied (wrong site_id) |
| 400 | Invalid group IDs |
| 400 | Backlink group IDs |
| 400 | IDs of groups or backlinks are required |