Clients API
REST API reference for client and key management.
Clients API
Base path: https://apikee.dev/api/v1/client
List clients
GET /client?project_env={env}Query parameters
| Parameter | Type | Description |
|---|---|---|
project_env | string | required — project-environment slug |
name | string | Filter by client name |
type | string | Filter by client type |
templateId | string | Filter by template |
page | integer | Page number |
limit | integer | Per page |
Example
curl "https://apikee.dev/api/v1/client?project_env=my-api-production&limit=20" \
-H "x-api-key: sk_live_..."Create client(s)
POST /client?project_env={env}Pass a single object or an array for bulk creation.
{
"name": "Acme Corp",
"type": "company",
"templateId": "tmpl_abc123",
"ipWhitelist": ["203.0.113.0/24"],
"metadata": { "salesforceId": "001abc" },
"keys": [
{
"name": "Production Key",
"expiresAt": "2027-01-01T00:00:00Z",
"autoRotate": true
}
]
}The raw key key field is returned only in this response. It is never stored or retrievable again. Copy it immediately.
Response 201 — returns the created Client object(s) including the raw key in keys[0].key.
Get client
GET /client/{client_uuid}?project_env={env}Returns the full client record including stats and all keys (without raw secrets).
Update client / upsert keys
PUT /client/{client_uuid}?project_env={env}{
"name": "Acme Corp (Updated)",
"templateId": "tmpl_pro",
"ipWhitelist": ["10.0.0.0/8"],
"keys": [
{
"id": "key-uuid-123",
"name": "Renamed Key",
"expiresAt": "2028-01-01T00:00:00Z"
}
]
}Delete client or key
DELETE /client/{client_uuid}Query parameters
| Parameter | Type | Description |
|---|---|---|
keyId | string | If provided, deletes only this key. If omitted, deletes the entire client. |
Validate key usage
POST /client/{client_uuid}?project_env={env}&method_path={method_path}Called by the SDK in server mode to log and validate a request. The body is AES-256-GCM encrypted when X-Apikee-Encrypted: 1 is set.
Request body (decrypted form)
{
"name": "Production Key",
"timestamp": "2026-03-19T14:22:01Z",
"headers": {
"user-agent": "curl/8.5.0",
"x-forwarded-for": "203.0.113.1"
},
"payload": { "userId": 12345 }
}Response 200
{
"success": true,
"clientId": "uuid-...",
"project_env": "my-api-production",
"method_path": "GET:/users",
"durationMs": 3
}List templates
GET /client/templates?project_env={env}Returns all templates available in the environment. Use the returned id as templateId when creating or updating clients.

