Getting Started with the Xeni Activities APIHow to Book an ActivityHow to Browse Activity Tags and CategoriesHow to Cancel an Activity BookingHow to Check Activity AvailabilityHow to Get Activity DetailsHow to Retrieve Activity Booking DetailsHow to Search for Activities with FiltersHow to Search for Activity DestinationsCar Rental API - Getting StartedCar Rental API - Understanding Response FieldsHow to Book a Car RentalHow to Get Rental Car Details and Equipment Add-OnsHow to Retrieve or Cancel a Car Rental BookingHow to Search for Available Rental CarsHow to Search for Pickup LocationsHow to Use Car Rental Search FiltersDeals API Best Practices for IntegrationDeals API Frequently Asked QuestionsGetting Started with the Xeni Deals APIDeals API Request Parameters and Headers ReferenceDeals API Supported Currencies and LocalizationHow to Display Deals in Your ApplicationHow to Fetch Hotel Deals by LocationFlights API Error Codes and TroubleshootingGetting Started with the Xeni Flights APIHow to Book a FlightHow to Check Flight Availability and PricingHow to Confirm or Cancel a Flight BookingHow to Retrieve Fare Rules for a FlightHow to Retrieve Flight Booking DetailsHow to Search for Airports Using AutocompleteHow to Search for FlightsHow to Use Flight Search Filters, Sorting, and PaginationHow to Check Room Availability and PricingHow to Filter Vacation Rental ResultsHow to Get Resort Property Details, Amenities, and AccessibilityHow to Hold and Confirm a Resort BookingHow to Release a Resort HoldHow to Retrieve Resort Booking DetailsHow to Search for Available ResortsHow to Search for Resort DestinationsHow to Search for Vacation Rental LocationsHow to Search for Vacation RentalsHow to Use Resort Search Filters and SortingGetting Started with the Xeni Resorts APIResorts API: Understanding Booking Statuses and PoliciesGetting Started with the Vacation Rentals APIVacation Rentals Frequently Asked QuestionsVacation Rentals Supported Property TypesUnderstanding Async Search for Vacation RentalsAuthentication & API SignaturesBooking Hotels — Direct API & SSO CheckoutError Handling, Rate Limits & Best PracticesGetting Started with the Xeni Hotels APIManaging Bookings: Status, Retrieval & CancellationPricing Confirmation & Token LifecycleRetrieving Hotel Details & Room AvailabilitySearching for Hotels: Locations, Filters & PaginationSearching for HotelsSession Management & Correlation IDsAPI authentication and getting your API keys

API authentication and getting your API keys

Last updated: 2026-02-12

Overview

The Xeni API uses API key-based authentication. Every request must include a valid access token in the Authorization header. Xeni provides separate sandbox and production environments so you can develop and test without affecting live bookings.

Getting Your API Keys

  1. Navigate to Settings → API Keys in your Xeni dashboard
  2. You'll see two key pairs:
- Sandbox — For development and testing (no real charges) - Production — For live bookings (real inventory and payments)
  1. Each key pair consists of an API Key (public) and an API Secret (private)

Warning

Never expose your API Secret in client-side code, public repositories, or logs. Store it securely using environment variables or a secrets manager.

Authenticating Requests

Step 1: Get an Access Token

Exchange your API key and secret for a short-lived access token:

BASH
curl -X POST https://api.xeni.com/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "xenisksandboxabc123",
    "secret": "yourapisecret"
  }'

Response:

JSON
{
  "access_token": "eyJhbGciOiJSUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Step 2: Use the Token

Include the token in all subsequent API requests:

BASH
curl -X GET https://api.xeni.com/v1/hotels/search \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{"destination": "NYC", "check_in": "2026-04-01"}'

Rate Limits

EnvironmentRequests/minRequests/day
Sandbox6010,000
Production300100,000
When you exceed the rate limit, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

Tip

Use the X-RateLimit-Remaining header in responses to monitor your usage and implement backoff logic before hitting the limit.

Sandbox vs. Production

FeatureSandboxProduction
Real inventoryNo (mock data)Yes
Real paymentsNoYes
WebhooksTest events onlyReal events
Base URLsandbox.api.xeni.comapi.xeni.com

Postman Collection

Download our Postman collection to explore the API interactively. Import it into Postman, set your sandbox API key as an environment variable, and start making test requests immediately.

Next Steps

Was this article helpful?