Overview
The Structify API uses API keys for authentication. You must include your API key in theAuthorization
header of every request.
Obtaining an API Key
- Sign in to Structify Dashboard
- Navigate to Settings → API Keys
- Click Create New Key
- Give your key a descriptive name
- Copy the key immediately - it won’t be shown again
Using Your API Key
Include the API key in theAuthorization
header as a Bearer token:
Environment Variables
We recommend using environment variables to manage API keys:Security Best Practices
Never commit API keys to version control. Add them to
.gitignore
:Key Rotation
Regularly rotate your API keys:- Create a new API key
- Update your applications to use the new key
- Verify everything works
- Delete the old key
Key Scopes
Create separate keys for different environments:dev-key
- Local developmentstaging-key
- Staging environmentprod-key
- Production only
IP Restrictions
For production keys, consider adding IP restrictions:Rate Limits
API keys have the following rate limits:Plan | Requests/min | Burst |
---|---|---|
Free | 60 | 100 |
Pro | 600 | 1000 |
Enterprise | Custom | Custom |
429 Too Many Requests
response:
JWT to API Token Exchange
For web applications using Supabase authentication, you can exchange a JWT for an API token:Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Your API key doesn’t have permission for this operation. Check:
- Key scopes and permissions
- Team membership for team resources
- Project access for project resources
Environment variable not working
Environment variable not working
Ensure the variable is exported:In Python, verify it’s loaded: