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:

EnvironmentKey PrefixHow to Use
Sandbox1ci_test_Use via the Sandbox Playground on your dashboard
Production — portal-issued key1ci_live_Server-side calls to https://portal.1checkin.com/api/corp/v1
Production — legacy Corp-issued keyCorp-issued credential shown in the dashboardServer-side calls to https://app.1check.in/corp_api/v1; do not send a portal key here
Sandbox vs Production

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

  1. Sign up and create a sandbox API key on your dashboard
  2. Test interactively using the Sandbox Playground to build and send API requests
  3. Go live by completing the go-live checklist (accept terms, set up billing, provide company details)
  4. 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.

Production API authentication
curl
curl -X GET "https://portal.1checkin.com/api/corp/v1/checkins" \
  -H "X-API-KEY: YOUR_PRODUCTION_API_KEY"

Example in Different Languages

Python (requests)
python
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())
JavaScript (fetch)
javascript
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);
Keep your API keys secure

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: ...}:

Portal-issued key: missing header
json
{
  "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.

Legacy Corp-issued key: 401 Unauthorized response
json
{
  "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 valueCauseSolution
Missing X-API-KEY headerNo X-API-KEY header on the requestAdd the X-API-KEY header.
Invalid key format. Use a sandbox key (1ci_test_...)Key prefix doesn't match expected sandbox/production formUse the correct key for the environment.
Invalid or revoked API keyKey isn't recognised or has been revokedRegenerate 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.
API Key Security Best Practices
  • 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:

PlanRate LimitBurst Limit
Sandbox100 requests/minute10 requests/second
Production1000 requests/minute50 requests/second

When you exceed the rate limit, you'll receive a 429 Too Many Requests response:

429 Rate limit response
json
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Please retry after 60 seconds.",
  "retry_after": 60
}

Next Steps