At Channex you are able to work with Channel Messages, it is an unified API to work with chat messages from Booking.com and Airbnb (only these 2 channels are supported currently).
The messages API has 2 parts - Booking Messages and Message Thread.
If you would like a quick start you can use the iframe feature to insert our chat interface into your PMS.
Add the chat app to the property, then the API and UI for chat will be available. Also chat will be available for that property on the Channex mobile app.
This error happened, when Property is not have installed Messages Application.
Not Supported
Status Code: 422 Unprocessable Entity
{"errors": {"code":"not_supported","title":"Method not supported" }}
This error happened, when Property connected to Messages Application, but original Booking OTA is not support Message API.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Messages list in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Booking.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking with provided ID is not present at system.
Forbidden Error
Method can return a Forbidden Error result with 403 Forbidden HTTP Code if Property, associated with requested Booking, is not connected to Messages Application.
Not Supported Error
Method can return a Not Supported Error result with 422 Unprocessable Entity HTTP Code if Booking with provided ID associated with OTA, which not support Messages API.
Send Message to Booking
Request:
POST https://staging.channex.io/api/v1/bookings/:booking_id/messages
This error happened, when Property is not have installed Messages Application.
Not Supported
Status Code: 422 Unprocessable Entity
{"errors": {"code":"not_supported","title":"Method not supported" }}
This error happened, when Property connected to Messages Application, but original Booking OTA is not support Message API.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Message in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Booking.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking with provided ID is not present at system.
Forbidden Error
Method can return a Forbidden Error result with 403 Forbidden HTTP Code if Property, associated with requested Booking, is not connected to Messages Application.
Not Supported Error
Method can return a Not Supported Error result with 422 Unprocessable Entity HTTP Code if Booking with provided ID associated with OTA, which not support Messages API.
Send Attachment to Booking
Before send attachment you should upload it to Channex side via Create Attachment method
Request:
POST https://staging.channex.io/api/v1/attachments
This error happened, when Property is not have installed Messages Application.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Message Threads list in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Booking.
Forbidden Error
Method can return a Forbidden Error result with 403 Forbidden HTTP Code if Property, associated with requested Booking, is not connected to Messages Application.
Get Message Thread by ID
Request:
GET https://staging.channex.io/api/v1/message_threads/:id
This error happened, when Property is not have installed Messages Application.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Message Thread in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Booking.
Forbidden Error
Method can return a Forbidden Error result with 403 Forbidden HTTP Code if Property, associated with requested Booking, is not connected to Messages Application.
Get Message for Message Thread
Request:
GET https://staging.channex.io/api/v1/message_threads/:id/messages
This error happened, when Property is not have installed Messages Application.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Messages associated with Message Thread in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Booking.
Forbidden Error
Method can return a Forbidden Error result with 403 Forbidden HTTP Code if Property, associated with requested Booking, is not connected to Messages Application.
Send Message to Message Thread
Request:
POST https://staging.channex.io/api/v1/message_threads/:id/messages
{"errors": {"code":"not_found","title":"Resouce Not Found" }}
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Message in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Message Thread.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Message Thread with provided ID is not present at system.
{"errors": {"code":"not_found","title":"Resouce Not Found" }}
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Message Thread in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Message Thread.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Message Thread with provided ID is not present at system.
Threads without bookings
Airbnb have use case called "Inquiry", when Guest request Host to create a Booking for specific dates and prices. This logic associated with Messages, because it is used as conversation mechanic between Guest and Host. As result, when Guest create Inquiry at Airbnb side, it will be represented as a Message Thread without associated booking at Channex side.