API Keys
API keys allow server-to-server communication with Cueflow. Use them to manage contacts and track events from your backend.
When to Use API Keys
Use the server-side API when you need to:
Sync contacts from your database
Track events from webhooks
Update contact properties server-side
Integrate with backend processes
For client-side tracking, use the embed script instead.
Managing API Keys
Access API Settings
Go to Settings in the sidebar
Select API Keys
Create an API Key
Click Create API Key
Enter a name (e.g., "Production Server", "Webhook Handler")
Click Create
Copy the key immediately - it won't be shown again
API keys are shown only once. Copy and store it securely before closing the dialog.
Key Format
API keys look like:
The sk_ prefix indicates a secret key.
View Existing Keys
The API Keys page shows:
Key name
Key prefix (first 12 characters)
Created date
Last used date
Delete a Key
Find the key in the list
Click Delete
Confirm deletion
Deleting a key immediately invalidates it. Any systems using that key will stop working.
Using the API
Authentication
Include your API key in the Authorization header:
API Endpoints
Contacts
Create or update a contact:
Get a contact:
Update a contact:
Delete a contact:
Events
Track an event:
Response Format
Successful responses return JSON:
Error responses:
Rate Limiting
API requests are rate limited:
100 requests per minute per API key
Rate limit headers included in responses:
X-RateLimit-Limit: Request limitX-RateLimit-Remaining: Remaining requestsX-RateLimit-Reset: Reset timestamp
Use Cases
Sync Contacts on Signup
When a user signs up in your app:
Track Webhook Events
When receiving a Stripe webhook:
Batch Updates
Update multiple contacts in a loop:
Security Best Practices
Keep Keys Secret
Never commit keys to version control
Use environment variables
Don't expose in client-side code
Use Separate Keys
Create different keys for different environments
Name them clearly (Production, Staging, Development)
Rotate keys periodically
Monitor Usage
Check "Last Used" dates
Delete unused keys
Watch for unexpected activity
Rotate Keys
Create a new key
Update your systems to use the new key
Delete the old key
Last updated