Secure API Usage
Follow these best practices to keep your data safe.Keep API Keys Secret
- Store keys in environment variables
- Never commit keys to version control
- Never include keys in client-side JavaScript
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Best practices for securely using the CubeStack API.
# .env
CUBESTACK_API_KEY=your-api-key
// No API key needed — only public columns returned
const response = await fetch('https://api.cubestack.app/api/v1/my-project/products');
// Server-side only
await fetch('https://api.cubestack.app/api/v1/my-project/products', {
method: 'POST',
headers: {
'X-Api-Key': process.env.CUBESTACK_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ title: 'New Product' })
});
Was this page helpful?