Skip to main content
API keys authenticate requests to the KnoxCall Management API. You can create multiple keys per tenant for different services and revoke them independently.
The type of key created depends on which environment you’re using. Keys created via api.knoxcall.com are production keys (tk_live_). Keys created via sandbox.knoxcall.com are test keys (tk_test_). See the Authentication guide for details.

List API Keys

GET /v1/api-keys
Returns a paginated list of API keys for your tenant. Key values are masked — only the prefix is shown.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger20Items per page (max 100)

Response

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "key_id": "tk_live_abc123",
      "key_prefix": "tk_live_abc...",
      "key_type": "standard",
      "name": "Backend Server",
      "active": true,
      "created_at": "2026-01-15T09:30:00.000Z",
      "last_used_at": "2026-03-10T14:22:01.000Z",
      "rate_limit_requests": null,
      "rate_limit_window_sec": null
    }
  ],
  "meta": {
    "total": 3,
    "page": 1,
    "per_page": 20,
    "total_pages": 1,
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
curl https://api.knoxcall.com/v1/api-keys \
  -H "Authorization: Bearer tk_live_abc123..."

Create API Key

POST /v1/api-keys
Creates a new API key. The full key value is returned only once in the response — store it securely.

Request Body

FieldTypeRequiredDescription
namestringYesA descriptive name (e.g., “CI/CD Pipeline”, “Backend Server”)
rate_limit_requestsintegerNoMaximum requests per window for this key
rate_limit_window_secintegerNoRate limit window duration in seconds

Response

{
  "data": {
    "key_id": "tk_live_newkey789",
    "api_key": "tk_live_newkey789_a1b2c3d4e5f6g7h8i9j0...",
    "key_prefix": "tk_live_new...",
    "key_type": "standard",
    "name": "CI/CD Pipeline",
    "message": "Store this API key securely. It will not be shown again."
  },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}
The api_key field contains the full key and is only returned at creation time. KnoxCall does not store the plain-text key. If you lose it, you must revoke it and create a new one.
curl -X POST https://api.knoxcall.com/v1/api-keys \
  -H "Authorization: Bearer tk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CI/CD Pipeline"
  }'

Errors

StatusTypeDescription
400validation_errorMissing name field

Revoke API Key

DELETE /v1/api-keys/:id
Revokes an API key, permanently disabling it. Revoked keys cannot be reactivated.

Path Parameters

ParameterTypeDescription
idstringThe API key ID (UUID or key_id)

Response

{
  "data": { "revoked": true },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}
You cannot revoke the API key that you are currently using to authenticate the request. Use a different key to revoke it, or revoke it from the dashboard.

Errors

StatusTypeDescription
400validation_errorCannot revoke the key currently in use
404not_foundAPI key not found