PATCH
/
users
/
{userId}
curl --request PATCH \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"email": "j.wunderliebb@mycompany.tld",
"bio": "An updated information about me: I'\''ve transferred to London!",
"occupation": "Associate",
"location": "London",
"timezone": "Europe/London"
}'
{
    "status": 400,
    "message": "Validation failed",
    "errors": {
    "email": ["Invalid email format"]
}
}
Update an existing user’s information.

Request Headers

X-API-KEY
string
required
API Key. Go to your Konstantly site > Settings > API and copy the value from there.

URL Parameters

userId
string
required
User API ID

Request Body

email
string
required
User’s email address (must be unique)
name
string
Full name of the user (only if changing)
password
string
User password (only if changing)
roleAlias
string
Role alias or identifier (only if changing)
bio
string
Optional bio description
occupation
string
Optional job title (only if changing)
location
string
Optional location (only if changing)
timezone
string
Timezone in TZ format (only if changing)
fromApi
boolean
API management flag (only if changing)
attributes
object
Complete set of custom user attributes (overwrites current values)

Response

On success, returns HTTP 200 status code.

Error Responses

400
object
Validation error response
404
object
Not Found error response
curl --request PATCH \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"email": "j.wunderliebb@mycompany.tld",
"bio": "An updated information about me: I'\''ve transferred to London!",
"occupation": "Associate",
"location": "London",
"timezone": "Europe/London"
}'
{
    "status": 400,
    "message": "Validation failed",
    "errors": {
    "email": ["Invalid email format"]
}
}