Overview
AutoSend uses API Key authentication with Bearer tokens. Every API request must include your API key in theAuthorization header. API keys are tied to a specific project and provide access to all resources within that project.
Creating an API Key
Follow these steps to generate a new API key from your AutoSend dashboard:1
Navigate to API Keys Settings
Go to Settings > API Keys from the sidebar

2
Generate New API Key
- Click the “Generate API Key” button in the top-right corner
- Enter a descriptive name for your API key:
- Use names that describe the purpose or environment (e.g., “Production”, “Staging”, “Development”, “Marketing Automation”)
- This helps you identify and manage multiple keys
- Click “Generate”

3
Save Your API Key Secret
After generation, you’ll see your API Key Secret displayed once:
Your API key will look like this:

For security reasons, the API key secret is only shown once during creation. You will NOT be able to view it again.
- Copy the key immediately to your clipboard
- Store it securely (password manager, environment variables, secrets management system)
- Download the .txt file as a backup
- Never commit API keys to version control (Git, SVN, etc.)
- Never share your API key publicly or in client-side code
API Key Format
AutoSend API keys follow this format:as- Prefix identifying AutoSend keyssecret_string- Cryptographically secure alphanumeric characters
Making Authenticated Requests
Include your API key in theAuthorization header of every request using the Bearer authentication scheme:
HTTP Header Format
Managing API Keys
Viewing API Keys
In your dashboard under Settings > API Keys, you can see:- API Key Name - The label you assigned
- API Key ID - A unique identifier for the key
- Generated On - Creation date
Deleting API Keys
To delete an API key:- Go to Settings > API Keys
- Find the API key you want to delete
- Click the three-dot menu icon
- Select “Delete”
- Confirm the deletion
Best Practices for API Key Management
-
Use Environment Variables
Never hardcode API keys in your source code.
-
Separate Keys for Different Environments
- Create separate keys for development, staging, and production
- Use descriptive names: “Production API Key”, “Staging API Key”
- This allows you to rotate keys without affecting other environments
-
Rotate Keys Regularly
- Generate new keys periodically (every 90 days recommended)
- Update your applications with the new key
- Delete the old key after confirming the new one works
-
Limit Key Exposure
- Never commit keys to version control
- Don’t include keys in client-side JavaScript
- Use secrets management services (AWS Secrets Manager, HashiCorp Vault, etc.)
-
Add API keys to
.gitignore:
Authentication Errors
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Error Response:Common Causes:
- API key doesn’t have access to the requested resource
- API key belongs to a different project
- Verify you’re using the correct API key for the project
- Check that the resource (domain, template, etc.) exists in the project
Keep Your API Keys Secret
API keys provide full access to your AutoSend account and should be treated like passwords:- Never share API keys in public forums, support tickets, or chat
- Don’t include keys in screenshots or screen recordings
- Revoke keys immediately if exposed
- Use read-only keys when possible (future feature)
HTTPS OnlyAlways use HTTPS when making API requests. AutoSend APIs reject non-HTTPS requests to protect your API keys from interception.
Rate Limiting
API keys are subject to rate limits:- 2 requests per second per API key
- 50 requests per minute per API key
Exceeding these limits returns a
429 Too Many Requests error. See the API Reference for more details.