knownprintDocs

API reference

Visitors API

Read a visitor and its recent events, list the visitors and accounts related to it, and delete it, with every field, response and error.

A visitor is one browser that knownprint recognises across visits, named by a visitor id (v_...). Every event carries the visitor id it was answered with. These routes read a visitor, show what is related to it and delete it.

Method and pathScopeIdempotency-Key
GET /v1/visitors/{visitor_id}events:readNo
GET /v1/visitors/{visitor_id}/relatedevents:readNo
DELETE /v1/visitors/{visitor_id}visitors:deleteYes
GET /v1/visitors/{visitor_id}/export (coming)events:readNo

Every route takes a secret key in Authorization: Bearer and works inside that key's environment; see Authentication. What a visitor is, and how to use visitor ids in your decisions, is on Visitor ids over time.

Visitor ids that merge

A visitor id never changes its spelling and is never reused, but which visitor answers for it can change:

  • Merge. When knownprint learns that two visitor ids are the same browser, the older id survives and the other becomes its alias. Reads of the alias answer the surviving visitor. The visitor.merged webhook announces it.
  • Unmerge. A merge can be undone; the alias becomes its own visitor again (visitor.unmerged).
  • Split. Events of one visitor can move to a new visitor id (visitor.split).
  • Suggestion. knownprint can suggest that two visitors may be the same without changing either id (visitor.suggested).

An event keeps the visitor id it was answered with, unless an unmerge or a split moves it. So store the visitor id you got, and resolve it through GET /v1/visitors/{visitor_id} when you need the current picture, or follow the webhooks. See Webhooks.

GET /v1/visitors/{visitor_id}

Reads the visitor that holds the id now, with its 20 most recent events.

Shell
curl "$KNOWNPRINT_API/v1/visitors/v_c6hgpj3u5l4q7txx4plbw6uvgy" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY"
node
async function getVisitor(visitorId) {
  const res = await fetch(
    `${process.env.KNOWNPRINT_API}/v1/visitors/${encodeURIComponent(visitorId)}`,
    { headers: { Authorization: `Bearer ${process.env.KNOWNPRINT_SECRET_KEY}` } },
  );
  if (res.status === 404) return null;
  if (!res.ok) throw new Error(`knownprint answered ${res.status}`); // 409 included
  return res.json();
}

const visitor = await getVisitor(storedVisitorId);
if (visitor && visitor.visitor_id !== storedVisitorId) {
  // The stored id was merged into another visitor: update your record.
  await saveVisitorId(accountId, visitor.visitor_id);
}

Path parameters

ParameterTypeMeaning
visitor_idv_ and 26 charactersAny id of the visitor, including an alias from a merge

Response

200 with the visitor:

JSON
{
  "visitor_id": "v_c6hgpj3u5l4q7txx4plbw6uvgy",
  "canonical_id": "v_c6hgpj3u5l4q7txx4plbw6uvgy",
  "aliases": ["v_zdio5fo75mfkslrcz2xhl5t6ro", "v_pcdhe7l6ccd3zo3xlea735udds"],
  "first_seen_at": "2026-09-14T18:02:47.530Z",
  "last_seen_at": "2026-11-05T09:30:12.204Z",
  "event_count": 31,
  "linked_ids": ["account-1842"],
  "labels": [],
  "device_cluster_id": null,
  "cluster_confidence": null,
  "recent_events": []
}
FieldTypeMeaning
visitor_idv_ idThe visitor's own id. When you asked for an alias, this is the surviving visitor's id, not the one you sent.
canonical_idv_ idThe same as visitor_id.
aliasesArray of v_ idsEvery id merged into this visitor, oldest merge first. Empty when none.
first_seen_atRFC 3339 timeThe visitor's first visit.
last_seen_atRFC 3339 timeThe visitor's latest visit.
event_countIntegerHow many events the visitor has had.
linked_idsArray of stringsThe distinct linked ids on the visitor's events, at most 100, in code point order.
labelsArray of stringsLabels knownprint sets on the visitor, such as high_activity while it is among your most active visitors of the day. See Activity signals.
device_cluster_idc_ id or nullThe device cluster of the visitor's newest event: a group of visitors that appear to share one device, such as two browsers on one computer. It is a grouping, never an identity of its own. Device clusters are coming: null today (Device clusters).
cluster_confidencelow, medium or nullHow strongly the cluster is supported. medium is the highest. null today.
recent_eventsArray of eventsThe visitor's 20 newest events, newest first, each a full event object.

A visitor with no activity for 400 days expires and is deleted, after which its id answers 404.

Errors

StatusTypeWhen
401unauthorizedNo valid secret key
403forbidden_scopeThe key lacks events:read
404not_foundThe id is malformed, belongs to another environment, never existed, expired or was deleted
409deletion_pendingA deletion of this visitor is in progress
429rate_limitedThe key's bucket is empty

