Skip to main content

Get Key

Retrieve details for a specific API key. The key value is masked.

GET /api/v1/api-keys/:keyId

Authentication

JWT Bearer Token required via Authorization header.

Path Parameters

ParameterTypeDescription
keyIdstringThe key ID (e.g., key_abc123)

Response

200 OK

{
"id": "key_abc123",
"name": "Production Server",
"keyPreview": "as_live_sk_abc...789",
"scopes": ["splits:read", "splits:write"],
"lastUsedAt": "2026-03-29T09:45:00Z",
"createdAt": "2026-01-15T10:00:00Z",
"expiresAt": "2027-01-01T00:00:00Z",
"usageCount": 1542
}

404 Not Found

{
"error": {
"code": "NOT_FOUND",
"message": "API key not found",
"status": 404
}
}

Code Examples

cURL

curl https://api.audiospliter.com/api/v1/api-keys/key_abc123 \
-H "Authorization: Bearer your_jwt_token"

Node.js

const response = await fetch(
'https://api.audiospliter.com/api/v1/api-keys/key_abc123',
{ headers: { 'Authorization': `Bearer ${jwtToken}` } }
);
const key = await response.json();
console.log(`Key ${key.name} used ${key.usageCount} times`);

Python

import requests

response = requests.get(
'https://api.audiospliter.com/api/v1/api-keys/key_abc123',
headers={'Authorization': f'Bearer {jwt_token}'},
)
key = response.json()
print(f"Key {key['name']} used {key['usageCount']} times")