Skip to content
Get started

Authentication

Requests are authenticated with an API key sent as a Bearer token. Keys belong to your account, and every key draws from the same credit balance.

Send your key

Put the key in the Authorization header on every request. A request without a valid key returns 401 and is not charged.

Request
curl -X POST https://api.1lookup.dev/v1/phone-validation \
  -H "Authorization: Bearer 1lk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone_number":"+15125550142"}'
401 Unauthorized
{
  "success": false,
  "error": {
    "code": "unauthorized",
    "message": "The API key is missing, malformed or revoked."
  },
  "meta": {
    "credits_used": 0,
    "credits_remaining": 999,
    "cached": false,
    "request_id": "req_8f3a2c1e9b7d"
  }
}

Key types

PrefixModeBehavior
1lk_live_LiveRuns real lookups and spends credits.
1lk_test_TestReturns each product's sample response and never spends credits. Use it in CI and while you build.

Managing keys

Create, name and revoke keys under API & MCP in the dashboard. A key is shown once, when you create it. We store only a hash, so a lost key cannot be recovered, only replaced.

  • Give each system its own key: one for your backend, one per AI client, one for a teammate's script.
  • Lookup history shows which key made each call.
  • Revoking a key takes effect at once and does not affect the others.

Keep keys off the client

Call the API from your server and forward only the fields your interface needs. If a key leaks, revoke it and create a new one.

OAuth for MCP clients

MCP clients that support OAuth 2.1 can authorize against your account without a pasted key. The client opens a sign-in page, you approve it, and it receives its own revocable token. Clients without OAuth support send an API key in the Authorization header instead. See client setup for both paths.