Authentication
All programmatic API access to Bridgfy requires authentication using API keys. This page explains how to authenticate your requests and manage your API keys.API Key Authentication
API keys are the primary method for programmatic access to the Bridgfy API. They are scoped to your Organization and can be created and managed through the Dashboard.Using API Keys
Include your API key in thex-api-key header of every request:
Example with cURL
Example with JavaScript
Example with Python
Creating API Keys
API keys are created through the Bridgfy Dashboard:- Sign in to https://dashboard.bridgfy.com
- Select your Organization from the organization switcher
- Navigate to “API Keys” section
- Click “Create API Key”
-
Configure your key settings:
- Label: Descriptive name for the key
- Protocol Fee: Fee percentage in basis points (e.g., 50 = 0.5%)
- Gas Sponsorship: Whether Bridgfy covers gas costs
- Copy the generated API key immediately (it won’t be shown again)
API Key Scope
API keys are scoped to your Organization, which means:- All executions created with a key are tracked to that Organization
- Usage metrics and billing are aggregated per Organization
- Team members in the Organization can view (but not access) key metadata
- Keys can be revoked from the Dashboard at any time
Fee Configuration
Each API key has its own fee configuration: Protocol Fee (protocolFeeBps):
- Set in basis points (1 bps = 0.01%)
- Range: 0-1000 (0% to 10%)
- Example: 50 bps = 0.5% fee
- Deducted from deposits before bridging
- Snapshotted onto Deposit Intents at creation
sponsoredGas):
true: Bridgfy pays all gas costs (better UX)false: Gas deducted from user deposit (cost control)- Snapshotted onto Deposit Intents at creation
Security Best Practices
Storage
DO:- Store API keys in environment variables
- Use secrets management systems (AWS Secrets Manager, HashiCorp Vault, etc.)
- Rotate keys periodically
- Use different keys for development, staging, and production
- Hardcode API keys in source code
- Commit keys to version control
- Share keys via email or messaging apps
- Use production keys in client-side code
Key Management
Rotation:- Create a new API key in the Dashboard
- Update your application to use the new key
- Verify the new key works in production
- Revoke the old key
- Immediately revoke the compromised key in the Dashboard
- Create a new API key
- Update your application
- Review recent execution logs for suspicious activity
Rate Limiting
API keys may be subject to rate limits based on your Organization’s plan:- Requests per second: Limits vary by endpoint
- Monthly executions: May be limited based on your plan
- Quota exceeded: Results in
QUOTA_EXCEEDEDstatus
Error Responses
Invalid API Key
Status:401 Unauthorized
- API key doesn’t exist
- API key has been revoked
- API key is malformed
Missing API Key
Status:401 Unauthorized
x-api-keyheader not included in request
x-api-key header to your request.
Insufficient Permissions
Status:403 Forbidden
- API key role doesn’t have required permissions for the endpoint
CLIENT role. Only CLIENT keys can access integration endpoints.
Quota Exceeded
Status:429 Too Many Requests
- Organization has exceeded monthly execution limit
- Rate limit exceeded
Testing
Health Check Endpoint
Test API connectivity without authentication:Next Steps
- Create your first Deposit Intent
- Learn about Routing and Simulation
- Review Executions to track transaction status