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
1X-API-Key: your_api_key_here

API Key Tiers

SplitRoute offers different API key tiers with varying rate limits and features:

TierRate LimitFeatures
No AUTH1000 requests/hour sharedAll except custom dashboard
FREE1000 requests/hourHigher limits, Custom Dashboard
BASIC2000 requests/hour individualHigher limits, Custom Dashboard
PRO5000 requests/hour individualHigher limits, advanced features
ENTERPRISE20000Custom 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
1X-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:

  1. Initiate login with your email
  2. Receive OTP via email
  3. Verify OTP to receive an authentication token
  4. Use the authentication token for dashboard access

The authentication token is stored as a cookie and is valid for a limited time.