Authentication

All API requests require authentication via an API key passed in the Authorization header.

API Key format

Keys use the format sk_live_ followed by 64 hex characters:

sk_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789...

Using your key

Include the key in the Authorization header with the Bearer scheme:

cURL

curl -H "Authorization: Bearer sk_live_YOUR_KEY" \
  "https://emailkind.com/v1/[email protected]"

JavaScript

const response = await fetch(
  "https://emailkind.com/v1/[email protected]",
  {
    headers: {
      Authorization: "Bearer sk_live_YOUR_KEY",
    },
  }
);
const data = await response.json();

Python

import requests

response = requests.get(
    "https://emailkind.com/v1/classify",
    params={"email": "[email protected]"},
    headers={"Authorization": "Bearer sk_live_YOUR_KEY"}
)
data = response.json()

PHP

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => "https://emailkind.com/v1/[email protected]",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_YOUR_KEY"],
    CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);

Go

req, _ := http.NewRequest("GET", "https://emailkind.com/v1/[email protected]", nil)
req.Header.Set("Authorization", "Bearer sk_live_YOUR_KEY")
resp, err := http.DefaultClient.Do(req)

Ruby

uri = URI("https://emailkind.com/v1/[email protected]")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer sk_live_YOUR_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }

Key management

You can manage your API keys from the Dashboard:

  • Create new keys with descriptive names (e.g., "Production", "Staging")
  • Revoke keys that are compromised or no longer needed
  • View key prefixes and last usage timestamps

Security best practices

| Do | Don't | |---|---| | Store keys in environment variables | Commit keys to source control | | Use different keys per environment | Share keys between applications | | Revoke unused keys | Log full API keys | | Rotate keys periodically | Expose keys in client-side code |

Key limits by plan

| Plan | Max API keys | |---|---| | Free | 1 | | Starter | 3 | | Growth | 5 | | Scale | 10 |

Error responses

If authentication fails, you'll receive a 401 Unauthorized response:

{
  "success": false,
  "request_id": "req_abc123",
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}