MethodPOST
Endpoint/\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples
RML Connect Endpointhttps://apis.rmlconnect.net/wba/v1/tsp/messages
PurposeSubmit 3–4 representative message payloads per use case ahead of onboarding, so Meta can pre-classify content and pre-build usable templates, reducing misclassification risk once live traffic starts.

Text message sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "type": "text",
  "text": {
    "body": "<BODY_TEXT>"
  }
}

Call-to-action URL button message sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "type": "interactive",
  "interactive": {
    "type": "cta_url",
    "header": {
      "type": "text|image|video|document",
      "text": "<HEADER_TEXT>",
      "image": { "link": "<IMAGE_LINK>", "id": "<MEDIA_ID>" },
      "video": { "link": "<VIDEO_LINK>", "id": "<MEDIA_ID>" },
      "document": { "link": "<DOCUMENT_LINK>", "id": "<MEDIA_ID>", "filename": "<FILENAME>" }
    },
    "body": { "text": "<BODY_TEXT>" },
    "footer": { "text": "<FOOTER_TEXT>" },
    "action": {
      "name": "cta_url",
      "parameters": {
        "display_text": "<BUTTON_TEXT>",
        "url": "<BUTTON_URL>"
      }
    }
  }
}

Header is optional. When present: type text requires text; type image/video/document requires at least one of link or id (document also requires filename).

Reply button message sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "type": "interactive",
  "interactive": {
    "type": "button",
    "header": { "type": "text|image|video|document", "text": "<HEADER_TEXT>" },
    "body": { "text": "<BODY_TEXT>" },
    "footer": { "text": "<FOOTER_TEXT>" },
    "action": {
      "buttons": [
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } }
      ]
    }
  }
}

Multiple CTA buttons sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "interactive": {
    "type": "button",
    "body": { "text": "<TEXT>" },
    "action": {
      "buttons": [
        { "type": "cta_url", "cta_url": { "display_text": "<CTA_TEXT>", "url": "<CTA_LINK>" } },
        { "type": "cta_url", "cta_url": { "display_text": "<CTA_TEXT>", "url": "<CTA_LINK>" } }
      ]
    }
  }
}

Multiple reply buttons sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "type": "interactive",
  "interactive": {
    "type": "button",
    "header": { "type": "text", "text": "<TEXT>" },
    "body": { "text": "<TEXT>" },
    "footer": { "text": "<TEXT>" },
    "action": {
      "buttons": [
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } },
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } },
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } }
      ]
    }
  },
  "category": "utility"
}

Mixed CTA + reply buttons sample

POST /\<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_samples

{
  "type": "interactive",
  "interactive": {
    "type": "button",
    "header": { "type": "text", "text": "<TEXT>" },
    "body": { "text": "<TEXT>" },
    "footer": { "text": "<TEXT>" },
    "action": {
      "buttons": [
        { "type": "cta_url", "cta_url": { "display_text": "<CTA_TEXT>", "url": "<CTA_LINK>" } },
        { "type": "cta_url", "cta_url": { "display_text": "<CTA_TEXT>", "url": "<CTA_LINK>" } },
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } },
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } },
        { "type": "reply", "reply": { "id": "<BUTTON_ID>", "title": "<BUTTON_LABEL_TEXT>" } }
      ]
    }
  },
  "category": "utility"
}

Response

{
  "success": true,
  "category": "UTILITY" // Can be UTILITY / MARKETING / AUTHENTICATION
}

If the returned category looks wrong, contact [email protected] to request a review.

Related error

CodeDescription
2388341Samples API access is restricted

Did this page help you?