curl --request PATCH \
--url https://api.fpjs.io/v4/events/{event_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"linked_id": "somelinkedId",
"tags": {},
"suspect": true
}
'import requests
url = "https://api.fpjs.io/v4/events/{event_id}"
payload = {
"linked_id": "somelinkedId",
"tags": {},
"suspect": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({linked_id: 'somelinkedId', tags: {}, suspect: true})
};
fetch('https://api.fpjs.io/v4/events/{event_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.fpjs.io/v4/events/{event_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([
'linked_id' => 'somelinkedId',
'tags' => [
],
'suspect' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fpjs.io/v4/events/{event_id}"
payload := strings.NewReader("{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fpjs.io/v4/events/{event_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fpjs.io/v4/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}"
response = http.request(request)
puts response.read_bodyUpdate an event
Change information in existing events specified by event_id or flag suspicious events.
When an event is created, it can be assigned linked_id and tags submitted through the JS agent parameters.
This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact.
Warning You can only update events created within the last 10 days. Updating an older event returns HTTP 400 with the message event is too old to be updated (> 10 days), even if your plan retains events for longer.
Warning Events created by the Automation Intelligence API (POST /edge) cannot be updated. Updating them returns HTTP 400.
Warning Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request.
curl --request PATCH \
--url https://api.fpjs.io/v4/events/{event_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"linked_id": "somelinkedId",
"tags": {},
"suspect": true
}
'import requests
url = "https://api.fpjs.io/v4/events/{event_id}"
payload = {
"linked_id": "somelinkedId",
"tags": {},
"suspect": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({linked_id: 'somelinkedId', tags: {}, suspect: true})
};
fetch('https://api.fpjs.io/v4/events/{event_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.fpjs.io/v4/events/{event_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([
'linked_id' => 'somelinkedId',
'tags' => [
],
'suspect' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fpjs.io/v4/events/{event_id}"
payload := strings.NewReader("{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fpjs.io/v4/events/{event_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fpjs.io/v4/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linked_id\": \"somelinkedId\",\n \"tags\": {},\n \"suspect\": true\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
The unique event identifier.
"1708102555327.NLOjmg"
Body
Response
OK.
Was this page helpful?