Skip to main content

Authentication

All API requests require authentication with your secret key, included in the Authorization header. Requests must also include a service-identifying header. Missing either will result in a 401 or 400 response.

Base URL

https://api.hyperrails.io/api/v1 There is a single base URL for both test and live mode — the key prefix (sk_test_ vs sk_live_) determines which environment your request runs against, not the URL.

API Key Management

HyperRails issues three distinct credential types from Dashboard → Credentials → API Keys. Each has a separate value for test and live mode.

Required Headers

Every request must include:

Authentication Process

  • HTTPS is mandatory. Requests over plain HTTP are rejected.
  • Test vs. live mode is determined entirely by which secret key prefix you use — sk_test_ keys only affect test-mode data, sk_live_ keys only affect live data.
  • Authentication failure returns 401 Unauthorized.
  • Missing x-service-source returns 400 Bad Request.

Rotating Keys

You can regenerate any key from Dashboard → Credentials → API Keys → Generate new key. Regenerating a key immediately invalidates the previous one — update all integrations before rotating in production. By following these guidelines, you can ensure secure and authorized access while integrating with HyperRails’s APIs.