API reference
API key
Test your connection and see which key, company, scopes and limits apply.
Endpoints
Retrieve key and company
GET
/api/v1/me
Returns the key you are making the request with, including the company, scopes, expiry date and limits. Use this endpoint to test your connection: it requires no scope.
- Scope
- No scope required: any valid key.
Example request
curl "https://app.klantly.com/api/v1/me" \
-H "Authorization: Bearer $KLANTLY_API_KEY"$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('GET', 'me');
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/me', {
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://app.klantly.com/api/v1/me",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
},
)
data = response.json()["data"]Response 200
{
"data": {
"object": "api_key",
"id": "01j7zq3k9x2m4n6p8r0t2v4w6y",
"name": "Website",
"prefix": "kly_4fZ2mQ8v",
"scopes": [
"customers.read",
"customers.write"
],
"expires_at": "2027-09-14T10:15:00Z",
"created_at": "2026-09-14T10:15:00Z",
"company": {
"object": "company",
"id": "42",
"name": "De Vries Bouw"
},
"rate_limits": [
{
"name": "key_minute",
"limit": 120,
"window_seconds": 60
}
]
}
}The object
All fields are always present; a field without a value is null.
| Field | Type | Description |
|---|---|---|
object |
string | Always "api_key". |
id |
string | Id of the key. |
name |
string | The name the key was given in Klantly. |
prefix |
string | The start of the key, to recognise it. |
scopes |
array<string> | The scopes of the key. |
expires_at |
string (date-time) | Expiry date, or null if the key does not expire. can be empty (null) |
created_at |
string (date-time) | Created at (UTC). |
company |
object | The company the key belongs to. |
company.object |
string | Always "company". |
company.id |
string | Id of the company. |
company.name |
string | Name of the company. |
rate_limits |
array<object> | The limits that apply to this key. |
rate_limits.name |
string | Name of the limit. |
rate_limits.limit |
integer | Maximum number of requests in the window. |
rate_limits.window_seconds |
integer | Length of the window in seconds. |