PMSs: How to connect to Beds24 and use Airbnb via API V2
This page explains how PMSs can develop API connectivity with Airbnb
Contents
1 Use case
You are a PMS, Property Management Company, or similar, and want to offer your customers connectivity with Airbnb via Beds24 without them having to log into Beds24.
Your developer develops the integration between your system and Beds24.
2 Overview
With an API based connectivity solution for Airbnb, logging in to Beds24 for setup and booking management is generally not required. Most actions and functions can be used via API. If required this function is available as white label option.
3 The Basics
It is a good idea to get a basic understanding of how Beds24 works.
We recommend going through this introduction and creating a test property with prices and any data you intend to use.
4 The API
4.1 API Versions
Beds24 has two API versions, V1 and V2, we recommend using V2 for any new projects.
Documentation for API V2 is available here.
There is also interactive Swagger documentation. We recommend using Swagger to try the examples in this guide.
4.2 API V2 Authentication
API V2 uses refresh tokens which generate access tokens, these tokens will be included as headers in your requests in this format: "token: {token}"
To obtain a refresh token, first go the API page in the control panel and click the generate invite code button. Select the scopes you require then click the generate invite code button. You will now see an invite code on this page, you can copy this to your clipboard and use the GET /authentication/setup endpoint to exchange your invite code for a refresh token.
Request:
curl -X 'GET' \ 'https://beds24.com/api/v2/authentication/setup' \ -H 'accept: application/json' \ -H 'code: abc123'
Response:
{ "token": "qEK5L...", "expiresIn": 86400, "refreshToken": "iexTC..." }
In the above example, "token" is a short term access token that you will use to authenticate other API calls, "expiresIn" is how many seconds the token will last, finally you can use "refreshToken" to generate more tokens in the future.
Try making an invite code and exchanging it for a refresh token yourself with our Swagger page
4.3 Importing Airbnb listings as Beds24 properties
If you already have Airbnb listings, you can import them to Beds24 using the API.
To import an Airbnb listing you can use the POST /channels/airbnb endpoint.
[ { "action": "importAsNewProperty", "airbnbUserId": "123456", "airbnbListingId": "789012", "connect": "full" } ]
4.4 Creating new properties in Beds24
You can create new properties in Beds24 using the POST /properties endpoint.
Try creating a very basic property with this request
[ { "name": "Luxury Hotel", "propertyType": "hotel", "currency": "USD" } ]
If successful, you should be able to see this new property in the control panel
In Swagger, try clicking the "schema" under POST /properties to see all the fields you can set using this endpoint.
Your property will also need a room, you can add a new room to an existing property through POST /properties. To do this you will need the id of the property you created above, you can find this in the response to the request above, but you can also find this by using the GET /properties endpoint.
Add a new room to an existing property (replace 1234567 with the id of your property)
[ { "id": 1234567, "roomTypes": [ { "name": "Standard room" } ] } ]
4.5 Mapping
To update your Airbnb listings they need to be mapped to the corresponding room in Beds24. You can connect your airbnb listing to a Beds24 room using the POST /channels/airbnb endpoint.
[ { "action": "connectToExistingRoom", "airbnbUserId": "123456", "airbnbListingId": "789012", "connect": "full", "roomId": 3456789 } ]
4.6 Bookings
Airbnb will send bookings to Beds24. You can either get them using the GET /bookings endpoint, have them sent to you via booking webhooks, or use a combination of the two.
4.7 Price and Availability Sync
Prices and availability can be updated using the POST /inventory/rooms/calendar endpoint. Try changing the price and minimum stay of a room:
[ { "roomId": 1234567, "calendar": [ { "from": "2025-01-01", "to": "2025-01-31", "minStay": 2, "price1": 150, } ] } ]
You can visit the calendar page in the control panel to see these changes, or you can use the GET /inventory/rooms/calendar endpoint.
As always, you can click the schema button in the Swagger endpoint to see what else you can change this way.
4.8 Messaging
Beds24 integrates with Airbnb's messaging API. If you wish you can message with guests via the POST /bookings/messages endpoint, or see existing messages using the GET /bookings/messages endpoint.
4.9 Reviews
You can read Airbnb reviews using the GET /channels/airbnb/reviews endpoint.
4.10 Airbnb listing data
You can read your Airbnb listing data using the GET /channels/airbnb/listings endpoint.
4.11 Airbnb user data
You can read your Airbnb user data using the GET /channels/airbnb/users endpoint.