fastify-xrcs
Twilio RCS rich cards and carousels — send branded interactive messages.
fastify-xrcs
Twilio RCS (Rich Communication Services) plugin for building and sending rich cards and carousels.
Quick Start
await fastify.register(xRCS, {
accountSid: process.env.TWILIO_ACCOUNT_SID,
authToken: process.env.TWILIO_AUTH_TOKEN,
})
// Send rich card
await fastify.xrcs.sendCard({
to: '+15555551234',
card: {
title: 'Your Order is Ready',
description: 'Order #12345 is ready for pickup',
media: { url: 'https://example.com/order-image.jpg' },
actions: [
{ type: 'reply', text: 'Confirm Pickup' },
{ type: 'url', text: 'View Details', url: 'https://app.example.com/orders/12345' },
],
},
})
AI Context
package: "@xenterprises/fastify-xrcs"
decorates: fastify.xrcs
use-when: Rich interactive SMS notifications (order confirmations, appointment reminders)
requires: Twilio account with RCS enabled
methods: [sendCard, sendCarousel]
env-required: [TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN]
