API Key Authentication
Generating API Keys
- Dashboard
- API
- Navigate to Settings → API Keys
- Click Generate API Key
- Provide a descriptive name (e.g., “Production Agent”, “Dev Environment”)
- Copy and securely store the key (shown only once)
API Key Format
RebelFi API keys follow this format:rfk_test_xxxxxxxxxxx- Test/development keyrfk_live_xxxxxxxxxxx- Production key
Using API Keys
Include the API key in thex-api-key header:
SDK Authentication
When using the TypeScript SDK:Security Best Practices
API Key Management
Secure Storage
Secure Storage
DO:
- Store in environment variables
- Use secrets management (AWS Secrets Manager, HashiCorp Vault, Azure Key Vault)
- Encrypt at rest
- Commit to version control
- Store in code or configuration files
- Share via email or chat
- Log in plain text
Key Rotation
Key Rotation
Rotate API keys regularly:
- Generate new API key
- Deploy new key to production (blue/green deployment)
- Verify new key works
- Revoke old key
- Update documentation
Separate Keys Per Environment
Separate Keys Per Environment
Use different API keys for each environment:
- Development:
rfk_test_dev_xxx - Staging:
rfk_test_staging_xxx - Production:
rfk_live_prod_xxx
Rate Limiting
RebelFi enforces rate limits per API key:| Endpoint Type | Limit |
|---|---|
| Read (GET) | 100 requests/minute |
| Write (POST) | 20 requests/minute |
Handling Rate Limits
When rate limited, you’ll receive a429 status with RATE_LIMIT_EXCEEDED error code.
Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Cause: Valid credentials but insufficient permissionsSolution:
- Check API key has required permissions
- Verify resource belongs to your organization
429 Rate Limit Exceeded
429 Rate Limit Exceeded
Cause: Too many requests in time windowSolution:
- Implement exponential backoff
- Reduce request frequency
- Contact support for higher limits if needed