Index of every page on this site: llms.txt
All skills
masheev avatar

/masheev-channels

@21d3a39
by masheevmasheev/skills1 stars
Run it yourself

Use when integrating WhatsApp, SMS, email, voice, Instagram, or Google Reviews channels with Masheev. Covers channel-specific configuration, WhatsApp Business API template approval and 24-hour session windows, SMS compliance (TCPA opt-in/opt-out), email deliverability (SPF/DKIM/DMARC), voice agent setup with ElevenLabs, and Instagram webhook integration via Meta. Use this skill when someone asks about multi-channel messaging, channel-specific formatting, or setting up a new communication channel in Masheev.

Use this Skill: https://skilld.dev/gh/masheev/skills/masheev-channels

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referenceswhatsapp.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

WhatsApp Business API Integration

Setup

WhatsApp channels connect via the Meta Business API. Create an inbox with channel whatsapp:

await apiClient.inboxes.create.mutate({
  name: "WhatsApp Support",
  channel: "whatsapp",
  channelConfig: {
    whatsapp: {
      phoneNumberId: "1234567890",       // Meta phone number ID
      businessAccountId: "9876543210",    // WhatsApp Business Account ID
      accessToken: "EAA...",             // System user token (long-lived)
    },
  },
});

Connect your Meta Business app's webhook to https://api.masheev.com/webhooks/whatsapp/{inboxId}. Masheev verifies the X-Hub-Signature-256 header on every request.

24-Hour Session Window

WhatsApp enforces a messaging window policy:

Window Duration Message Types Cost
Customer-initiated 24h from last customer message Free-form text, media, interactive Per-conversation pricing
Business-initiated Outside 24h window Template messages only Per-template pricing
  • The 24h window resets each time the customer sends a message.
  • Inside the window, you can send any message type (text, media, interactive).
  • Outside the window, you must use a pre-approved template message.
  • Masheev tracks the window state per conversation and returns sessionExpired: true when the window closes.
// Check window status before sending
const conv = await apiClient.conversations.get.query({ id: "conv_..." });
if (conv.channelState?.whatsapp?.sessionExpired) {
  // Must use a template message
  await apiClient.messages.sendTemplate.mutate({
    conversationId: "conv_...",
    templateName: "order_update",
    languageCode: "en",
    components: [
      { type: "body", parameters: [{ type: "text", text: "ORD-12345" }] },
    ],
  });
}

Template Messages

Templates must be submitted to Meta for approval before use.

Approval Requirements

  • Category: utility, authentication, or marketing
  • Language: at least one language required; Meta reviews per-language
  • Variables: use {{1}}, {{2}} placeholders; no dynamic URLs in body (use URL buttons)
  • No prohibited content: no threatening, abusive, or misleading text
  • Review time: typically 24-48 hours; rejections include a reason

Sending Templates

await apiClient.messages.sendTemplate.mutate({
  conversationId: "conv_...",
  templateName: "appointment_reminder",
  languageCode: "en",
  components: [
    {
      type: "header",
      parameters: [{ type: "image", image: { link: "https://..." } }],
    },
    {
      type: "body",
      parameters: [
        { type: "text", text: "Jane" },
        { type: "text", text: "March 15, 2026 at 2:00 PM" },
      ],
    },
    {
      type: "button",
      sub_type: "quick_reply",
      index: 0,
      parameters: [{ type: "payload", payload: "confirm_yes" }],
    },
  ],
});

Supported Media Types

Type Max Size Formats
Image 5 MB JPEG, PNG
Video 16 MB MP4, 3GPP
Audio 16 MB AAC, MP4, AMR, OGG (Opus)
Document 100 MB PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT
Sticker 500 KB (static), 100 KB (animated) WebP
Location N/A latitude + longitude
Contacts N/A vCard format
await apiClient.messages.create.mutate({
  conversationId: "conv_...",
  content: "Here is your invoice:",
  attachments: [
    { type: "document", url: "https://files.myapp.com/invoice-123.pdf", filename: "invoice.pdf" },
  ],
});

Formatting

WhatsApp supports a subset of text formatting:

Style Syntax Example
Bold *text* bold text
Italic _text_ italic text
Strikethrough ~text~ strikethrough
Monospace ```text``` monospace
Quote > text Block quote (single line)
Bulleted list - item or * item List items
Numbered list 1. item Ordered items

Masheev automatically converts markdown in AI responses to WhatsApp formatting when the conversation channel is whatsapp.

Opt-In Requirements

WhatsApp requires explicit opt-in from users before you can message them:

  • Users must actively consent (pre-checked boxes are not valid)
  • You must clearly state what types of messages they will receive
  • You must provide a way to opt out
  • Record opt-in timestamp and method in contact consent:
await apiClient.contacts.update.mutate({
  id: "con_...",
  consent: {
    channels: { whatsapp: "opted_in" },
  },
});

Rate Limits

Tier Messages/day Requirement
Unverified 250 Default
Tier 1 1,000 Verified business + good quality
Tier 2 10,000 Sustained quality rating
Tier 3 100,000 Sustained quality rating
Tier 4 Unlimited Sustained quality rating

Quality rating is based on user feedback (blocks, reports). Masheev surfaces your current tier and quality rating in Dashboard > Inboxes > WhatsApp.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning7mo3 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    The skill provides comprehensive documentation and integration guidelines for various communication channels like WhatsApp, SMS, Email, and Voice. It follows security best practices for credential management and compliance.

  • Socket7mo

    No alerts

  • Snyk7mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 21d3a39. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 7 months ago
metadata
{
  "author": "masheev",
  "version": "0.1.0"
}

README badge

README badge for masheev/skills/masheev-channels