curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/users/9a8b7c6d-.../ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{ "name": "New Name" }'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
user = client.users.patch("9a8b7c6d-...", name="New Name")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.patch("9a8b7c6d-...", { name: "New Name" });
console.log(user.name);
{
"id": "9a8b7c6d-...",
"app_user_id": "user_123",
"name": "New Name",
"email": "alice@example.com",
"username": "alice",
"phone_number": "+23279000000",
"is_active": true,
"created_at": "2026-01-16T10:30:00Z",
"stripe_connect_account_id": null,
"stripe_connect_verified": false
}
{
"detail": "No fields to update"
}
{
"detail": "User not found"
}
Users
Partially Update User
Update only the fields you send — everything else is left unchanged.
PATCH
/
api
/
v1
/
users
/
{user_id}
/
curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/users/9a8b7c6d-.../ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{ "name": "New Name" }'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
user = client.users.patch("9a8b7c6d-...", name="New Name")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.patch("9a8b7c6d-...", { name: "New Name" });
console.log(user.name);
{
"id": "9a8b7c6d-...",
"app_user_id": "user_123",
"name": "New Name",
"email": "alice@example.com",
"username": "alice",
"phone_number": "+23279000000",
"is_active": true,
"created_at": "2026-01-16T10:30:00Z",
"stripe_connect_account_id": null,
"stripe_connect_verified": false
}
{
"detail": "No fields to update"
}
{
"detail": "User not found"
}
Unlike update user (a full PUT that requires the complete body), this changes only the fields present in the request.
app_user_id is immutable and not accepted.
Path Parameters
string
required
The user to update.
Request Body
string
The user’s display name.
string
The user’s email address.
string
The user’s username.
string
The user’s phone number.
boolean
Activate or deactivate the user.
Response
The full updated user, same shape as get user.{
"id": "9a8b7c6d-...",
"app_user_id": "user_123",
"name": "New Name",
"email": "alice@example.com",
"username": "alice",
"phone_number": "+23279000000",
"is_active": true,
"created_at": "2026-01-16T10:30:00Z",
"stripe_connect_account_id": null,
"stripe_connect_verified": false
}
{
"detail": "No fields to update"
}
{
"detail": "User not found"
}
curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/users/9a8b7c6d-.../ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{ "name": "New Name" }'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
user = client.users.patch("9a8b7c6d-...", name="New Name")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.patch("9a8b7c6d-...", { name: "New Name" });
console.log(user.name);