Reference
API Keys API
API key management endpoints
API key management endpoints
GET /api/apikeys
List API keys
Response: 200 List of API keys retrieved successfully
| Field | Type | Required | Description |
|---|---|---|---|
data | ApiKey[] | No |
Example:
curl -X GET "https://api.memnexus.ai/api/apikeys" \
-H "Authorization: Bearer cmk_live_xxx.yyy"
POST /api/apikeys
Create API key
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
label | string | No | |
expiresAt | string | No |
Response: 201 API key created successfully
| Field | Type | Required | Description |
|---|---|---|---|
data | object | No |
Example:
curl -X POST "https://api.memnexus.ai/api/apikeys" \
-H "Authorization: Bearer cmk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{}'
DELETE /api/apikeys/{id}
Delete API key
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The API key ID |
Response: 204 No Content
Example:
curl -X DELETE "https://api.memnexus.ai/api/apikeys/mem_abc123" \
-H "Authorization: Bearer cmk_live_xxx.yyy"
GET /api/apikeys/debug-user
Get user information for current API key
Response: 200 User information retrieved successfully
| Field | Type | Required | Description |
|---|---|---|---|
data | object | No |
Example:
curl -X GET "https://api.memnexus.ai/api/apikeys/debug-user" \
-H "Authorization: Bearer cmk_live_xxx.yyy"