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 JavaScript SDK instead.

Managing API Keys

Access API Settings

  1. Go to API Keysarrow-up-right in the sidebar

Create an API Key

  1. Click Create API Key

  2. Enter a name (e.g., "Production Server", "Webhook Handler")

  3. Click Create

  4. Copy the key immediately - it won't be shown again

triangle-exclamation

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

  1. Find the key in the list

  2. Click Delete

  3. Confirm deletion

circle-exclamation

Using the API

Authentication

Include your API key in the Authorization header:

API Endpoints

Contacts

Create or 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:

  • 300 requests per minute per API key

  • Rate limit headers included in responses:

    • X-RateLimit-Limit: Request limit

    • X-RateLimit-Remaining: Remaining requests

    • X-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

  1. Create a new key

  2. Update your systems to use the new key

  3. Delete the old key

Last updated