API Authentication

Learn how to authenticate with the FluenzR API.

API Authentication

The FluenzR API uses API keys for authentication.

Get an API key

Prerequisites

  • Active Pro plan
  • Administrator rights on the account

Generate a key

  1. Log in to FluenzR
  2. Go to Settings > API
  3. Click on Generate a new key
  4. Give the key a descriptive name
  5. Copy the displayed key immediately

Warning The key is only shown once. Keep it in a safe place. If you lose it, you'll need to generate a new one.

Use the API key

Authorization header

Include your API key in the Authorization header of each request:

curl -X GET "https://api.fluenzr.co/v1/contacts" \
  -H "Authorization: Bearer flz_sk_your_api_key_here" \
  -H "Content-Type: application/json"

Key format

FluenzR API keys follow this format:

flz_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • flz: FluenzR prefix
  • sk: Secret key
  • xxx...: 32 alphanumeric characters

Examples by language

cURL

curl -X GET "https://api.fluenzr.co/v1/contacts" \
  -H "Authorization: Bearer flz_sk_abc123..." \
  -H "Content-Type: application/json"

JavaScript (fetch)

const response = await fetch('https://api.fluenzr.co/v1/contacts', {
  headers: {
    'Authorization': 'Bearer flz_sk_abc123...',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();

JavaScript (axios)

import axios from 'axios';

const client = axios.create({
  baseURL: 'https://api.fluenzr.co/v1',
  headers: {
    'Authorization': 'Bearer flz_sk_abc123...'
  }
});

const { data } = await client.get('/contacts');

Python (requests)

import requests

headers = {
    'Authorization': 'Bearer flz_sk_abc123...',
    'Content-Type': 'application/json'
}

response = requests.get(
    'https://api.fluenzr.co/v1/contacts',
    headers=headers
)

data = response.json()

PHP

<?php
$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => 'https://api.fluenzr.co/v1/contacts',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer flz_sk_abc123...',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);

Ruby

require 'net/http'
require 'json'

uri = URI('https://api.fluenzr.co/v1/contacts')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer flz_sk_abc123...'
request['Content-Type'] = 'application/json'

response = http.request(request)
data = JSON.parse(response.body)

Manage your API keys

View existing keys

In Settings > API, view your key list:

NameCreatedLast usedActions
Production01/01/202501/10/2025Revoke
Dev/Test01/05/202501/08/2025Revoke

Revoke a key

  1. Click Revoke next to the key
  2. Confirm revocation

Danger Revocation is immediate and irreversible. All applications using this key will stop working.

Best practices

One key per environment

EnvironmentKeyPermissions
Productionflz_sk_prod_xxxAll
Stagingflz_sk_stag_xxxAll
Developmentflz_sk_dev_xxxRead-only

Never expose keys

Never do:

  • Commit to a Git repo
  • Include client-side (frontend)
  • Share via email/chat

Always do:

  • Use environment variables
  • Store in a secrets manager
  • Keep server-side only

Environment variables

# .env (don't commit)
FLUENZR_API_KEY=flz_sk_abc123...
// Node.js
const apiKey = process.env.FLUENZR_API_KEY;
# Python
import os
api_key = os.environ.get('FLUENZR_API_KEY')

Authentication errors

401 Unauthorized

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Possible causes:

  • Missing API key
  • Invalid API key
  • Revoked API key

403 Forbidden

{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "API access requires Pro plan"
  }
}

Possible causes:

  • Account paused after the trial ended (API not available)
  • API key without required permissions

Security

Key rotation

Change your API keys regularly:

  1. Generate a new key
  2. Update your applications
  3. Verify everything works
  4. Revoke the old key

Monitoring

Monitor your key usage:

  • Check "last used" regularly
  • Identify unused keys
  • Detect suspicious usage

In case of compromise

If a key is compromised:

  1. Immediately revoke the key in FluenzR
  2. Generate a new key
  3. Update your applications
  4. Analyze logs to detect malicious use
  5. Contact support if necessary