API Keys
The Infinipost API uses API keys to authenticate requests. You can generate and manage your API keys from the Infinipost dashboard.Obtaining Your API Key
- Navigate to Settings → API Keys in your dashboard
- Click Generate New API Key
- Give your key a descriptive name (e.g., “Production Server”)
- Copy the key immediately (it won’t be shown again)
Using Your API Key
Include your API key in theAuthorization header of every request:
Example Request
API Key Types
Infinipost provides two types of API keys:Test Keys
Start with
sk_test_- Use for development and testing
- No charges incurred
- Limited to 10 accounts
Live Keys
Start with
sk_live_- Use for production
- Full access to all features
- Standard billing applies
Best Practices
Store Keys Securely
Use environment variables instead of hardcoding:Rotate Keys Regularly
- Generate a new key in the dashboard
- Update your application to use the new key
- Delete the old key once confirmed working
Use Separate Keys per Environment
Create different keys for different environments:Production API Key→ Production serverStaging API Key→ Staging serverDevelopment API Key→ Local development
Error Responses
Missing API Key
401 Unauthorized
Invalid API Key
401 Unauthorized
Expired API Key
401 Unauthorized