Skip to main content
PATCH
/
events
/
{event_id}
Update an event
curl --request PATCH \
  --url https://api.fpjs.io/v4/events/{event_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "linked_id": "<string>",
  "tags": {},
  "suspect": true
}
'
import requests

url = "https://api.fpjs.io/v4/events/{event_id}"

payload = {
    "linked_id": "<string>",
    "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: '<string>', 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' => '<string>',
    '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\": \"<string>\",\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\": \"<string>\",\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\": \"<string>\",\n  \"tags\": {},\n  \"suspect\": true\n}"

response = http.request(request)
puts response.read_body

Authorizations

Authorization
string
header
required

Add your Secret API Key to the Authorization header using the standard Bearer format: Authorization: Bearer <secret_api_key>

Path Parameters

event_id
string
required

The unique event identifier.

Example:

"1708102555327.NLOjmg"

Body

application/json
linked_id
string

Linked ID value to assign to the existing event

Example:

"somelinkedId"

tags
object

A customer-provided value or an object that was sent with the identification request or updated later.

suspect
boolean

Suspect flag indicating observed suspicious or fraudulent event

Response

OK.