message_not_sent

The channel refused the message and nothing reached the guest. `statusReason` carries the channel's own words.

HTTP 422The request was understood but refused as sent. Change it before retrying.

When it fires

The message passed Repull's checks and was handed to the channel, and the channel refused it. Nothing reached the guest. statusReasoncarries the channel's own words. The common causes:

  • The text contains a link, an email address or a phone number that Airbnb or Booking.com will not deliver, and it makes up most of the message. (When the offending part can simply be removed, the rest is delivered instead, and the success response says so with contentRewritten: true.)
  • A file sent in an Airbnb conversation that has no booking yet. Airbnb does not allow attachments before a guest books.

It comes from POST /v1/conversations/{id}/messages and, for sends with mediaUrl, from POST /v1/channels/airbnb/messaging/{threadId}/messages.

Response shape

Every Repull error follows the same envelope. The code is stable and safe to switch on.

{
  "error": {
    "code": "message_not_sent",
    "message": "Airbnb refused the message",
    "fix": "Airbnb and Booking.com refuse guest messages containing links, email addresses or phone numbers. Remove them and send again. `statusReason` carries the channel's verbatim refusal.",
    "docs_url": "https://repull.dev/docs/errors/message_not_sent",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
    "channel": "airbnb",
    "messageId": "1847915",
    "status": "failed",
    "statusReason": "<the channel's own refusal>"
  }
}

How to fix

  1. Read `statusReason`: it is the channel's reason, word for word.
  2. Remove links, email addresses and phone numbers from the text, or rephrase so the message still stands without them.
  3. For a file in an Airbnb conversation with no booking yet, wait until the guest books, or describe it in text for now.
  4. Send the corrected message with a new `Idempotency-Key`.

Examples

curl

curl -X POST https://api.repull.dev/v1/conversations/164743/messages \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Check-in is from 16:00. The door code will be in your booking details."}'

TypeScript

const res = await fetch('https://api.repull.dev/v1/conversations/164743/messages', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.REPULL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ message }),
})

if (res.status === 422) {
  const { error } = await res.json()
  if (error.code === 'message_not_sent') {
    // Nothing reached the guest; show the channel's own reason
    throw new Error(`${error.channel} refused the message: ${error.statusReason ?? error.message}`)
  }
}

If you're an AI agent

The channel refused the message and nothing reached the guest. Read statusReason, remove links/emails/phone numbers (or drop files from a pre-booking Airbnb thread), and send the corrected message with a new Idempotency-Key.

Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.

AI