Creates one or more clients. If keys are specified, each key is signed
by the apikee HMAC engine and the full rawKey is returned once in
the response inside the key object. Store it immediately — it cannot be
retrieved again (only the SHA-256 hash is persisted).
HMAC-SHA256 signed key produced by the apikee engine.
Format: <base62-id>.<base62-claims>.<base62-hmac>
The first 12 characters are the keyPrefix (safe for logging).
In: header
Query Parameters
e.g. my-app-production
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://apikee.dev/api/v1/client" \ -H "Content-Type: application/json" \ -d '{ "name": "Mobile Backend", "type": "service", "templateId": "clt_abc123", "metadata": { "owner": "dev-team" }, "keys": [ { "name": "Prod Key", "expiresAt": "2027-12-31T23:59:59Z" } ] }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"type": "person",
"status": "active",
"source": {},
"ipWhitelist": [
"string"
],
"metadata": {},
"templateId": "string",
"envId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"keys": [
{
"id": "string",
"name": "string",
"keyPrefix": "string",
"rawKey": "string",
"scopes": [
"string"
],
"environment": "string",
"enabled": true,
"requestCount": 0,
"lastUsedAt": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"metadata": {}
}
],
"stats": {
"total": 0,
"success": 0,
"error": 0,
"avgDurationMs": 0
}
}