Bỏ qua

Account API

Quản lý tài khoản Facebook.


Update Status

Cập nhật trạng thái tài khoản.

PATCH /api/v1/account/status/:accountId

Path Parameters

Param Type Mô tả
accountId string Account ID (UUID) hoặc Facebook UID

Body Parameters

Param Type Required Mô tả
status string Yes Trạng thái mới

Status Values

Status Mô tả
new Mới thêm vào
available Sẵn sàng
live Đang hoạt động
die Đã chết
checking Đang kiểm tra
error Có lỗi

Request

curl -X PATCH "https://api.socialking.vn/api/v1/account/status/100084198681477" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "live"
  }'

Response

Success:

{
  "success": true,
  "message": "Cập nhật status thành công",
  "data": {
    "id": "019be8db-dc2f-7174-bdaa-d5b80f5ad8a0",
    "status": "live",
    "updatedAt": "2025-01-24T12:00:00.000Z"
  }
}

No Change:

{
  "success": true,
  "message": "Status không thay đổi",
  "data": {
    "id": "019be8db-dc2f-7174-bdaa-d5b80f5ad8a0",
    "status": "live"
  }
}

Errors

400 - Invalid Data:

{
  "success": false,
  "message": "Dữ liệu không hợp lệ",
  "errors": [
    {
      "path": ["status"],
      "message": "Status không hợp lệ"
    }
  ]
}

404 - Not Found:

{
  "success": false,
  "message": "Không tìm thấy tài khoản",
  "code": "ACCOUNT_NOT_FOUND"
}