messaging-rules

v0.1.1
com.pinlyx/messaging-rules Checked 4 days ago Published 10 days ago

Can I message this person now?

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_messaging_window

Decide whether a business may send a message to a person on WhatsApp, Instagram, Messenger, Telegram or X right now, based on source-cited platform rules (24h windows, templates, the human-agent tag, who must message first). Returns allowed, the reason, when the window ends, conditions you still have to satisfy, allowed alternatives and source URLs.

ParameterTypeDescription
channel *stringChannel id.
kindstringMessage kind. Default free_form. Others: template (WhatsApp), tag, private_reply, utility_template, marketing_message, sponsored (Messenger).
last_inbound_atstring | nullISO 8601 time the person last messaged you (UTC if no offset). For kind private_reply, the time of the comment. null if they never did.
nowstringISO 8601 time to evaluate at. Defaults to the current time.
opened_bystringHow the conversation was opened, e.g. ad_referral for a click-to-message ad.
senderstringAn automation (bot) or a person replying manually (human). Default bot.
tagstringMessage tag when kind is tag, e.g. HUMAN_AGENT.

validate_message

Check a draft message against the documented limits of a channel: text and caption length, attachment count, media type, size, MIME type and extension, and button / quick reply / list row counts and title lengths.

ParameterTypeDescription
channel *stringChannel id.
attachmentsarray
buttonsarrayReply button titles.
captionstring
list_rowsarrayList row titles.
quick_repliesarrayQuick reply titles.
textstring

get_channel_rules

Return the source-cited rules for one channel (windows, message kinds, tags, limits, rate limits, notes, sources), or a one-line summary of every channel when no channel is given.

ParameterTypeDescription
channelstringChannel id.
sectionstringOnly return this part. Default all.