New: our AI Agent is live — 140+ live registry connections, KYB without an integration. Try it →

Quickstart

This quickstart takes you from nothing to a verified company case in about ten minutes, against the free sandbox. You will request access, get a token, create a company case, poll until it is ready, and read the verified result including the ownership structure.

For the concepts behind each step, see the Guide. For the full endpoint reference, see the API Reference.

Before you start

You need sandbox credentials: a client_id and a client_secret. If you do not have them, request access. You sign the Sandbox Testing Agreement and receive credentials on screen and by email.

The sandbox base URL is https://api.knowyourcustomer.dev. Everything in this quickstart is free and uses synthetic and public-record data.

Step 1: Get a token

Authentication uses OAuth2 client-credentials. Exchange your client_id and client_secret for a bearer token with scope PublicApi. The token lasts about ten minutes; send it on every request as Authorization: Bearer <token>.

# Exchange client credentials for a bearer token (~10 min TTL)
TOKEN=$(curl -fsS -X POST "$BASE_URL/connect/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=$CLIENT_ID" \
  -d "client_secret=$CLIENT_SECRET" \
  -d "scope=PublicApi" | jq -r '.access_token')

# Send it on every request:
#   -H "Authorization: Bearer $TOKEN"

A successful response contains an access_token. Keep it for the next calls.

Step 2: Search for a company

Find the exact registry record so you can create the case against it. Search by name or registration number, optionally narrowing by country.

Try CROPWELL BISHOP CREAMERY LIMITED, a good multi-level ownership example: search cropwell bishop in GB. You can also try SC ENGINEERING PRIVATE LIMITED (SG, UEN 200815219G) or Ubizense Limited (HK, BR 69293323).

POST /v2/Companies/search

# Search the registry; pick the exact result.
curl -fsS -X POST "$BASE_URL/v2/Companies/search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"codeiso31662":"GB","query":"CROPWELL BISHOP"}' \
  | jq '.companySearch.searchResults[0]'
# -> note the exact .rawname and the registration number (00364890)

Pick your result and note its exact name and registration number (00364890 for Cropwell Bishop).

Step 3: Create the case

Create a company case using the name that matches your search result. Supply the country and registration number for an exact registry match.

POST /v2/Companies with rawname, codeiso31662, and externalCode.

# Create the company case using the exact rawname from search.
CASE_ID=$(curl -fsS -X POST "$BASE_URL/v2/Companies" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"rawname\":\"$RAWNAME\",\"codeiso31662\":\"GB\",\"externalCode\":\"00364890\"}" \
  | jq -r '.caseDetail.details.common.caseCommonId')
echo "caseCommonId: $CASE_ID"   # the case now builds in the background

The response returns a caseCommonId. The case now builds in the background.

Step 4: Poll until ready

The build is asynchronous. Poll the case and read its status until it is 3 (Ready). Poll every few seconds with a backoff; some jurisdictions take minutes.

GET /v2/Companies/{caseCommonId}

# Poll until status is 3 (Ready). Some jurisdictions take minutes.
for i in $(seq 1 60); do
  STATUS=$(curl -fsS "$BASE_URL/v2/Companies/$CASE_ID" \
    -H "Authorization: Bearer $TOKEN" \
    | jq -r '.caseDetail.details.common.statusId')
  echo "statusId=$STATUS"
  if [ "$STATUS" = "3" ]; then break; fi
  sleep 5
done

Keep polling while the status is anything other than 3. The status moves through 0 -> 50 -> 51 -> a varying subset of {53, 54, 9, 100, 107} -> 3.

Step 5: Read the verified result

Once the status is 3, read the case. You get the verified company properties (name, registration number, jurisdiction) and the ownership data: controllingEntitiesAndIndividuals and the recursive org-chart (shareholders nested by memberType).

# Read members + the recursive org-chart (the ownership tree).
curl -fsS "$BASE_URL/v2/Companies/$CASE_ID/members" \
  -H "Authorization: Bearer $TOKEN" \
  | jq '{controlling: (.controllingEntitiesAndIndividuals | length),
         shareholders: (.shareholdersAndBeneficialOwners | length)}'

curl -fsS "$BASE_URL/v2/Companies/$CASE_ID/org-chart" \
  -H "Authorization: Bearer $TOKEN" \
  | jq '{root: .name, shareholders: [.shareholders[]?.name]}'

# Each individual member has its own caseCommonId, addressable at
#   GET /v2/Individuals/{caseCommonId}

For Cropwell Bishop you will see a multi-level tree: a corporate parent above individual owners. Walk the shareholders arrays to build the full structure, and read each individual member's caseCommonId to address them at /v2/Individuals/{caseCommonId}.

What next