Skip to main content
POST
/
api
/
people
/
{person_id}
/
merge
Merge people
curl --request POST \
  --url https://api.example.com/api/people/{person_id}/merge \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_person_ids": [
    "<string>"
  ]
}
'
import requests

url = "https://api.example.com/api/people/{person_id}/merge"

payload = { "source_person_ids": ["<string>"] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({source_person_ids: ['<string>']})
};

fetch('https://api.example.com/api/people/{person_id}/merge', 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.example.com/api/people/{person_id}/merge",
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([
'source_person_ids' => [
'<string>'
]
]),
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.example.com/api/people/{person_id}/merge"

payload := strings.NewReader("{\n \"source_person_ids\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/people/{person_id}/merge")
.header("Content-Type", "application/json")
.body("{\n \"source_person_ids\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/people/{person_id}/merge")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_person_ids\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "is_hidden": true,
  "is_favorite": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "birth_date": "2023-12-25",
  "asset_count": 123,
  "thumbnail_face_id": "<string>",
  "asset_urls": {},
  "cluster_metrics": {
    "pairwise_p90": 123,
    "pairwise_mean": 123,
    "face_count": 123
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Path Parameters

person_id
string
required

Body

application/json
source_person_ids
string[]
required

IDs of the people to merge into the primary person. These people will be deleted after their faces are moved.

Required array length: 1 - 50 elements

Response

Successful Response

Represents a person identified through face clustering and recognition.

id
string
required

Unique person identifier with 'person_' prefix

is_hidden
boolean
required

Whether this person should be hidden from the UI

is_favorite
boolean
required

Whether this person is marked as a favorite

created_at
string<date-time>
required

When this person record was created

updated_at
string<date-time>
required

When this person record was last updated

name
string | null

Optional name assigned to this person

birth_date
string<date> | null

Optional birth date of this person

asset_count
integer | null

Number of unique photos this person appears in, or null if not computed

thumbnail_face_id
string | null

ID of the face resource used as this person's thumbnail

asset_urls
Asset Urls · object | null

Asset variants from this person's thumbnail face. May be null when embedded in an AssetResponse; use /api/people endpoints for full person data.

cluster_metrics
ClusterMetricsResponse · object | null

Cohesion metrics for this person's face cluster. Populated only when include=cluster_metrics is requested on the people endpoint, and only for persons with a populated centroid (newly-created empty Persons will have null). See ClusterMetricsResponse for the shape.