Users
Update User
This endpoint updates the specified user's information.
PATCH
/users/:id
Bearer*
The user’s phone number is not gathered by Thanx with the permission to use it for marketing.
curl --request PATCH \
--url https://api.thanx.com/users/:id \
--header 'Authorization: Bearer <token>' \
--data '{
"user": {
"email": "<email>",
"first_name": "<first_name>",
"last_name": "<last_name>"
}
}'
Parameters
idrequired
string
The user’s id
Body
emailrequired
string
The user’s email
phone
string
The user’s phone number, formatted: +14157582345
first_namerequired
string
The user’s first name
last_namerequired
string
The user’s last name
birth_date
hash
The user’s birthday information
gender
enum
The user’s gender (male
, female
, other
, unknown
)
zip_code
string
The user’s zip code
Response
id
string
The user’s identifier
email
string
The user’s email
phone
string
The user’s phone number, formatted: +14157582345
first_name
string
The user’s first name
last_name
string
The user’s last name
birth_date
hash
The user’s birthday information
gender
enum
The user’s gender (male, female, other, unknown)
zip_code
string
The user’s zip code
{
"user": {
"id": "wroeiu2304hfwf",
"email": "john.smith@example.com",
"phone": "+14158672345",
"first_name": "Jane",
"last_name": "Smith",
"birth_date": {
"year": 1987,
"month": 8,
"day": 14
},
"gender": "unknown",
"zip_code": "12345"
}
}
curl --request PATCH \
--url https://api.thanx.com/users/:id \
--header 'Authorization: Bearer <token>' \
--data '{
"user": {
"email": "<email>",
"first_name": "<first_name>",
"last_name": "<last_name>"
}
}'
{
"user": {
"id": "wroeiu2304hfwf",
"email": "john.smith@example.com",
"phone": "+14158672345",
"first_name": "Jane",
"last_name": "Smith",
"birth_date": {
"year": 1987,
"month": 8,
"day": 14
},
"gender": "unknown",
"zip_code": "12345"
}
}