Skip to content

    Arabic or English · ↑↓ to move · Enter to open · Esc to close

    العربية
    On this page

    Sending your first campaign safely

    Send one message to many people without hurting your number: test, vary the text, watch progress by webhook.

    A campaign is the safe way to message many people: Mursilat skips invalid and opted-out numbers and pauses on bad signals. The messaging limit Meta sets for the number applies to campaigns too.

    Before you send

    • Message only people who agreed to hear from you. optInConfirmed: true is your written confirmation and is required.
    • Outside the 24-hour customer-service window, official numbers can only send Meta-approved templates, and Meta sets each number’s messaging limit and quality rating.
    • Official numbers send campaigns as an approved Meta template: content: {type: "template", template: {name, language, params}}; other content types answer CLOUD_API_TEMPLATE_REQUIRED. A new account’s first campaign waits in pending_review until Mursilat reviews it.
    • No URL shorteners.

    1. Create it as a draft and test on yourself

    Create the campaign with start: false and two or three of your own numbers as recipients. Check what arrives on the phones, then create the real one.

    curl -X POST "https://mursilat.com/api/v2/campaigns" \
      -H "Authorization: Bearer $WASLA_API_KEY" \
      -H "Idempotency-Key: order-1042-confirm" \
      -H "Content-Type: application/json" \
      -d '{
      "numberId": "cm1abcd2345efgh6789ijkl",
      "name": "عرض الجمعة",
      "content": {
        "type": "template",
        "template": {
          "name": "friday_offer",
          "language": "ar",
          "params": [
            "{name|عميلنا}",
            "20%"
          ]
        }
      },
      "recipients": [
        {
          "phone": "201001234567",
          "variables": {
            "name": "منى"
          }
        },
        {
          "phone": "966501234567"
        }
      ],
      "optInConfirmed": true
    }'

    2. Opt-outs

    Nothing is appended to campaign messages (an approved template’s text can’t change), so put the opt-out in the template: a quick-reply “Stop” button or a footer. Anyone who answers with an opt-out keyword joins your suppression list, triggers a contact.opted_out webhook and is skipped in every later campaign and send.

    3. Watch it

    Subscribe to campaign.status and read progress with GET /v2/campaigns/{campaignId} (counts, pause reason). Mursilat pauses a campaign by itself when delivery drops below 80 % over the last hour, when more than 3 in 100 people opt out, or when Meta rate-limits the number — first for 1 hour, then 24 hours. Fix the cause before resuming.

    4. After it ends

    Within 24 hours of the end, the campaign’s text, media link, buttons and every recipient row are deleted. The totals stay (purged: true); recipients answer 410 CAMPAIGN_PURGED. Export what you need before that.