Skip to content
ajar.Get started

Message send

booking.message.send

View connector

Send a message to a booked property

POST /v1/operations/booking.message.send

Headers

Authorization: Bearer YOUR_CONNECTOR_TOKEN
x-booking-token: YOUR_BOOKING_TOKEN
x-idempotency-key: YOUR_UNIQUE_ATTEMPT_KEY
Content-Type: application/json

x-idempotency-key identifies one intended action. Generate a unique value, such as crypto.randomUUID(), before sending it. Use 1–128 letters, numbers, hyphens, underscores or periods. A duplicate attempt is rejected; it does not return a cached success. If a request times out, check the provider’s state before starting a new attempt with a new key. See the idempotency guide.

Use your connector bearer token and caller-held guest token in x-booking-token.

Inputs

ParameterExample typeExample value
thread_refstring"fictional-thread-ref"
textstring"Hello, could you confirm the check-in time?"
confirm_sendbooleantrue

Example input

{
  "thread_ref": "fictional-thread-ref",
  "text": "Hello, could you confirm the check-in time?",
  "confirm_send": true
}
Open JSON schema

Input schema

{
  "$id": "https://useajar.com/schemas/booking/message-send.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "confirm_send": {
      "const": true
    },
    "text": {
      "maxLength": 5000,
      "minLength": 1,
      "type": "string"
    },
    "thread_ref": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "thread_ref",
    "text",
    "confirm_send"
  ],
  "type": "object"
}