Get started

Authentication

API keys, scopes, expiry, and IP allowlists.

API-key header

HTTP
GET /v1/trains/12656 HTTP/1.1
Host: ir.railcore.tech
X-RailCore-Key: rk_live_your_key_here

Keys are opaque values with at least 24 characters. Do not place them in browser bundles, URLs, logs, public repositories, mobile apps, or support messages.

Send the key in X-RailCore-Key, or as Authorization: Bearer <key>, or in X-Api-Key. Use one header: two headers with different keys answer 401 AMBIGUOUS_API_KEY. The other two headers carry the same key:

Alternatives
Authorization: Bearer rk_live_your_key_here
X-Api-Key: rk_live_your_key_here

Growth, Scale and Enterprise keys must also sign every request with HMAC-SHA256, sending X-RailCore-Timestamp, X-RailCore-Nonce and X-RailCore-Signature. Free and Starter keys send the key alone. The signature does not cover the key, so it verifies the same whichever header carries it. How to sign a request.

Scopes

Issue a separate least-privilege key for each integration and environment. All keys on an account share its rate limits and monthly requests.

Scope, Access table
ScopeAccess
stations:readStation search and static station details
trains:readTrain search and static train details
schedule:readSchedules, stops, routes, and coach positions
live:readLive station boards and live train status
journeys:readRoute discovery, journey search, and comparison
availability:readSeat availability, calendars, and classes
fares:readReserved and unreserved fares
charts:readChart, vacancy, and job-result reads
charts:writeSubmit and cancel premium analysis jobs

Plan security controls

Control, Free, Starter, Growth, Scale, Enterprise table
ControlFreeStarterGrowthScaleEnterprise
API-key headerYesYesYesYesYes
IPv4 and IPv6 allowlistNoNoOptionalOptionalOptional
HMAC signingNoNoRequiredRequiredRequired
Premium chart scopesNoNoNoYesYes

IP allowlists

Growth, Scale and Enterprise keys can restrict requests to fixed egress CIDR blocks.

CIDR examples
203.0.113.42/32
203.0.113.0/24
2001:db8:abcd::/48

IPv4 prefixes may be /8 to /32. IPv6 prefixes may be /48 to /128. Allowlist the public NAT or proxy address that reaches RailCore.

Lifecycle

Expiration

Keys do not expire by default. Add expires_at for temporary integrations.

Rotation

Rotation creates a replacement secret and revokes the previous credential.

Revocation

Dashboard revocation is immediate and propagates in under a second.

HMAC mode

Growth, Scale and Enterprise keys must sign every request and come with a one-time signing secret. A key issued before November 3, 2026 has no secret: rotate it to get one.

Last updated