Hank
_CONSOLEbeta

Making requests

All services live under https://api.hank.ai/v1/<service>/. Send JSON, send your key as a bearer token, read JSON back. There is no required SDK. Use any HTTP client. Here is the same authenticated request in three languages:

curl

curl https://api.hank.ai/v1/codesets/lookup \
     -H "Authorization: Bearer <YOUR_API_KEY>"

Python (requests)

import requests

resp = requests.get(
    "https://api.hank.ai/v1/codesets/lookup",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)
resp.raise_for_status()
data = resp.json()

JavaScript (fetch)

const resp = await fetch("https://api.hank.ai/v1/codesets/lookup", {
  headers: { Authorization: "Bearer <YOUR_API_KEY>" },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();

See Errors for status codes and Rate limits for throttling behavior.