Docs
Getting Started

Quickstart

Go from zero to your first breached-password check in under five minutes.

Using an AI editor?Skip the manual steps — see Use with AI: Cursor, Claude Code, Codex for a copy-paste prompt, or point your agent at /llms.txt.
1

Sign up

Create a free account in the LeakJar Console. No credit card required — you start on the free tier and can make live checks right away.

2

Create a project

Navigate to Projects in the console sidebar and click New Project. Give it a name (e.g. "Staging"). Each project gets its own API keys and configuration.

3

Get your API key

Open your project and navigate to Breached Password API. Click New key to create a new secret key (prefixed lj_). Copy it immediately—it will only be displayed once.

Important: Treat your API key like a password. Never commit it to version control or expose it in client-side code.
4

Make your first check

Hash the password using SHA-1, take the first 5 hex characters as the prefix, and query the range endpoint. The server returns all suffixes that match—you compare locally without ever sending the full hash.

terminalbash
# Hash the password and extract the 5-char prefix
PREFIX=$(printf '%s' "password123" | shasum -a 1 | \
  awk '{print toupper($1)}' | cut -c1-5)

# Query the range endpoint
curl -s \
  -H "Authorization: Bearer $LEAKJAR_API_KEY" \
  "https://api.leakjar.com/v1/passwords/range/$PREFIX"
# → text/plain, one "SUFFIX:COUNT" per line

Compare the remaining characters of your hash against the returned suffixes. A match means the password has appeared in a known breach.

5

Apply a policy

Once you detect a breached password, decide what to do with the result. LeakJar supports four policy outcomes:

  • Block— reject the password outright during signup or reset.
  • Step-up MFA— allow the password but require multi-factor verification.
  • Force Reset— require the user to choose a new password at next login.
  • Notify— log the event and alert your security team without blocking the user.

See the Policies guide for implementation details and a decision matrix.