Write Telemetry Events
Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be ‘custom’ or start with ‘custom.’
Allowed entity token types: title, title_player_account, master_player_account, service, game_server
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| EncryptionKeyBroken | 1291 |
| EventEntityNotAllowed | 1372 |
| EventNamespaceNotAllowed | 1371 |
| InvalidEventContents | 1548 |
| InvalidJSONContent | 1200 |
| PerEntityEventRateLimitExceeded | 1392 |
| ProductDisabledForTitle | 1609 |
| TelemetryKeyDeactivated | 14205 |
| TelemetryKeyInvalid | 14203 |
POST
/
Event
/
WriteTelemetryEvents
Write Telemetry Events
curl --request POST \
--url https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents \
--header 'Content-Type: application/json' \
--header 'X-EntityToken: <api-key>' \
--data '
{
"Events": [
{
"Entity": {
"Id": "A8140AB9109712B",
"Type": "title",
"TypeString": "title"
},
"EventNamespace": "com.playfab.events.example",
"Name": "something_happened",
"Payload": {
"Foo": "Bar",
"Nums": [
1,
2,
3
]
}
}
]
}
'import requests
url = "https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents"
payload = { "Events": [
{
"Entity": {
"Id": "A8140AB9109712B",
"Type": "title",
"TypeString": "title"
},
"EventNamespace": "com.playfab.events.example",
"Name": "something_happened",
"Payload": {
"Foo": "Bar",
"Nums": [1, 2, 3]
}
}
] }
headers = {
"X-EntityToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-EntityToken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Events: [
{
Entity: {Id: 'A8140AB9109712B', Type: 'title', TypeString: 'title'},
EventNamespace: 'com.playfab.events.example',
Name: 'something_happened',
Payload: {Foo: 'Bar', Nums: [1, 2, 3]}
}
]
})
};
fetch('https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents', 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://{titleId}.playfabapi.com/Event/WriteTelemetryEvents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Events' => [
[
'Entity' => [
'Id' => 'A8140AB9109712B',
'Type' => 'title',
'TypeString' => 'title'
],
'EventNamespace' => 'com.playfab.events.example',
'Name' => 'something_happened',
'Payload' => [
'Foo' => 'Bar',
'Nums' => [
1,
2,
3
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-EntityToken: <api-key>"
],
]);
$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://{titleId}.playfabapi.com/Event/WriteTelemetryEvents"
payload := strings.NewReader("{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-EntityToken", "<api-key>")
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.post("https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents")
.header("X-EntityToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-EntityToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"status": "OK",
"data": {
"AssignedEventIds": [
"496b598a05404142a6b6349c8cb29459"
]
}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}Authorizations
This API requires an Entity Session Token, available from the Entity GetEntityToken method.
Body
application/json
Last modified on October 1, 2026
Was this page helpful?
⌘I
Write Telemetry Events
curl --request POST \
--url https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents \
--header 'Content-Type: application/json' \
--header 'X-EntityToken: <api-key>' \
--data '
{
"Events": [
{
"Entity": {
"Id": "A8140AB9109712B",
"Type": "title",
"TypeString": "title"
},
"EventNamespace": "com.playfab.events.example",
"Name": "something_happened",
"Payload": {
"Foo": "Bar",
"Nums": [
1,
2,
3
]
}
}
]
}
'import requests
url = "https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents"
payload = { "Events": [
{
"Entity": {
"Id": "A8140AB9109712B",
"Type": "title",
"TypeString": "title"
},
"EventNamespace": "com.playfab.events.example",
"Name": "something_happened",
"Payload": {
"Foo": "Bar",
"Nums": [1, 2, 3]
}
}
] }
headers = {
"X-EntityToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-EntityToken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Events: [
{
Entity: {Id: 'A8140AB9109712B', Type: 'title', TypeString: 'title'},
EventNamespace: 'com.playfab.events.example',
Name: 'something_happened',
Payload: {Foo: 'Bar', Nums: [1, 2, 3]}
}
]
})
};
fetch('https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents', 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://{titleId}.playfabapi.com/Event/WriteTelemetryEvents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Events' => [
[
'Entity' => [
'Id' => 'A8140AB9109712B',
'Type' => 'title',
'TypeString' => 'title'
],
'EventNamespace' => 'com.playfab.events.example',
'Name' => 'something_happened',
'Payload' => [
'Foo' => 'Bar',
'Nums' => [
1,
2,
3
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-EntityToken: <api-key>"
],
]);
$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://{titleId}.playfabapi.com/Event/WriteTelemetryEvents"
payload := strings.NewReader("{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-EntityToken", "<api-key>")
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.post("https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents")
.header("X-EntityToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Event/WriteTelemetryEvents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-EntityToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Events\": [\n {\n \"Entity\": {\n \"Id\": \"A8140AB9109712B\",\n \"Type\": \"title\",\n \"TypeString\": \"title\"\n },\n \"EventNamespace\": \"com.playfab.events.example\",\n \"Name\": \"something_happened\",\n \"Payload\": {\n \"Foo\": \"Bar\",\n \"Nums\": [\n 1,\n 2,\n 3\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"status": "OK",
"data": {
"AssignedEventIds": [
"496b598a05404142a6b6349c8cb29459"
]
}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}