API authentication
Getting a key
Section titled “Getting a key”-
Go to karani.co/account/services.
-
Find the API card and click Get Key.
-
Copy the key.
Using it
Section titled “Using it”Pass the key as an api_key parameter on every request:
curl "https://karani.co/api/v1/contacts?api_key=YOUR_KEY"Errors
Section titled “Errors”All errors use the same shape as successful responses, with success: false.
{ "success": false, "message": "Forbidden", "type": "", "data": []}| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden — usually a missing or invalid key |
404 |
Not Found — the record doesn’t exist, or isn’t in your account |
Scope and security
Section titled “Scope and security”A key acts as the user it belongs to, on their account. There’s no read-only mode and no per-endpoint permissions.
Practical handling:
- Store the key in an environment variable, not in code.
- Keep it out of version control, logs, and error reports.
- Refresh it if you think it’s been exposed — and remember that breaks anything using the old one.
Rate limits
Section titled “Rate limits”Be reasonable. If you’re pulling your whole contact list, do it on a schedule rather than in a loop, and cache the result.
Which account a key acts on
Section titled “Which account a key acts on”The key’s owning user, on their account. If you have several accounts or work in a shared account, check you generated the key while in the account you mean to act on.