Skip to Content
KnowYourChain Docs

Quickstart

Pull your first attribution records.

1. Get an API key

We create your API key and send it to you over a secure channel. It looks like prefix.secret. Keep it on your server: do not put it in a browser or a mobile app.

2. Pull records

curl https://api.knowyourchain.com/vendor/v1/attributions \
  -H "Authorization: Api-Key $KYC_API_KEY" \
  -H "Accept-Encoding: gzip" \
  --compressed

The response is one page of records, oldest first, and a pagination object:

{
  "items": [
    {
      "attributionId": "7f3c2a90-51d4-4c1e-9b0a-2a8f6c1d9e11",
      "subject": {
        "subjectType": "DEPOSIT_ADDRESS",
        "identifier": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "entityName": "Example Exchange",
        "asset": "USDT",
        "network": "TRON",
        "status": "completed",
        "defunctService": false,
        "kycRequired": "required"
      },
      "observedAt": "2026-11-20T08:14:03.512Z",
      "collectedAt": "2026-11-20T09:02:47.130Z",
      "evidenceFiles": [
        {
          "evidenceId": "0b6e4f1a-3c2d-4e5f-8a9b-1c2d3e4f5a6b",
          "mimeType": "image/png",
          "sha256": "9f2b5c…e41a",
          "uri": "https://api.knowyourchain.com/vendor/v1/evidence/0b6e4f1a-3c2d-4e5f-8a9b-1c2d3e4f5a6b"
        }
      ]
    }
  ],
  "pagination": {
    "currentPage": 0,
    "pageSize": 100,
    "totalElements": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrevious": false
  }
}

3. Download the evidence

Each record lists one or more evidence files. Download a file from its uri with the same API key:

curl -o evidence.png \
  -H "Authorization: Api-Key $KYC_API_KEY" \
  https://api.knowyourchain.com/vendor/v1/evidence/0b6e4f1a-3c2d-4e5f-8a9b-1c2d3e4f5a6b

Compare the SHA-256 of the file with sha256 in the record.

4. Poll for new records

Keep the end of each call and send it as the next start. The window is half-open (start <= collectedAt < end), so no record is read twice or missed.

curl "https://api.knowyourchain.com/vendor/v1/attributions?start=2026-11-26T00:00:00.000Z&end=2026-11-27T00:00:00.000Z" \
  -H "Authorization: Api-Key $KYC_API_KEY"

Next: Records and evidence.

On this page