Authentication
SplitRoute API uses API key-based authentication for most endpoints. Some endpoints are available without authentication, while others require specific tiers of API keys.
API Key Authentication
To authenticate your requests, include your API key in the X-API-Key
header:
HTTP
1 X-API-Key: your_api_key_here
API Key Tiers
SplitRoute offers different API key tiers with varying rate limits and features:
Tier | Rate Limit | Features |
---|---|---|
No AUTH | 1000 requests/hour shared | All except custom dashboard |
FREE | 1000 requests/hour | Higher limits, Custom Dashboard |
BASIC | 2000 requests/hour individual | Higher limits, Custom Dashboard |
PRO | 5000 requests/hour individual | Higher limits, advanced features |
ENTERPRISE | 20000 | Custom limits, priority support |
Obtaining an API Key
Register for a Free API Key
You can register for a free API key using the following endpoint:
Endpoint: POST /api/v1/api-keys/register
Request Body:
JSON
1 { 2 "email": "[email protected]" 3 }
Response:
JSON
1 { 2 "api_key": "your_api_key", 3 "tier": "free", 4 "created_at": "2023-01-01T00:00:00Z", 5 "expires_at": null 6 }
Upgrade to a Paid Tier
To upgrade to a paid tier, use the following endpoint:
Endpoint: POST /api/v1/api-keys/purchase
Headers:
HTTP
1 X-API-Key: your_current_api_key
Request Body:
JSON
1 { 2 "tier": "pro", 3 "email": "[email protected]" 4 }
Response: An invoice object will be returned that you can pay to upgrade your API key.
Dashboard Authentication
The dashboard uses token-based authentication with email OTP (One-Time Password) verification:
- Initiate login with your email
- Receive OTP via email
- Verify OTP to receive an authentication token
- Use the authentication token for dashboard access
The authentication token is stored as a cookie and is valid for a limited time.