PUT
/
api
/
v1
/
users
/
{user_id}
/
curl --request PUT \
  --url https://hpay-api.host-sl.com/api/v1/users/user_abc123/ \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "app_user_id": 1,
    "name": "John Updated Doe",
    "email": "john.new@example.com",
    "phone_number": "+23279123456"
  }'
{
  "id": "user_abc123",
  "app_user_id": 1,
  "name": "John Updated Doe",
  "email": "john.new@example.com",
  "phone_number": "+23279123456",
  "is_active": true,
  "updated_at": "2025-01-18T14:20:00Z"
}

Endpoint

PUT /api/v1/users/{user_id}/

Path Parameters

user_id
string
required
The unique identifier of the user to update

Headers

api-key
string
required
Your application API key
secret-key
string
required
Your application secret key

Body Parameters

app_user_id
integer
required
The current user ID from your application. Note: This field is required but cannot be changed during update.
name
string
required
Updated full name of the user
email
string
Updated email address
username
string
Updated username
phone_number
string
required
Updated phone number
is_active
boolean
Update whether the user account is active

Response

id
string
Unique identifier for the user
app_user_id
integer
The user ID from your application
name
string
User’s updated full name
email
string
User’s updated email address
phone_number
string
User’s updated phone number
is_active
boolean
Whether the user account is active
updated_at
string
ISO 8601 timestamp of update
curl --request PUT \
  --url https://hpay-api.host-sl.com/api/v1/users/user_abc123/ \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "app_user_id": 1,
    "name": "John Updated Doe",
    "email": "john.new@example.com",
    "phone_number": "+23279123456"
  }'
{
  "id": "user_abc123",
  "app_user_id": 1,
  "name": "John Updated Doe",
  "email": "john.new@example.com",
  "phone_number": "+23279123456",
  "is_active": true,
  "updated_at": "2025-01-18T14:20:00Z"
}
You must include the app_user_id in the request body, and it must match the id assigned when the user was created. Changing this id will result in a 400 Bad Request error.