Skip to main content
API keys are required to authenticate requests to the Fenra API. This guide walks you through creating, managing, and using API keys in your Fenra account.

Prerequisites

  • A Fenra account with organization access
  • Owner or Admin role in your organization (required to create API keys)

Creating an API Key

1

Navigate to API Keys Settings

Log in to your Fenra dashboard and navigate to Organization SettingsAPI Keys.API Keys Settings Page - A screenshot showing the API Keys section in Organization Settings with a list of existing keys and a "Create New Key" button
Image Placeholder: This should show the API Keys settings page with:
  • List of existing API keys (if any)
  • “Create New Key” button
  • Key management options (activate/deactivate, delete)
  • Last usage timestamp for each key
2

Click Create New Key

Click the “Create New Key” button to open the API key creation dialog.Create API Key Dialog - A screenshot showing the API key creation form with a name field and create button
Image Placeholder: This should show the create API key dialog with:
  • Name/description input field
  • Create button
  • Cancel button
  • Optional help text about key usage
3

Enter a Descriptive Name

Enter a descriptive name for your API key. This helps you identify the key’s purpose later.Good naming examples:
  • Production API Key
  • Development Environment Key
  • Backend Service Key
  • Mobile App Key
Use descriptive names that indicate where or how the key will be used. This makes key management much easier as your organization grows.
4

Copy and Store the Key

After clicking “Create”, your new API key will be displayed. Copy it immediately and store it securely.API Key Display - A screenshot showing the newly created API key with a copy button and warning that the key will only be shown once
Image Placeholder: This should show the API key display screen with:
  • The full API key string
  • Copy button
  • Warning message that the key is only shown once
  • Instructions to store it securely
  • Close/done button
Important: API keys are only displayed once when created. If you lose the key, you’ll need to create a new one. Make sure to copy and store it securely before closing the dialog.
5

Store the Key Securely

Store your API key in a secure location:
  • Environment variables - Store in .env files (never commit to version control)
  • Secret management services - Use services like AWS Secrets Manager, HashiCorp Vault, or similar
  • Secure configuration files - Store in encrypted configuration files
  • Password managers - For personal development keys
Never commit API keys to version control systems like Git. Always use environment variables or secret management services in production.

Using Your API Key

Once you have your API key, use it to authenticate requests to the Fenra API.

Authentication Header

Include your API key in the X-Api-Key header for all API requests:
const response = await fetch('https://api.fenra.io/ingest/usage', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': process.env.FENRA_API_KEY
  },
  body: JSON.stringify(transactionData)
});
The API key is scoped to your organization. All requests using a key will be associated with your organization’s data.

Managing API Keys

Viewing Your Keys

In the API Keys settings page, you can see:
  • Key name - The descriptive name you assigned
  • Status - Whether the key is active or inactive
  • Last used - Timestamp of the last API request using this key
  • Created - When the key was created
API Keys List - A screenshot showing a table of API keys with columns for name, status, last used, created date, and actions
Image Placeholder: This should show a table with:
  • Key name column
  • Status indicator (active/inactive)
  • Last used timestamp
  • Created date
  • Actions column (activate/deactivate, delete buttons)

Activating and Deactivating Keys

You can temporarily disable API keys without deleting them:
1

Find the Key

Locate the API key you want to activate or deactivate in the API Keys list.
2

Toggle Status

Click the status toggle or use the actions menu to activate or deactivate the key.
3

Confirm Change

The key status will update immediately. Deactivated keys cannot be used for API requests.
Deactivate keys instead of deleting them when you need to temporarily disable access. This preserves the key for future use and maintains an audit trail.

Deleting Keys

To permanently remove an API key:
Permanent Action: Deleting an API key is permanent and cannot be undone. Any applications using the deleted key will immediately stop working.
1

Locate the Key

Find the API key you want to delete in the API Keys list.
2

Open Delete Dialog

Click the delete button (usually a trash icon) in the actions column.
3

Confirm Deletion

Confirm the deletion in the dialog. You may be asked to type the key name to confirm.
4

Update Applications

Update any applications using the deleted key with a new API key.

Best Practices

Use Multiple Keys

Create separate keys for different environments (production, staging, development) or services for better security and tracking.

Rotate Regularly

Periodically rotate API keys, especially if they may have been compromised or shared.

Monitor Usage

Regularly check the “Last used” timestamp to identify unused keys that can be deactivated or deleted.

Use Descriptive Names

Name keys clearly to make management easier as your organization grows.

Troubleshooting

Invalid API Key Error

If you receive a 401 Unauthorized error:
Ensure the API key is copied correctly with no extra spaces or characters.
Check that the API key is active in the dashboard. Deactivated keys will return 401 errors.
Make sure you’re using the X-Api-Key header name (case-sensitive).
Verify the key belongs to the correct organization if you have access to multiple organizations.

Key Not Found

If you can’t find a key you created:
  • Check if you’re viewing the correct organization
  • Verify you have Owner or Admin permissions
  • Check if the key was deleted
  • Look in the “Inactive” filter if you’re filtering by status

Next Steps

Now that you have an API key, you can: