# Search by a stored selfie point id

> Search using a previously-registered selfie's pointId (Rekognition SearchFaces by FaceId). (POST /v1/collections/{id}/search-by-id)

Source: https://sightradar.com/docs/api/faces/search-by-a-stored-selfie-point-id

Search using a previously-registered selfie's `pointId` (Rekognition
`SearchFaces` by FaceId).

### Example request

```bash
curl -X POST "https://api.sightradar.com/v1/collections/$ID/search-by-id" \
  -H "Authorization: Bearer $SR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pointId":"<pointId>"}'
```

### Parameters

| Name              | In     | Type     | Description                                                                                                                                                                                                                    |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` **required** | path   | `string` |                                                                                                                                                                                                                                |
| `Idempotency-Key` | header | `string` | Opt-in idempotency. A replay under the same key is never re-charged. For a selfie register it returns 200 with the stored result (Idempotent-Replay: true) when the registration identity matches; every other op returns 409. |

### Request body (application/json)

| Field                  | Type      | Description                       |
| ---------------------- | --------- | --------------------------------- |
| `pointId` **required** | `string`  | A point\_id returned by /selfies. |
| `threshold`            | `number`  | Min cosine similarity (0-1).      |
| `limit`                | `integer` | Max matches to return.            |

### Response body

| Field           | Type       | Description                                                                   |
| --------------- | ---------- | ----------------------------------------------------------------------------- |
| `collection_id` | `string`   |                                                                               |
| `matches`       | `object[]` |                                                                               |
| `photo_ids`     | `string[]` |                                                                               |
| `reason`        | `string`   | Present when no match: no\_face \| low\_quality\_selfie \| point\_not\_found. |
| `model_version` | `string`   |                                                                               |

### Status codes

| Status | Meaning                                                   |
| ------ | --------------------------------------------------------- |
| `200`  | Search result.                                            |
| `400`  | pointId missing.                                          |
| `401`  | Missing or invalid API key.                               |
| `402`  | Wallet balance too low for this operation.                |
| `429`  | Per-key RPS or per-customer concurrency limit exceeded.   |
| `502`  | Engine error (the credit hold is refunded automatically). |
