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": {}
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/users/:userId"
payload = {
"update.name": "<string>",
"update.username": "<string>",
"update.avatar": "<string>",
"update.bio": "<string>",
"update.birthdate": "<string>",
"update.location": {},
"update.metadata": {},
"update.secureMetadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'update.name': '<string>',
'update.username': '<string>',
'update.avatar': '<string>',
'update.bio': '<string>',
'update.birthdate': '<string>',
'update.location': {},
'update.metadata': {},
'update.secureMetadata': {}
})
};
fetch('https://api.replyke.com/api/v6/:projectId/users/:userId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/users/:userId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'update.name' => '<string>',
'update.username' => '<string>',
'update.avatar' => '<string>',
'update.bio' => '<string>',
'update.birthdate' => '<string>',
'update.location' => [
],
'update.metadata' => [
],
'update.secureMetadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/users/:userId"
payload := strings.NewReader("{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.replyke.com/api/v6/:projectId/users/:userId")
.header("Content-Type", "application/json")
.body("{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/users/:userId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"name": "<string>",
"avatar": "<string>",
"bio": "<string>",
"birthdate": "<string>",
"location": {
"type": "<string>",
"coordinates": [
123
]
},
"metadata": {},
"suspensions": [
{}
]
}User Endpoints
Update User
Update details of an existing user
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": {}
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/users/:userId"
payload = {
"update.name": "<string>",
"update.username": "<string>",
"update.avatar": "<string>",
"update.bio": "<string>",
"update.birthdate": "<string>",
"update.location": {},
"update.metadata": {},
"update.secureMetadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'update.name': '<string>',
'update.username': '<string>',
'update.avatar': '<string>',
'update.bio': '<string>',
'update.birthdate': '<string>',
'update.location': {},
'update.metadata': {},
'update.secureMetadata': {}
})
};
fetch('https://api.replyke.com/api/v6/:projectId/users/:userId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/users/:userId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'update.name' => '<string>',
'update.username' => '<string>',
'update.avatar' => '<string>',
'update.bio' => '<string>',
'update.birthdate' => '<string>',
'update.location' => [
],
'update.metadata' => [
],
'update.secureMetadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/users/:userId"
payload := strings.NewReader("{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.replyke.com/api/v6/:projectId/users/:userId")
.header("Content-Type", "application/json")
.body("{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/users/:userId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"update.name\": \"<string>\",\n \"update.username\": \"<string>\",\n \"update.avatar\": \"<string>\",\n \"update.bio\": \"<string>\",\n \"update.birthdate\": \"<string>\",\n \"update.location\": {},\n \"update.metadata\": {},\n \"update.secureMetadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"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
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 fieldsstring
Updated full name
string
Updated username (will be sanitized and lowercased)
string
URL to the user’s new avatar image
string
Updated user biography
string
User’s birthdate in ISO 8601 format
object
Object with
longitude and latitude propertiesobject
Custom public metadata
object
Custom secure metadata (used server-side but never returned in responses)
Response
string
User’s unique identifier
string
Updated username
string
User’s full name
string
URL to user’s avatar image
string
User’s biography
string
User’s birthdate in ISO 8601 format
object
Custom public metadata
array
Array of active suspensions (if any)
Error Responses
Missing or Invalid Data - 400 Bad Request
Missing or Invalid Data - 400 Bad Request
{
"error": "Missing required data",
"code": "user/missing-data"
}
User Not Found - 404 Not Found
User Not Found - 404 Not Found
{
"error": "User not found",
"code": "user/not-found"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error",
"code": "user/server-error",
"details": "<Error message>"
}
Notes
- Requires authentication.
validateUserUpdatedwebhook is called before update.secureMetadatais accepted but never returned.suspensionsare included in the response if active.- Location must be an object with
longitudeandlatitude.
⌘I

