---

title: Feedback and labelled pairs
description: Tell knownprint what your team learned about an event or a pair of events, what each route accepts, and what it changes.
---

Your team learns things knownprint cannot see: a chargeback arrives weeks after a payment, a
moderator confirms that two accounts belong to one person, a blocked customer turns out to be
genuine. Two routes record what you learned:

| Route                                   | Records                               | Typical source                                                           |
| --------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------ |
| `POST /v1/events/{request_id}/feedback` | One event was fraud, or legitimate.   | Chargebacks, confirmed fraud, false positives your support team cleared. |
| `POST /v1/labelled-pairs`               | Two events came from the same person. | Moderators who ban an account and find its owner behind another one.     |

Both need a secret key with the `events:write` scope, and both accept an `Idempotency-Key`
header so that a retry never records twice.

## Label an event

Send `fraud` or `legit` for the event, with an optional note:

:::tabs
```bash title="curl"
curl -X POST "$KNOWNPRINT_API/v1/events/evt_67jvpf6sfvpkaktujsorf3rxha/feedback" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: chargeback-cb_88213" \
  -d '{"label": "fraud", "note": "chargeback filed"}'
```

```js title="Node"
const res = await fetch(
  `${process.env.KNOWNPRINT_API}/v1/events/${order.knownprintRequestId}/feedback`,
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.KNOWNPRINT_SECRET_KEY}`,
      'Content-Type': 'application/json',
      'Idempotency-Key': `chargeback-${chargeback.id}`,
    },
    body: JSON.stringify({ label: 'fraud', note: 'chargeback filed' }),
  },
);
if (res.status !== 201) throw new Error(`knownprint answered ${res.status}`);
```
:::

The body:

| Member  | Type   | Rules                                                            |
| ------- | ------ | ---------------------------------------------------------------- |
| `label` | string | Required. `fraud` or `legit`.                                    |
| `note`  | string | Optional. Free text for your own team, at most 1,000 characters. |

The body takes no other member. Do not put personal data in the note: write what happened
("chargeback filed", "cleared by support"), not who it happened to.

The answer is `201 Created` with the stored feedback:

```json title="201 Created"
{
  "id": 1842,
  "event_id": "evt_67jvpf6sfvpkaktujsorf3rxha",
  "label": "fraud",
  "note": "chargeback filed",
  "created_at": "2026-11-04T08:12:00.000Z"
}
```

| Field        | Type             | Meaning                                          |
| ------------ | ---------------- | ------------------------------------------------ |
| `id`         | integer          | The feedback's id.                               |
| `event_id`   | string           | The event you labelled.                          |
| `label`      | string           | `fraud` or `legit`.                              |
| `note`       | string, nullable | Your note, null when you sent none.              |
| `created_at` | string           | When the feedback was recorded, RFC 3339 in UTC. |

Each call records a new feedback row, so an event can carry several labels over time, for example
`fraud` after a chargeback and `legit` after the chargeback was reversed. A repeat with the same
`Idempotency-Key` and body within 24 hours answers the first response again (with the header
`Idempotency-Replayed: true`) and records nothing new.

| Status                       | When                                                                                                       |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `201`                        | Recorded.                                                                                                  |
| `404` `not_found`            | The request id is malformed, belongs to another environment, or the event has passed its retention period. |
| `409` `deletion_pending`     | The event's visitor is being deleted.                                                                      |
| `409` `idempotency_conflict` | The `Idempotency-Key` was used for a different body, or the first request with it is still running.        |
| `422` `validation_failed`    | The body is not as described above, or the note is too long.                                               |

### When to send event feedback

- **Confirmed fraud.** A chargeback, a stolen card reported, an account proven to be fake. Label
  the event your decision was based on, usually the one at payment or signup.
- **False positives.** A customer your rules blocked or challenged and your team then cleared.
  Label that event `legit`.
- **Confirmed good outcomes**, where you have them, such as an order that settled and was never
  disputed. These are optional; the two cases above matter most.

To label the right event, store the request id with the order, the payment or the account when
you make the decision. The feedback route takes a request id, not a visitor id or a linked id.

## Record a pair

When a moderator finds that two accounts belong to one person, for example when a banned user
comes back under a new account, record a pair of one event from each:

```bash title="Record a labelled pair"
curl -X POST "$KNOWNPRINT_API/v1/labelled-pairs" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ban-case-4471" \
  -d '{
    "request_id_a": "evt_owg7rw2zrdx7tjpqlikbpsuhfz",
    "request_id_b": "evt_udrovzh6kvpxnvjfj62hp3nape",
    "label": "same",
    "evidence": "moderator_confirmed"
  }'
