Authentication
The 1Checkin API uses API keys to authenticate requests. You can view and manage your API keys in the API Keys section of your dashboard.
How Authentication Works
1Checkin uses two environments with different authentication approaches:
| Environment | Key Prefix | How to Use |
|---|---|---|
| Sandbox | 1ci_test_ | Use via the Sandbox Playground on your dashboard |
| Production — portal-issued key | 1ci_live_ | Server-side calls to https://portal.1checkin.com/api/corp/v1 |
| Production — legacy Corp-issued key | Corp-issued credential shown in the dashboard | Server-side calls to https://app.1check.in/corp_api/v1; do not send a portal key here |
Sandbox keys are designed for interactive testing through the portal's Sandbox Playground. They work through the portal's proxy, which handles CORS and authentication transparently. The playground uses the documented production request schema, so code you develop from the playground examples carries over to production with a URL and key change. The sandbox simulates airline responses and validates the documented required fields rather than the full production rule set, so treat a sandbox success as a well-formed request, not as a production guarantee.
The Developer Journey
- Sign up and create a sandbox API key on your dashboard
- Test interactively using the Sandbox Playground to build and send API requests
- Go live by completing the go-live checklist (accept terms, set up billing, provide company details)
- Get production keys and integrate directly with the production API
Production API Authentication
Include your Production API Key in the X-API-KEY header with every request. Your Production API Key is the credential shown in /dashboard/keys under Production API Key. These examples use a portal-issued key starting with 1ci_live_ and its matching base URL.
curl -X GET "https://portal.1checkin.com/api/corp/v1/checkins" \
-H "X-API-KEY: YOUR_PRODUCTION_API_KEY"Example in Different Languages
import requests
API_KEY = class="token-string">"YOUR_PRODUCTION_API_KEY"
BASE_URL = class="token-string">"https://portal.1checkin.com/api/corp/v1"
headers = {
class="token-string">"X-API-KEY": API_KEY,
class="token-string">"Content-Type": class="token-string">"application/json"
}
response = requests.get(fclass="token-string">"{BASE_URL}/checkins", headers=headers)
print(response.json())const API_KEY = class="token-string">"YOUR_PRODUCTION_API_KEY";
const BASE_URL = class="token-string">"https:class="token-commentclass="token-string">">//portal.1checkin.com/api/corp/v1";
const response = await fetch(class="token-string">`${BASE_URL}/checkins`, {
method: class="token-string">"GET",
headers: {
class="token-string">"X-API-KEY": API_KEY,
class="token-string">"Content-Type": class="token-string">"application/json"
}
});
const data = await response.json();
console.log(data);Treat your API keys like passwords. Never share them in public repositories, client-side code, or insecure locations.
Authentication Errors
If your API key is missing, invalid, or revoked, you'll receive a 401 Unauthorized response. The portal endpoint returns its own authentication errors as {detail: ...}:
{
"detail": "Missing X-API-KEY header"
}Legacy direct Corp authentication errors use error and message instead. Errors returned by the upstream API retain their original response shape. Check the HTTP status first; do not require one envelope for every endpoint.
{
"error": "unauthorized",
"message": "Missing X-API-KEY header"
}In the legacy Corp authentication envelope, error is "unauthorized". The message field varies and tells you which condition tripped. The portal may put the corresponding explanation in detail:
message value | Cause | Solution |
|---|---|---|
Missing X-API-KEY header | No X-API-KEY header on the request | Add the X-API-KEY header. |
Invalid key format. Use a sandbox key (1ci_test_...) | Key prefix doesn't match expected sandbox/production form | Use the correct key for the environment. |
Invalid or revoked API key | Key isn't recognised or has been revoked | Regenerate from the dashboard. |
Managing API Keys
You can manage your API keys from the dashboard:
- Generate sandbox keys for interactive testing in the playground
- View production keys after completing the go-live process
- Revoke keys to disable a compromised key in the Portal. The upstream credential may still authenticate against the check-in API until it expires; contact support if you need immediate upstream revocation.
- Store keys in environment variables, not in code
- Rotate keys periodically by creating a new Production API Key and migrating your integration, then revoking the old key in the Portal
- If a key is compromised: rotate to a new key immediately, revoke the compromised key in the Portal, and contact support so we can fully revoke it upstream
- Never expose keys in client-side JavaScript
Rate Limiting
API requests are rate limited to ensure fair usage:
| Plan | Rate Limit | Burst Limit |
|---|---|---|
| Sandbox | 100 requests/minute | 10 requests/second |
| Production | 1000 requests/minute | 50 requests/second |
When you exceed the rate limit, you'll receive a 429 Too Many Requests response:
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Please retry after 60 seconds.",
"retry_after": 60
}