Lists the other visitors and the linked ids related to a visitor, each with the evidence that relates it. It is a moderator's aid: it answers "what else is connected to this browser?" when you review an account, a ban appeal or a payment dispute. It never changes an id or an event, and it is not an identification: two related visitors are not the same visitor.

Shell
curl "$KNOWNPRINT_API/v1/visitors/v_c6hgpj3u5l4q7txx4plbw6uvgy/related" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY"

The visitor id resolves first, as in the read above, so an alias answers for its surviving visitor.

Response

200 with two lists:

JSON
{
  "visitors": [
    {
      "visitor_id": "v_frg25tolohaauude7tlfu6pgfr",
      "evidence": [{ "kind": "linked_id", "detail": "account-1842", "weight": 1 }]
    }
  ],
  "linked_ids": [
    {
      "linked_id": "account-1842",
      "evidence": [{ "kind": "linked_id", "detail": "v_c6hgpj3u5l4q7txx4plbw6uvgy", "weight": 1 }]
    }
  ]
}
FieldTypeMeaning
visitorsArray, at most 50Other visitors related to this one, strongest first
visitors[].visitor_idv_ idThe related visitor
visitors[].evidenceArray, at most 50What relates it
linked_idsArray, at most 50The linked ids this visitor carries; each item's evidence names this visitor
linked_ids[].linked_idStringThe related linked id
linked_ids[].evidenceArray, at most 50What relates it

Each evidence item has three members:

MemberTypeMeaning
kindStringWhat kind of connection it is. linked_id: a shared account of yours (on a linked id entry, the visitor that carries it). cluster: a shared device cluster. The other kinds (shared_network, ip_day, exact) are network or similarity evidence for a reviewer.
detailStringA short human-readable description for a moderator, such as the shared linked id or the cluster id and its confidence.
weightNumberOrders the entries, strongest first, then by id. For knownprint's own use; do not build rules on it.

Show kind and detail to a reviewer as they are; do not parse detail, whose wording may change, and do not act automatically on a relation alone. Accounts and linked ids explains how to use related accounts in a review.

Errors

StatusTypeWhen
401unauthorizedNo valid secret key
403forbidden_scopeThe key lacks events:read
404not_foundThe id is malformed or names no visitor of this environment
409deletion_pendingA deletion of this visitor is in progress
429rate_limitedThe key's bucket is empty

DELETE /v1/visitors/{visitor_id}

Deletes a visitor and everything stored about it. Use it to honour a person's erasure request, or when you close an account and want its browser data gone.

Shell
curl -X DELETE "$KNOWNPRINT_API/v1/visitors/v_c6hgpj3u5l4q7txx4plbw6uvgy" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  -H "Idempotency-Key: erase-request-20981"

Response

202 with the deletion job:

JSON
{
  "job_id": "del_7xq4bqv2m3rd5kz6h2l4wz7nya",
  "status": "queued"
}
FieldTypeMeaning
job_iddel_ idThe deletion job. Keep it as your record of the request.
statusqueued or runningThe job's state when you asked.

The answer is the same whether or not the visitor exists, so it never confirms that a person visited your site. Asking again while the job is open returns the same job.

What happens

  1. The job is accepted at once. From that moment, reads of the visitor answer 409 deletion_pending, and searches leave its events out.
  2. A background worker deletes the visitor, every visitor merged into it, their events and the browser data stored for them, their feedback, their ties to linked ids and the webhook deliveries that name them. A failed attempt is retried.
  3. When the purge commits, the visitor.deleted webhook fires with the visitor_id and the job_id. When you named an id that had merged into another visitor, visitor_id is the surviving visitor's id.
  4. Afterwards the visitor's ids answer 404. knownprint keeps only one-way hashes of the deleted ids, for 30 days, so that the deleted visitor does not come back.

Deleting any id of a merged visitor deletes the surviving visitor together with every id merged into it.

To delete by your own account id instead of a visitor id, use DELETE /v1/linked/{linked_id}. Privacy for integrators covers deletion, retention and data subject requests in full.

Rate limit

Deletions are limited to 2 a second per key, burst 2, on top of the key's general bucket. A batch of erasures should be paced at that rate; a 429 carries Retry-After.

Errors

StatusTypeWhen
401unauthorizedNo valid secret key
403forbidden_scopeThe key lacks visitors:delete
409idempotency_conflictThe Idempotency-Key was used for another request, or is still in flight
422validation_failedinvalid_subject (the id is not v_ and 26 characters) or idempotency_key
429rate_limitedThe key's bucket or the deletion bucket is empty

GET /v1/visitors/{visitor_id}/export

Shell
curl -G "$KNOWNPRINT_API/v1/events" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  --data-urlencode "visitor_id=v_c6hgpj3u5l4q7txx4plbw6uvgy" \
  --data-urlencode "limit=500"