Authentication
All API requests require authentication via API key.
API Key Format
bash
kg_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
kg_Kagyz prefixlive_Production key- RemainingUnique identifier
Using Your API Key
Include your API key in the Authorization header:
bash
Authorization: Bearer YOUR_API_KEY
Example
javascript
const response = await fetch('https://api.kagyz.com/v1/invoice', {method: 'POST',headers: {'Authorization': 'Bearer kg_live_a1b2c3d4...','Content-Type': 'application/json'},body: JSON.stringify({ ... })});
Security
- Never expose your API key in client-side code
- Use environment variables to store keys
- Regenerate keys if compromised (coming soon)
Errors
| Status | Meaning |
|---|---|
401 | Invalid or missing API key |
429 | Monthly usage limit reached |