```

The body:

| Member         | Type   | Rules                                                                                                        |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| `request_id_a` | string | Required. A request id of the first account, `evt_...`.                                                      |
| `request_id_b` | string | Required. A request id of the second account. It must differ from `request_id_a`.                            |
| `label`        | string | Required. `same`, the only label this route takes.                                                           |
| `evidence`     | string | Required. `moderator_confirmed` when your team is sure, `moderator_suspected` when it is a strong suspicion. |

The answer is the stored pair:

```json title="201 Created"
{
  "id": "lp_3v63tlwewy54ajx5dldcq4xizj",
  "observation_a": "obs_fhdwmeh6wvpezf7vhy3gdoqrfd",
  "observation_b": "obs_trra4p5rudwvioi3z7vuraumol",
  "label": "same",
  "evidence": "moderator_confirmed",
  "gap_days": 41.25,
  "features": null,
  "created_by": "key_iqajrwm2ly5bd5oq2glt3iudnp",
  "created_at": "2026-11-03T14:05:12Z"
}
```

| Field                            | Type             | Meaning                                                                                                                                                                                                   |
| -------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                             | string           | The pair's id, `lp_` and 26 characters.                                                                                                                                                                   |
| `observation_a`, `observation_b` | string           | Internal ids (`obs_...`) of the data behind `request_id_a` and `request_id_b`.                                                                                                                            |
| `label`                          | string           | `same`.                                                                                                                                                                                                   |
| `evidence`                       | string           | The evidence you sent.                                                                                                                                                                                    |
| `gap_days`                       | number, nullable | Days between the two events, to three decimals.                                                                                                                                                           |
| `features`                       | object, nullable | A comparison knownprint keeps with the pair for its own use. Its contents are internal and change between versions. It is null when the raw data of either event had already passed its retention period. |
| `created_by`                     | string, nullable | The id of the secret key that recorded the pair (`key_...`). knownprint never records a moderator's name.                                                                                                 |
| `created_at`                     | string           | When the pair was recorded.                                                                                                                                                                               |

A pair has no direction: recording the same two events again, in either order, answers `200 OK`
with the stored pair and replaces its evidence with the one you sent. A new pair answers `201`.

| Status                       | When                                                                                                  |
| ---------------------------- | ----------------------------------------------------------------------------------------------------- |
| `201`                        | A new pair was recorded.                                                                              |
| `200`                        | The pair existed; its evidence was replaced.                                                          |
| `404` `not_found`            | Either request id names no event of your environment, including an event past its retention period.   |
| `409` `deletion_pending`     | The visitor of either event is being deleted.                                                         |
| `409` `idempotency_conflict` | The `Idempotency-Key` was used for a different body, or the first request with it is still running.   |
| `422` `validation_failed`    | The body is not as described above, or the two request ids are equal or name the same identification. |

### When to send a pair

- A moderator bans an account and finds its owner returned under another account.
- Your investigation shows two accounts are run by the same person, even if they were created from
  different browsers.

Record the pair soon after the second account appears. Its `features` are kept only while the raw
data of both events is still held, which is 30 days by default; a pair recorded later is still
stored, with `features` null.

A pair is about people, not browsers: record it even when the two events came from different
devices. If the two accounts are different people, record nothing.

## What feedback changes, and what it does not

Neither route changes anything you have already received:

- The event keeps its visitor id, `match_type`, `confidence`, signals and suspect score.
- No visitor is merged, unmerged or split because of feedback or a pair. Visitor ids change only
  in the announced ways described in [Visitor ids over time](/visitors#how-a-visitor-id-can-change).
- No webhook is sent.

What they do:

- Labelled pairs tell knownprint how well it recognises returning people on your traffic.
- When knownprint reviews past visitors with a newer version (see
  [Re-reviews of past visitors](/visitors#re-reviews-of-past-visitors)), your pairs and your event
  feedback are part of what knownprint looks at before it applies the review. For example, it
  takes note of a proposed merge of a visitor you labelled `fraud` with one you labelled `legit`.
  No automatic decision reads them.
- Your note stays with the feedback for your own team's reference.

There is no route to read feedback or pairs back. Keep your own record of what you sent if your
team needs to report on it.

To change how your own systems act on a visitor, use your own rules: a ban list keyed on visitor
ids, the [suspect score](/signals/suspect-score), and the [related accounts](/accounts) reads.

## How long feedback is kept

| Record              | Kept for                                                                                                                                            |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Event feedback      | Your event retention period (90 days unless agreed otherwise), counted from when the feedback was recorded. It is deleted with the event's visitor. |
| A labelled pair     | 400 days. A pair holds no visitor id, linked id, IP address or raw reading, so it is kept when either visitor is deleted.                           |
| A pair's `features` | Recorded only while the raw data of both events is held, 30 days by default.                                                                        |

See [How long events are kept](/events#how-long-events-are-kept) and [Privacy](/privacy).
