你的产品能得到什么
说什么由你的模型决定。Repull 负责把消息送到模型,把回答送到房客。
每条新的房客消息都有一条带签名的 webhook,附带会话 id、渠道、订单和正文。
会话历史、包含日期、房客和入住条款的订单,以及房源信息,各一次调用即可获取。
渠道改写消息时(Airbnb 会去掉链接和电话号码),响应会准确告诉你房客最终收到了什么。
工作原理
订阅房客消息,查找上下文,让模型写回复,然后发送。用事件 id 作为幂等键,即使 webhook 重试也不会重复发送。
reservation.message.received 带签名送达,附带 threadId 和 reservationId。
获取会话历史和订单,再加上你自己的知识库。
POST 回复。Repull 把它发到房客所在的渠道,并记录在会话中。
// api(): fetch on api.repull.dev with your API key
// Subscribed to reservation.message.received
export async function POST(req: Request) {
const event = await req.json() // verify X-Repull-Signature first
if (event.event !== 'reservation.message.received') return new Response(null)
const { threadId, reservationId, body } = event.data
// Context: the thread so far and the booking it belongs to
const history = await api(`/v1/conversations/${threadId}/messages?order=asc`)
const booking = reservationId ? await api(`/v1/reservations/${reservationId}`) : null
const reply = await yourModel.answer({ question: body, history, booking })
const sent = await api(`/v1/conversations/${threadId}/messages`, {
method: 'POST',
headers: { 'Idempotency-Key': event.eventId },
body: JSON.stringify({ message: reply }),
})
// Airbnb strips links and phone numbers — check what the guest actually got
if (sent.contentRewritten) log('delivered as', sent.deliveredContent)
return new Response(null)
}渠道覆盖
覆盖范围以线上 API 实际为准。 完整的渠道与 PMS 覆盖范围
与任意 PMS 并行使用
在 Airbnb 和 Vrbo 上,Repull 以消息级权限连接。房东的 PMS 继续管理房源和日历,你的产品永远不会和它抢控制权。
测试版(beta):读取 Booking.com 的订单、消息和评价,房东不用把连接服务商从 PMS 换走。
无论房客在 Airbnb、Booking.com 还是 Vrbo 上预订,接口和 webhook 事件都一样。只需开发一次。
背后的 API
reservation.message.receivedWebhook:一条新的房客消息,附带会话、订单和渠道。
GET /v1/conversations/{id}/messages到目前为止的对话,用作上下文。
GET /v1/reservations/{id}日期、房客、入住条款和状态。
POST /v1/conversations/{id}/messages幂等地发送回答。
POST /v1/reviews/{id}/reply在渠道允许回复的地方,让同一个助手回复评价。
MCP server 和 AI SDK provider把 Repull 作为工具交给 Agent,不用自己写调用。