Articles on: Integrations

How can I generate and use an API key with Hosthub?

How can I generate and use an API key with Hosthub?


Introduction


Hosthub allows users to integrate with external systems using its API. To facilitate this, you need an API key for accessing the API. Here’s a comprehensive guide to help you understand how to generate and use an API key in Hosthub.


The API also provides robust integration capabilities, supporting platforms such as Webflow, allowing seamless data exchange and synchronization.


Steps to Generate an API Key


Follow these instructions to create your API key for Hosthub:


Log in to your Hosthub account. Navigate to the Settings section, located in the sidebar menu. Scroll to the bottom of the page, below the "Team Management" section, until you find the API Keys section. Click on the "Create API key" option to generate a new key. If prompted, ensure this feature is enabled for your account.


Troubleshooting API Key Access


If the API Keys section is not visible in your account settings, it may indicate that the feature has not been activated for your account. Contact Hosthub support to resolve this.


Additionally, keep your API key private and secure to prevent unauthorized access. Avoid embedding it directly into frontend applications.


Using the API and Documentation


Once you have your API key, you can use it to integrate with external systems. The Hosthub API allows registered users to exchange data about users, rentals, and bookings. To get started with the API, access the API documentation at https://www.hosthub.com/docs/api/, which provides detailed instructions and use cases for integration. You can also download the API YAML file from the documentation front page.


API Base URL and Authentication


The API base URL uses a dated version path. For example, to fetch calendar events for a rental:


GET https://app.hosthub.com/api/2019-03-01/rentals/{rentalId}/calendar-events


Authentication is done via an Authorization header containing your API key directly (no "Bearer" prefix or other scheme):


Authorization: <your-api-key>


Working with Rentals and Bookings


To create bookings or retrieve rental data, first use the API to fetch your rentals and obtain their encodedIds (Rental IDs). Use these IDs when creating or syncing bookings. The API supports automating booking flows, such as creating a reservation with guest name, email, phone number, check-in/check-out dates, and reservation amount after a guest completes payment on your own website. This is the API equivalent of creating an offline reservation.


Conclusion


By following these steps, you can generate your API key and explore the opportunities provided by the Hosthub API. Refer to the documentation for details on leveraging the API to its fullest extent. If you encounter any issues, don't hesitate to reach out to Hosthub support.

Updated on: 22/07/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!