Backlink API (User)#
Quản lý backlink service: groups, accounts, requests, links.
Base URL: https://apitest.likepion.com/api/v1/backlink
Auth: JWT Token (Authorization: Bearer <token>)
Projects#
GET /projects — Danh sách projects #
Query: page (mặc định 1), limit (mặc định 20), search, status, type (service_type), type_request
Service types: entity, social, blog20, podcast, stacking, indexing
Response:
{
"success": true,
"data": [
{
"id": "uuid",
"name": "Campaign A",
"type": "entity",
"type_request": "normal",
"website": "https://target.com",
"auction_price": 100,
"target": 50,
"created_links": 30,
"status": "running",
"result": "25 / 50",
"started_at": "2025-06-01T00:00:00Z",
"created_at": "2025-05-01T00:00:00Z"
}
],
"total": 10,
"page": 1,
"limit": 20
}Groups#
POST /groups — Tạo group #
Request:
{
"name": "My Group", // required
"service_type": "entity", // required
"accounts": [ // optional, import inline
{
"website": "example.com",
"username": "user1",
"email": "user1@gmail.com",
"password": "pass123",
"app_password": "",
"pass_mail": "",
"twofa": "",
"cookies": "",
"note": ""
}
],
"skip_unsupported": true
}Response (201): Group object hoặc {"group": {...}, "imported": 10, "skipped": 2, "failed": 0} nếu có accounts.
GET /groups — Danh sách groups #
Query: page, limit, service_type, status, search, min_active (mặc định 0)
Response item:
{
"id": "uuid",
"user_id": "uuid",
"name": "My Group",
"service_type": "entity",
"status": "active",
"account_count": 100,
"account_active": 85,
"result": "85 / 100",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-06-01T00:00:00Z"
}GET /groups/:id — Chi tiết | PUT /groups/:id — Cập nhật | DELETE /groups/:id — Xóa#
GET /groups/:id/export — Export group #
POST /groups/import — Import group + accounts #
Request:
{
"service_type": "entity", // required
"name": "Imported Group", // required
"accounts": [...], // required, min 1
"skip_unsupported": true,
"overwrite": false
}Response: {"group": {"id": "uuid", "name": "..."}, "imported": 50, "overwritten": 0, "duplicates": 5, "unsupported": 2, "failed": 0}
Accounts#
POST /groups/:id/accounts — Tạo account #
Request:
{
"website": "example.com", // required
"username": "user1", // username hoặc email bắt buộc
"email": "user1@gmail.com",
"password": "pass123",
"app_password": "",
"pass_mail": "",
"twofa": "",
"cookies": "",
"note": ""
}GET /groups/:id/accounts — Danh sách accounts #
Query: page, limit, status, search
Response item:
{
"id": "uuid",
"group_id": "uuid",
"service_type": "entity",
"website": "example.com",
"username": "user1",
"email": "user1@gmail.com",
"password": "pass123",
"app_password": "",
"pass_mail": "",
"twofa": "",
"active": true,
"status": "active",
"is_indexed": false,
"note": "",
"created_at": "2025-01-01T00:00:00Z"
}POST /groups/:id/accounts/import — Import accounts #
Request:
{
"accounts": [...], // required, min 1
"overwrite": false
}Response: {"imported": 50, "overwritten": 0, "duplicates": 5, "unsupported": 2, "failed": 0}
POST /groups/:id/accounts/check-all — Check tất cả #
PUT /accounts/:id — Cập nhật | DELETE /accounts/:id — Xóa#
POST /accounts/:id/check — Check 1 account #
POST /accounts/bulk-delete — Xóa nhiều #
POST /accounts/export — Export IDs #
Requests (theo :type)#
POST /:type — Tạo request #
Request:
{
"group_id": "uuid", // optional
"name": "Campaign A", // required
"website": "https://target.com", // optional
"auction_price": 100, // required >0 (50-100 cho blog20/podcast)
"target": 50, // mặc định 10
"priority": 5,
"type_request": "normal", // mặc định = service_type
"config": {}, // JSON config
"data": {}, // optional JSON
"folder_urls": {} // optional JSON
}Credits: Trừ auction_price × target credits. Trả 402 nếu không đủ.
Response (201): Full request object.
GET /:type — Danh sách requests #
Query: page, limit, status, search, sort, order
Response item:
{
"id": "uuid",
"service_type": "entity",
"group_id": "uuid",
"name": "Campaign A",
"website": "https://target.com",
"auction_price": 100,
"target": 50,
"created_links": 30,
"status": "running",
"type_request": "normal",
"started_at": "2025-06-01T00:00:00Z",
"completed_at": null,
"created_at": "2025-05-01T00:00:00Z"
}GET /:type/:id — Chi tiết | PUT /:type/:id — Cập nhật | DELETE /:type/:id — Xóa#
POST /:type/:id/start | /stop | /restart — Điều khiển request#
POST /requests/bulk-delete | /requests/export — Batch operations#
Links#
GET /:type/:id/links — Danh sách links #
Query: page, limit, status, search, sort, order
Response item:
{
"id": "uuid",
"service_type": "entity",
"server_id": "uuid",
"server_name": "server-01",
"site_id": "uuid",
"site_name": "example.com",
"email": "user@gmail.com",
"username": "user1",
"password": "pass",
"about": "Bio text",
"link_profile": "https://example.com/profile/user1",
"link_post": "https://example.com/post/123",
"status": "completed",
"note": "",
"error_message": "",
"retry_count": 0,
"max_retries": 3,
"is_indexed": true,
"started_at": "2025-06-01T00:00:00Z",
"completed_at": "2025-06-01T00:01:00Z",
"created_at": "2025-05-01T00:00:00Z"
}GET /:type/:id/links/export — Export links #
POST /:type/:id/links/:linkId/retry — Retry 1 link #
POST /:type/:id/links/retry-all — Retry tất cả #
DELETE /:type/:id/links/:linkId — Xóa link #
Stats#
GET /stats | GET /:type/stats #
Response:
{
"success": true,
"data": {
"requests": {"pending": 5, "running": 10, "completed": 50, "failed": 2},
"links": {"pending": 100, "queued": 50, "running": 30, "completed": 500, "failed": 20}
}
}GET /sites/count?type=entity #
Response:
{"success": true, "data": {"type": "entity", "count": 150}}