Overview
This article explains how you can give Claude access to Hostaway data — such as reservations, listings, or guest messages — using the Hostaway Public API together with the Claude Developer Platform (Anthropic's API). This is intended for technical users building a custom integration, not for connecting Hostaway through a no-code tool.
Before starting, make sure you have generated your Hostaway API credentials as described in Hostaway Public API - Account & Secret Key.
Prerequisites
- A Hostaway account with the Public API enabled and admin-level access.
- Your Hostaway Account ID and Secret Key (see the article linked above).
- An Anthropic account with access to the Claude Developer Platform and an API key (created at console.anthropic.com).
- A backend environment to run the integration code (e.g., Python or Node.js). This is not a browser-only setup — some custom code is required.
Step 1: Generate a Hostaway Access Token
Your Account ID and Secret Key are not used directly to call the API — they are used to request an access token via OAuth2 client credentials.
- Send a POST request to the Hostaway token endpoint using your Account ID as client_id and your Secret Key as client_secret.
- Hostaway returns a Bearer access token, valid for up to 24 months.
- Store this token securely (e.g., in an environment variable or secrets manager) — never hardcode it or expose it client-side.
Documentation: https://api.hostaway.com/documentation#authentication
Step 2: Create an Anthropic API Key
- Log in to the Claude Developer Platform console
- Navigate to API Keys and create a new key.
- Store this key securely alongside your Hostaway access token.
Step 3: Define Hostaway as a Tool for Claude
Claude connects to external systems like Hostaway through tool use (function calling): you describe the available actions (e.g., "get reservations", "get listing details") to Claude, and your backend executes the actual Hostaway API call when Claude requests it.
- In your backend code, define a tool schema describing what Claude can ask for — for example, a get_reservations tool that accepts a date range and listing ID.
- When you call the Claude API (/v1/messages), include this tool definition in the request.
- When Claude decides it needs Hostaway data, it will return a tool-use request instead of a final answer.
- Your backend then calls the corresponding Hostaway API endpoint using the Bearer access token from Step 1, and sends the result back to Claude as a tool result.
- Claude uses that result to continue the conversation and produce a final response.
Step 4: Test the Connection
- Send a test prompt that requires Hostaway data (e.g., "What reservations do we have this week for listing X?").
- Confirm Claude correctly triggers the tool, your backend calls Hostaway successfully, and Claude returns an accurate answer.
- Check your backend logs to confirm the Hostaway API call returned a 200 response.
Keep Claude Read-Only and Add Human Approval
Your Hostaway API key gives full access to your account. It can’t be limited to read-only, so the limits come from the tools you give Claude.
- Start with read-only tools, such as getting reservations, listings, or calendar availability. Claude can then answer questions without changing anything in your account.
- If you add tools that change data, such as sending guest messages, creating, updating or cancelling reservations, or changing prices, don’t let them run automatically. Show the proposed action to a person and run it only after they approve it.
- Give Claude only the tools it needs for your use case, and test new tools on a test listing first.
Maintenance and Security
- Hostaway access tokens are valid for up to 24 months. Renew the token before it expires, or generate a new API key from Settings > Hostaway API if renewal fails.
- Never share your Secret Key, access token, or Anthropic API key in client-side code, public repositories, or chat.
- If a key or token is compromised, revoke it immediately from Settings > Hostaway API and generate new credentials.