Skip to main content
PATCH
/
api
/
v1
/
widget
/
users
/
{user_id}
curl -X PATCH https://api.zbdpay.com/api/v1/widget/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652 \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "new-email@example.com"
  }'
{
  "success": true,
  "message": "Cashout user updated successfully.",
  "data": {
    "id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
    "reference_id": "player-42",
    "email": "new-email@example.com"
  },
  "error": null
}

Description

Updates a widget user’s details. This is a partial update. Only the fields you send are changed, and today email is the only updatable field. Use this when a user changes the email tied to their account. The new email becomes the recipient for OTP verification codes in the widget, so any code requested after the update is sent to the new address.

Configuration

Header Parameters

apikey
string
required
Your ZBD project API key.
Content-Type
string
Content Type

Path Parameters

user_id
string
required
The ZBD user ID returned by Create User.

Body Parameters

email
string
The user’s new email address. Used for OTP verification in the widget.
curl -X PATCH https://api.zbdpay.com/api/v1/widget/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652 \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "new-email@example.com"
  }'
{
  "success": true,
  "message": "Cashout user updated successfully.",
  "data": {
    "id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
    "reference_id": "player-42",
    "email": "new-email@example.com"
  },
  "error": null
}