Update profile

Live
PATCH/api/v1/profile

Update the member's contact info (email / LINE ID / avatar). Full name, phone, and the bank account can only be changed by staff.

Only email / line_id / avatar_url are editable — any other field rejects the whole request (4001). selected_promotion_id is changed via the promotions module.

Headers

FieldTypeRequiredDescription
AuthorizationstringYesUsed — send Bearer <member access_token>
X-Api-KeystringYesAgent API key (ak_…) from the bo screen
X-TimestampstringYesSigning time in unix milliseconds (±300s skew allowed)
X-NoncestringYesUnique per-request value (UUIDv4) for replay protection
X-SignaturestringYeshex(HMAC-SHA256(secret, canonical)) — see the Authentication page
X-Player-IPstring—The player's real IP (IPv4/IPv6) — recommended (used in login history)
X-Player-UAstring—The player's User-Agent (optional — recorded in login history)
X-Request-Idstring—Your correlation id — echoed back as request_uuid (recommended)
x-langstring—th (default) or en — the language of message

Request bodyapplication/json

FieldTypeRequiredDescription
emailstring—Email (must be a valid email address)
line_idstring—LINE ID (max 50 characters)
avatar_urlstring—Avatar URL (max 500 characters)
Request example
{
  "email": "somchai@example.com",
  "line_id": "somchai_jd"
}

Response

Fields in data

FieldTypeRequiredDescription
idstring—Member id (uuid)
usernamestring—Username (agent prefix + phone)
phonestring | null—Mobile number
full_namestring | null—Full name
emailstring | null—Email (updated value)
line_idstring | null—LINE ID (updated value)
avatar_urlstring | null—Avatar URL (updated value)
member_tierstring | null—Member tierNEW | BRONZE | SILVER | GOLD | VIP
statusstring—Account statusACTIVE | LOCKED | BANNED | PENDING_VERIFICATION
selected_promotion_idstring | null—Deposit bonus the member selected (null = no bonus)
agent_idstring | null—Owning agent id
created_atstring (ISO 8601)—Signup time
last_login_atstring (ISO 8601) | null—Last login time
bankobject | null—The bound bank account (read-only)
└ bank_codestring—Bank code, e.g. KBANK
└ bank_namestring—Bank name (Thai)
└ account_numberstring—Account number
└ account_namestring—Account holder name
Response example
{
  "success": true,
  "code": 0,
  "message": "สำเร็จ",
  "data": {
    "id": "0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0",
    "username": "abc0812345678",
    "phone": "0812345678",
    "full_name": "สมชาย ใจดี",
    "email": "somchai@example.com",
    "line_id": "somchai_jd",
    "avatar_url": null,
    "member_tier": "BRONZE",
    "status": "ACTIVE",
    "selected_promotion_id": null,
    "agent_id": "7a6b5c4d-3e2f-4a19-b7c6-d5e4f3a2b1c0",
    "created_at": "2026-06-01T04:12:33.000Z",
    "last_login_at": "2026-07-05T02:41:07.000Z",
    "bank": {
      "bank_code": "KBANK",
      "bank_name": "ธนาคารกสิกรไทย",
      "account_number": "1234567890",
      "account_name": "สมชาย ใจดี"
    }
  },
  "request_uuid": "2e6c9b48-0d75-4f13-a8b2-7c4e1f9d5a36"
}

Possible error codes

codeNameHTTPMessage
1001UNAUTHORIZED401UnauthorizedMissing Authorization: Bearer header
1007TOKEN_INVALID401Token invalidInvalid/expired access token, or the session was revoked (logout)
1002FORBIDDEN403ForbiddenThe session is a read-only impersonation session — mutations are forbidden
4001VALIDATION_ERROR400Validation errorInvalid field format, or a field other than email / line_id / avatar_url was sent