curl --request PATCH \
--url https://api.engagefabric.com/players/{id} \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "Jane Doe",
"avatarUrl": "https://example.com/avatars/janedoe.png",
"locale": "fr-FR",
"metadata": {
"accountType": "premium",
"tier": "gold"
}
}
'import requests
url = "https://api.engagefabric.com/players/{id}"
payload = {
"displayName": "Jane Doe",
"avatarUrl": "https://example.com/avatars/janedoe.png",
"locale": "fr-FR",
"metadata": {
"accountType": "premium",
"tier": "gold"
}
}
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({
displayName: 'Jane Doe',
avatarUrl: 'https://example.com/avatars/janedoe.png',
locale: 'fr-FR',
metadata: {accountType: 'premium', tier: 'gold'}
})
};
fetch('https://api.engagefabric.com/players/{id}', 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.engagefabric.com/players/{id}",
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([
'displayName' => 'Jane Doe',
'avatarUrl' => 'https://example.com/avatars/janedoe.png',
'locale' => 'fr-FR',
'metadata' => [
'accountType' => 'premium',
'tier' => 'gold'
]
]),
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.engagefabric.com/players/{id}"
payload := strings.NewReader("{\n \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\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.engagefabric.com/players/{id}")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engagefabric.com/players/{id}")
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 \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"externalUserId": "user_12345",
"xp": 1250,
"level": 5,
"lives": 3,
"maxLives": 5,
"livesUpdatedAt": "2025-01-15T10:30:00Z",
"currencies": {
"coins": 500,
"gems": 50
},
"status": "ACTIVE",
"isFlagged": false,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"lastSeenAt": "2025-01-15T10:30:00Z",
"displayName": "John Doe",
"avatarUrl": "https://example.com/avatars/johndoe.png",
"locale": "en-US",
"flagReason": null,
"metadata": {
"accountType": "premium"
},
"deletedAt": null
}Update player profile
curl --request PATCH \
--url https://api.engagefabric.com/players/{id} \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "Jane Doe",
"avatarUrl": "https://example.com/avatars/janedoe.png",
"locale": "fr-FR",
"metadata": {
"accountType": "premium",
"tier": "gold"
}
}
'import requests
url = "https://api.engagefabric.com/players/{id}"
payload = {
"displayName": "Jane Doe",
"avatarUrl": "https://example.com/avatars/janedoe.png",
"locale": "fr-FR",
"metadata": {
"accountType": "premium",
"tier": "gold"
}
}
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({
displayName: 'Jane Doe',
avatarUrl: 'https://example.com/avatars/janedoe.png',
locale: 'fr-FR',
metadata: {accountType: 'premium', tier: 'gold'}
})
};
fetch('https://api.engagefabric.com/players/{id}', 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.engagefabric.com/players/{id}",
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([
'displayName' => 'Jane Doe',
'avatarUrl' => 'https://example.com/avatars/janedoe.png',
'locale' => 'fr-FR',
'metadata' => [
'accountType' => 'premium',
'tier' => 'gold'
]
]),
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.engagefabric.com/players/{id}"
payload := strings.NewReader("{\n \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\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.engagefabric.com/players/{id}")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engagefabric.com/players/{id}")
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 \"displayName\": \"Jane Doe\",\n \"avatarUrl\": \"https://example.com/avatars/janedoe.png\",\n \"locale\": \"fr-FR\",\n \"metadata\": {\n \"accountType\": \"premium\",\n \"tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"externalUserId": "user_12345",
"xp": 1250,
"level": 5,
"lives": 3,
"maxLives": 5,
"livesUpdatedAt": "2025-01-15T10:30:00Z",
"currencies": {
"coins": 500,
"gems": 50
},
"status": "ACTIVE",
"isFlagged": false,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"lastSeenAt": "2025-01-15T10:30:00Z",
"displayName": "John Doe",
"avatarUrl": "https://example.com/avatars/johndoe.png",
"locale": "en-US",
"flagReason": null,
"metadata": {
"accountType": "premium"
},
"deletedAt": null
}Path Parameters
Player UUID
Body
Player display name
255"Jane Doe"
Player avatar URL
500"https://example.com/avatars/janedoe.png"
Player locale (e.g., en-US, fr-FR)
10"fr-FR"
Player status
ACTIVE, SUSPENDED, BANNED Additional player metadata
{ "accountType": "premium", "tier": "gold" }
Response
Player updated successfully
Unique player identifier
"123e4567-e89b-12d3-a456-426614174000"
Project ID this player belongs to
"123e4567-e89b-12d3-a456-426614174000"
External user ID from client application
"user_12345"
Player XP
1250
Player level
5
Current lives/energy
3
Maximum lives
5
Last time lives were updated
"2025-01-15T10:30:00Z"
Player currencies (key-value pairs)
{ "coins": 500, "gems": 50 }
Player status
ACTIVE, SUSPENDED, BANNED "ACTIVE"
Whether player is flagged for review
false
Creation timestamp
"2025-01-15T10:30:00Z"
Last update timestamp
"2025-01-15T10:30:00Z"
Last activity timestamp
"2025-01-15T10:30:00Z"
Player display name
"John Doe"
Player avatar URL
"https://example.com/avatars/johndoe.png"
Player locale
"en-US"
Reason for flagging
null
Additional player metadata
{ "accountType": "premium" }
Soft deletion timestamp
null
