Beds24 Messages API

Guest and channel messages attached to bookings.

OpenAPI Specification

beds24-messages-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Beds24 API V2 Accounts Messages API
  description: 'The Beds24 API V2 lets you read, create, and alter data across almost all aspects of a Beds24 account, including properties, room inventory, bookings, prices, invoices, channels, and account settings. Beds24 is a vacation rental and hotel channel manager, property management system, and booking engine.

    Base URL is https://api.beds24.com/v2. Authentication uses expiring access tokens that are generated from a refresh token (or a read-only long-life token) obtained via the /authentication endpoints; the token is sent in the "token" request header. Every category except /authentication requires a matching scope. Usage is governed by an account-level credit limit over a rolling 5-minute window, reported via the x-five-min-limit-remaining, x-five-min-limit-resets-in, and x-request-cost response headers.

    This document models the public V2 surface from Beds24''s Swagger UI (https://api.beds24.com/v2/) and wiki. Endpoint shapes marked as modeled are grounded in the published documentation but were not byte-verified against the live Swagger JSON, which requires an authenticated token to retrieve.'
  version: '2.0'
  contact:
    name: Beds24
    url: https://beds24.com
  license:
    name: Proprietary
    url: https://beds24.com/terms.html
servers:
- url: https://api.beds24.com/v2
  description: Beds24 API V2 production
security:
- tokenAuth: []
tags:
- name: Messages
  description: Guest and channel messages attached to bookings.
paths:
  /bookings/messages:
    get:
      operationId: getBookingMessages
      tags:
      - Messages
      summary: Get booking messages
      description: Returns guest and channel messages for the specified bookings.
      parameters:
      - name: bookingId
        in: query
        schema:
          type: integer
      - name: maxAge
        in: query
        schema:
          type: integer
        description: Only messages newer than N seconds.
      responses:
        '200':
          description: A list of messages.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: postBookingMessages
      tags:
      - Messages
      summary: Post booking messages
      description: Posts a guest or channel message to one or more bookings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/MessageWrite'
      responses:
        '200':
          description: Message write results.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Success'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: integer
          example: 401
        error:
          type: string
          example: Token is missing
    MessageWrite:
      type: object
      properties:
        bookingId:
          type: integer
        message:
          type: string
    Success:
      type: object
      properties:
        success:
          type: boolean
        new:
          type: object
          additionalProperties: true
        modified:
          type: object
          additionalProperties: true
        warnings:
          type: array
          items:
            type: string
    Message:
      type: object
      properties:
        id:
          type: integer
        bookingId:
          type: integer
        source:
          type: string
        read:
          type: boolean
        time:
          type: string
          format: date-time
        message:
          type: string
  responses:
    Unauthorized:
      description: The token is missing, invalid, expired, or lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: token
      description: Short-lived access token generated from a refresh token via the /authentication endpoints, sent in the "token" request header.