Authentication

Authenticate to the API

Use an API key passed via the X-API-Key HTTP header to authenticate every request.

  • Header: X-API-Key: YOUR_API_KEY

  • Base path: Https://api.okup.ai/data/...

Getting an API key

  • Request access from OkupAI support or your account manager.

  • Keys are shown only once when created; store them securely. If lost, mint a new key and revoke the old one.

Send your key in requests

Use the X-API-Key header on every call.

curl -sS \
  -H 'X-API-Key: YOUR_API_KEY' \
  'Https://api.okup.ai/data/bookings?from=2025-01-01&to=2025-01-31&limit=2'

Example JSON response (truncated):

{
  "total": 42,
  "limit": 2,
  "offset": 0,
  "items": [
    {
      "internal_booking_id": "b3d1…",
      "booking_id": "123456789",
      "platform": "airbnb",
      "friendly_name": "Main Apartment",
      "listing_id": "987654",
      "booking_date": "2025-01-02",
      "reservation_start": "2025-01-10",
      "reservation_end": "2025-01-12",
      "status": "confirmed",
      "guest_name": "Jane Doe",
      "currency": "EUR"
    }
  ]
}

Authorization and data scope

  • Your key is tied to your account and client access.

  • Responses are automatically filtered to the units you’re allowed to access.

  • If you currently have no unit access, list endpoints return an empty items array and total: 0.

Error codes

  • 401 Unauthorized: Missing X-API-Key header.

  • 403 Forbidden: Invalid API key or verification failed.

Last updated