Authentication
The Submagic API uses API key authentication to secure access to all endpoints. Every request must include a valid API key in the request headers.Getting Your API Key
1
Create an Account
Sign up for a free account at app.submagic.co
2
Navigate to API Settings
Go to your account settings and click on the “API” tab
3
Generate API Key
Click “Generate API Key” to create your unique API key
4
Copy and Secure
Copy your API key immediately - you won’t be able to see it again!
Important: Your API key will only be shown once during generation. Make
sure to copy and store it securely. If you lose your API key, you’ll need to
regenerate a new one.
API Key Format
Submagic API keys follow this format:Authentication Method
Include your API key in thex-api-key
header with every request:
Example Requests
API Key Security
Keep It Secret
Never expose your API key in client-side code, public repositories, or logs
Use Environment Variables
Store your API key in environment variables, not in your source code
Best Practices
Environment Variables
Store your API key in environment variables:Server-Side Only
Never use your API key in client-side JavaScript, mobile apps, or any publicly
accessible code. API keys should only be used from your secure backend
servers.
Key Rotation
To regenerate your API key:- Generate a new API key from your dashboard
- Update your applications with the new key
- Test that everything works with the new key
- The old key will be automatically invalidated
Authentication Errors
If authentication fails, you’ll receive a401 Unauthorized
response:
Need Help?
If you’re having trouble with authentication contact our support team.