Skip to main content
PATCH
/
:projectId
/
users
/
:userId
Update User
curl --request PATCH \
  --url https://api.replyke.com/api/v6/:projectId/users/:userId \
  --header 'Content-Type: application/json' \
  --data '{
  "update.name": "<string>",
  "update.username": "<string>",
  "update.avatar": "<string>",
  "update.bio": "<string>",
  "update.birthdate": "<string>",
  "update.location": {},
  "update.metadata": {},
  "update.secureMetadata": {}
}'
{
  "id": "<string>",
  "username": "<string>",
  "name": "<string>",
  "avatar": "<string>",
  "bio": "<string>",
  "birthdate": "<string>",
  "location": {
    "type": "<string>",
    "coordinates": [
      123
    ]
  },
  "metadata": {},
  "suspensions": [
    {}
  ]
}
Update details of an existing user. Only fields provided in the request will be modified. Triggers webhook validation before updating.

Path Parameters

userId
string
required
The unique ID of the user to update

Body Parameters

The body must contain an update object with one or more of the following fields
update.name
string
Updated full name
update.username
string
Updated username (will be sanitized and lowercased)
update.avatar
string
URL to the user’s new avatar image
update.bio
string
Updated user biography
update.birthdate
string
User’s birthdate in ISO 8601 format
update.location
object
Object with longitude and latitude properties
update.metadata
object
Custom public metadata
update.secureMetadata
object
Custom secure metadata (used server-side but never returned in responses)

Response

id
string
User’s unique identifier
username
string
Updated username
name
string
User’s full name
avatar
string
URL to user’s avatar image
bio
string
User’s biography
birthdate
string
User’s birthdate in ISO 8601 format
location
object
metadata
object
Custom public metadata
suspensions
array
Array of active suspensions (if any)

Error Responses

{
  "error": "Missing required data",
  "code": "user/missing-data"
}
{
  "error": "User not found",
  "code": "user/not-found"
}
{
  "error": "Internal server error",
  "code": "user/server-error",
  "details": "<Error message>"
}

Notes

  • Requires authentication.
  • validateUserUpdated webhook is called before update.
  • secureMetadata is accepted but never returned.
  • suspensions are included in the response if active.
  • Location must be an object with longitude and latitude.