# ड्रिप सीक्वेंस से अपने आप फ़ॉलो-अप करें

> मंज़ूर टेम्पलेट का एक ड्रिप सीक्वेंस बनाएं जिसमें उनके बीच इंतज़ार हो, नए ग्राहकों को जोड़ें, जब वे जवाब दें या opt-out करें तब उसे रोकें, और हर चरण की रिपोर्ट देखें।

इस गाइड में आप तीन मैसेज की वेलकम सीरीज़ बनाते हैं: ग्राहक के साइन अप करने वाले दिन एक वेलकम, दो दिन बाद एक देखभाल टिप, और दिन 7 पर छूट का ऑफ़र। आप इसे एक बार बनाते हैं। उसके बाद, आप जिस भी ग्राहक को जोड़ते हैं उसे मैसेज उसके अपने कार्यक्रम से मिलते हैं।

**ग्राहक को क्या दिखता है:** साइन अप करते ही आपके व्यवसाय का एक WhatsApp मैसेज: "Hi Jane, welcome to Green Leaf Plants!" दो दिन बाद आपकी पौधों की देखभाल गाइड का लिंक। दिन 7 पर उनके अगले ऑर्डर के लिए 10% का कोड। अगर वे किसी भी समय जवाब देते हैं, तो सीरीज़ रुक जाती है और चैट आपकी टीम संभालती है। अगर वे STOP लिखते हैं, तो उन्हें आपसे कोई और मार्केटिंग नहीं मिलती।

**आपको क्या दिखता है:** हर चरण के लिए, कितने मैसेज पोस्ट हुए, भेजे गए, डिलीवर हुए, पढ़े गए, विफल हुए और क्लिक हुए। हर ग्राहक के लिए, उसे कौन से चरण मिले, अगला कब आना है और वह क्यों रुका। webhook इवेंट आपके सिस्टम को बताते हैं कि ग्राहक ने कब लिंक पर क्लिक किया और कब उसने सीक्वेंस छोड़ा।

## यह कैसे काम करता है

1. आप तीन **टेम्पलेट** बनाते हैं और Meta के उन्हें मंज़ूर करने तक इंतज़ार करते हैं। सीक्वेंस केवल टेम्पलेट भेजता है, इसलिए यह 24 घंटे की विंडो के बाहर भी काम करता है।
2. आप `POST /sequences` से **सीक्वेंस** बनाते हैं: 1 से 20 चरण, हर एक एक टेम्पलेट, अपने मानों और इंतज़ार के साथ।
3. आप `POST /sequences/{id}/enrolments` से संपर्कों को **जोड़ते** हैं, या app2email को हर उस व्यक्ति को जोड़ने दें जिसे कोई टैग मिलता है।
4. app2email हर चरण तब भेजता है जब उसका इंतज़ार बीत जाता है। हर इंतज़ार अपने से पहले वाले चरण से गिना जाता है; पहला इंतज़ार संपर्क के जोड़े जाने के क्षण से गिना जाता है।
5. संपर्क सीक्वेंस तब छोड़ता है जब हर चरण भेजा जा चुका हो, जब वह जवाब दे (जब तक आप इसे बंद न करें), जब वह opt-out करे, या जब आप उसे बाहर निकालें। हर बार आपके webhook को `sequence.finished` मिलता है।

जब तक आप किसी को जोड़ते नहीं, किसी को कुछ नहीं मिलता। सीक्वेंस बनाने से कुछ नहीं भेजा जाता।

## आपको क्या चाहिए

- **app2email से जुड़ा एक WhatsApp Business API नंबर**, और सेवा LIVE। ड्रिप सीक्वेंस Standard और Professional प्लान और ट्रायल के साथ आते हैं; दूसरे प्लान 403 `sequences_not_enabled` देते हैं। QR कोड से जुड़े व्यक्तिगत WhatsApp नंबर से टेम्पलेट नहीं भेजे जा सकते, इसलिए उसके पास सीक्वेंस नहीं हैं (403 `sequence_personal_number`)।
- **Meta में आपके WhatsApp Business Account पर एक भुगतान तरीका।** Meta हर डिलीवर हुए टेम्पलेट के लिए शुल्क लेता है।
- **ऐसे ग्राहक जिन्होंने आपसे सुनने के लिए सहमति दी है।** सीक्वेंस वही नियम मानता है जो ब्रॉडकास्ट: Do Not Call सूची, मार्केटिंग टेम्पलेट के लिए opt-in नियम, आपके प्लान की सीमा और नंबर की अपनी मासिक सीमा। सहमति रिकॉर्ड और opt-in के लिए [opt-in का सम्मान करने वाला मार्केटिंग ब्रॉडकास्ट भेजें](/guides/how-to-marketing-broadcast) देखें।
- **एक API key**, [API key पेज](https://www.app2email.com/dashboard/apikey) से, इन scopes के साथ:

| Scope | इस गाइड में यह किसलिए है |
| --- | --- |
| `templates:manage` | तीन टेम्पलेट बनाना (`POST /templates`) |
| `messages:send` | सीक्वेंस बनाना, बदलना, रोकना और हटाना, संपर्कों को जोड़ना और बाहर निकालना (`POST /sequences`, `PUT /sequences/{id}`, `DELETE /sequences/{id}`, `POST /sequences/{id}/enrolments`, `DELETE /sequences/{id}/enrolments/{contact}`) |
| `messages:read` | टेम्पलेट की स्थिति, सीक्वेंस की रिपोर्ट, उसमें कौन है (`GET /templates`, `GET /sequences/{id}`, `GET /sequences/{id}/enrolments`, `GET /broadcasts/{code}`) |
| `contacts:manage` | केवल तब, जब आप टैग से जोड़ें: संपर्कों को टैग देना (`PATCH /contacts/{identity}`) |
| `webhooks:manage` | इवेंट पाने वाला webhook जोड़ना (`POST /webhooks`)। आप इसे बिना कोड के API key पेज पर भी जोड़ सकते हैं |

`GET /v1/YOUR_NUMBER/me` आपके पास मौजूद key के scopes दिखाता है।

<Tip>
**पहले आज़माएं।** अपने नंबर पर **sandbox key** (sandbox फ़्लैग वाली key, जो API key पेज पर बनती है) आपके सीक्वेंस, उनकी रिपोर्ट और उनके enrolments पढ़ सकती है, और `"dry_run": true` के साथ `POST /sequences/{id}/enrolments` बिना किसी को जोड़े गिनता है कि कौन जोड़ा जाएगा। सीक्वेंस बनाना, बदलना और हटाना, और असली enrolments 403 `sandbox_key` देते हैं: उनके लिए सामान्य key इस्तेमाल करें। **तुरंत मिलने वाले sandbox** (`POST https://api.app2email.com/v1/account/sandbox` से मिलने वाला डेमो नंबर `12025550100`) में कोई सीक्वेंस नहीं है; वह 403 `not_in_instant_sandbox` देता है। विवरण: [Sandbox](/api/sandbox)।
</Tip>

## हर चरण के लिए कौन सी श्रेणी

हर चरण एक टेम्पलेट है, और Meta हर टेम्पलेट का शुल्क उसकी **श्रेणी** और ग्राहक के देश के अनुसार लेता है। वह श्रेणी चुनें जो मैसेज के कथन से मेल खाती हो:

| दिन | चरण | टेम्पलेट | श्रेणी |
| --- | --- | --- | --- |
| 0 | वेलकम | `welcome_new_customer` | MARKETING। वेलकम UTILITY तभी हो सकता है जब वह सख़्ती से उस अकाउंट या ऑर्डर के बारे में हो जो ग्राहक ने अभी बनाया है, और उसमें कुछ प्रचार वाला न हो |
| 2 | देखभाल टिप | `plant_care_tips` | MARKETING। टिप्स और सामग्री किसी लेन-देन के बारे में नहीं हैं |
| 7 | ऑफ़र | `welcome_offer` | MARKETING। कोई भी छूट या प्रमोशन मार्केटिंग है |

Meta श्रेणी की समीक्षा टेम्पलेट के साथ करता है, और UTILITY के रूप में भेजा गया प्रमोशन अस्वीकार हो जाता है या MARKETING में बदल दिया जाता है। MARKETING टेम्पलेट केवल उन्हीं लोगों को जाते हैं जो आपकी Do Not Call सूची में नहीं हैं, और opt-in नियम चालू होने पर केवल उन्हें जिनका opt-in रिकॉर्ड है। सीरीज़ की लागत का अनुमान [WhatsApp प्राइसिंग कैलकुलेटर](https://www.app2email.com/tools/whatsapp-pricing-calculator) से लगाएं: प्रति ग्राहक तीन मार्केटिंग टेम्पलेट, गुणा प्रति माह आपके अपेक्षित ग्राहकों की संख्या।

## चरण दर चरण सीक्वेंस बनाएं

हर कॉल `Authorization: Bearer YOUR_API_KEY` के साथ `https://api.app2email.com/v1/YOUR_NUMBER` पर जाती है। `YOUR_NUMBER` आपका WhatsApp नंबर है: पहले देश कोड, सिर्फ़ अंक।

<Steps>
  <Step title="तीन टेम्पलेट बनाएं">
    हर मैसेज को क्रमांकित प्लेसहोल्डर के साथ लिखें, हर एक के लिए `example` में नमूना मान दें, और एक footer जोड़ें जो बताए कि कैसे रुकना है। STOP और उसके अनुवाद वे opt-out शब्द हैं जिन्हें app2email पहले से जानता है। हर लिंक को प्लेसहोल्डर में रखें, स्थिर टेक्स्ट में नहीं: तब app2email हर ग्राहक को उसका अपना ट्रैक किया गया लिंक दे सकता है (चरण 2 देखें)।

    | टेम्पलेट | Body | मान |
    | --- | --- | --- |
    | `welcome_new_customer` | Hi \{\{1\}\}, welcome to Green Leaf Plants! We are happy you are here. Reply to this message any time if you have a question. | नाम |
    | `plant_care_tips` | Hi \{\{1\}\}, here is our quick guide to keeping your new plants happy: \{\{2\}\} Happy growing! | नाम, लिंक |
    | `welcome_offer` | Hi \{\{1\}\}, thanks for being with us this week. Use the code \{\{2\}\} for 10% off your next order: \{\{3\}\} The code is valid for 7 days. | नाम, कोड, लिंक |

    ऑफ़र, एक रिक्वेस्ट के रूप में (बाकी दो वैसे ही हैं, बस अपने टेक्स्ट और नमूनों के साथ):

    <CodeGroup>

    ```bash cURL
    curl -X POST https://api.app2email.com/v1/YOUR_NUMBER/templates \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "welcome_offer",
        "language": "en",
        "category": "MARKETING",
        "components": [
          {
            "type": "BODY",
            "text": "Hi {{1}}, thanks for being with us this week. Use the code {{2}} for 10% off your next order: {{3}} The code is valid for 7 days.",
            "example": { "body_text": [["Jane", "WELCOME10", "https://www.example.com/shop"]] }
          },
          { "type": "FOOTER", "text": "Reply STOP to opt out" }
        ]
      }'
    ```

    ```javascript Node.js
    const res = await fetch("https://api.app2email.com/v1/YOUR_NUMBER/templates", {
      method: "POST",
      headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
      body: JSON.stringify({
        name: "welcome_offer",
        language: "en",
        category: "MARKETING",
        components: [
          {
            type: "BODY",
            text: "Hi {{1}}, thanks for being with us this week. Use the code {{2}} for 10% off your next order: {{3}} The code is valid for 7 days.",
            example: { body_text: [["Jane", "WELCOME10", "https://www.example.com/shop"]] },
          },
          { type: "FOOTER", text: "Reply STOP to opt out" },
        ],
      }),
    });
    console.log(res.status, await res.json());
    ```

    ```python Python
    import os, requests

    res = requests.post(
        "https://api.app2email.com/v1/YOUR_NUMBER/templates",
        headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
        json={
            "name": "welcome_offer",
            "language": "en",
            "category": "MARKETING",
            "components": [
                {
                    "type": "BODY",
                    "text": "Hi {{1}}, thanks for being with us this week. Use the code {{2}} for 10% off your next order: {{3}} The code is valid for 7 days.",
                    "example": {"body_text": [["Jane", "WELCOME10", "https://www.example.com/shop"]]},
                },
                {"type": "FOOTER", "text": "Reply STOP to opt out"},
            ],
        },
        timeout=10,
    )
    print(res.status_code, res.json())
    ```

    </CodeGroup>

    **जवाब में आपको क्या मिलता है** (201 Created): टेम्पलेट Meta के पास समीक्षा में है।

    ```json
    {
      "success": true,
      "request_id": "c3ppl",
      "template": {
        "id": "2234567890",
        "name": "welcome_offer",
        "language": "en",
        "category": "MARKETING",
        "status": "PENDING"
      },
      "note": "Submitted to WhatsApp for review (minutes to a day). You get a template.status_changed webhook event with the result, or GET https://api.app2email.com/v1/4976659348270/templates/welcome_offer."
    }
    ```

    समीक्षा में कुछ मिनट से एक दिन तक लगता है। `template.status_changed` इवेंट नतीजा बताता है (`status` APPROVED और `can_send: true`, या REJECTED और एक `reason`), या `GET /templates/welcome_offer` से पूछें। किसी को जोड़ने से पहले तीनों के APPROVED होने तक रुकें। टेम्पलेट समीक्षा और विस्तार से: [टेम्पलेट से ऑर्डर और अपॉइंटमेंट नोटिफ़िकेशन भेजें](/guides/how-to-order-notifications)।
  </Step>
  <Step title="सीक्वेंस बनाएं">
    तीन चरणों के साथ एक कॉल। इंतज़ार अपने से पहले वाले चरण से गिने जाते हैं, इसलिए दिन 7 दिन 2 वाली टिप के **5** दिन बाद है:

    | चरण | इंतज़ार | कब भेजा जाता है |
    | --- | --- | --- |
    | `welcome_new_customer` | `wait_days: 0` | दिन 0, जोड़ते ही |
    | `plant_care_tips` | `wait_days: 2` | दिन 2 |
    | `welcome_offer` | `wait_days: 5` | दिन 7 |

    इंतज़ार `wait_minutes`, `wait_hours` या `wait_days` के रूप में दिया जा सकता है; साथ भेजने पर वे जुड़ जाते हैं। हर इंतज़ार 0 से 90 दिन का होता है।

    चरण के मानों में, `{name}` संपर्क का नाम है। जब वह पता न हो, तो उसकी जगह `name_fallback` इस्तेमाल होता है (डिफ़ॉल्ट "there")। `track_clicks` डिफ़ॉल्ट रूप से चालू है: मानों का हर पता हर संपर्क के लिए अपना अलग ट्रैक किया गया लिंक बन जाता है, इसलिए आप देखते हैं कि किसने क्लिक किया।

    <CodeGroup>

    ```bash cURL
    curl -X POST https://api.app2email.com/v1/YOUR_NUMBER/sequences \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Welcome series",
        "stop_on_reply": true,
        "steps": [
          { "wait_days": 0, "template_name": "welcome_new_customer", "language": "en",
            "parameters": { "body": ["{name}"], "name_fallback": "there" } },
          { "wait_days": 2, "template_name": "plant_care_tips", "language": "en",
            "parameters": { "body": ["{name}", "https://www.example.com/plant-care"], "name_fallback": "there" } },
          { "wait_days": 5, "template_name": "welcome_offer", "language": "en",
            "parameters": { "body": ["{name}", "WELCOME10", "https://www.example.com/shop"], "name_fallback": "there" } }
        ]
      }'
    ```

    ```javascript Node.js
    const step = (wait_days, template_name, body) => ({
      wait_days, template_name, language: "en", parameters: { body, name_fallback: "there" },
    });

    const res = await fetch("https://api.app2email.com/v1/YOUR_NUMBER/sequences", {
      method: "POST",
      headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
      body: JSON.stringify({
        name: "Welcome series",
        stop_on_reply: true,
        steps: [
          step(0, "welcome_new_customer", ["{name}"]),
          step(2, "plant_care_tips", ["{name}", "https://www.example.com/plant-care"]),
          step(5, "welcome_offer", ["{name}", "WELCOME10", "https://www.example.com/shop"]),
        ],
      }),
    });
    const { sequence } = await res.json();
    console.log(res.status, sequence.id, sequence.steps.map((s) => s.id));
    ```

    ```python Python
    def step(wait_days, template_name, body):
        return {"wait_days": wait_days, "template_name": template_name, "language": "en",
                "parameters": {"body": body, "name_fallback": "there"}}

    res = requests.post(
        "https://api.app2email.com/v1/YOUR_NUMBER/sequences",
        headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
        json={
            "name": "Welcome series",
            "stop_on_reply": True,
            "steps": [
                step(0, "welcome_new_customer", ["{name}"]),
                step(2, "plant_care_tips", ["{name}", "https://www.example.com/plant-care"]),
                step(5, "welcome_offer", ["{name}", "WELCOME10", "https://www.example.com/shop"]),
            ],
        },
        timeout=10,
    )
    sequence = res.json()["sequence"]
    print(res.status_code, sequence["id"], [s["id"] for s in sequence["steps"]])
    ```

    </CodeGroup>

    **जवाब में आपको क्या मिलता है** (201 Created; `steps` और `report` में पहले चरण तक छोटा किया हुआ):

    ```json
    {
      "success": true,
      "request_id": "s2new",
      "sequence": {
        "id": 12,
        "name": "Welcome series",
        "status": "active",
        "stop_on_reply": true,
        "enrol_tag": "",
        "enrol_tag_since": null,
        "created_by": "api",
        "created_at": "2026-11-19T01:00:00.000Z",
        "updated_at": "2026-11-19T01:00:00.000Z",
        "steps": [
          {
            "id": 31,
            "position": 0,
            "wait_days": 0,
            "wait_minutes": 0,
            "template_name": "welcome_new_customer",
            "language": "en",
            "parameters": { "body": ["{name}"], "name_fallback": "there" },
            "track_clicks": true,
            "report_code": null
          }
        ],
        "counts": { "enrolled": 0, "active": 0, "finished": 0, "stopped": 0, "stopped_by_reply": 0, "opted_out": 0 },
        "report": [
          { "step_id": 31, "position": 0, "template_name": "welcome_new_customer", "posted": 0, "sent": 0, "delivered": 0, "read": 0, "failed": 0, "clicked": 0, "clicks": 0, "report_url": null }
        ]
      }
    }
    ```

    `sequence.id` और चरणों के `id` रखें: चरणों को बाद में उनकी रिपोर्ट खोए बिना बदलने के लिए आपको चरण ids चाहिए। बाकी दो चरण इसी तरह लौटते हैं, `wait_minutes` 2880 और 7200 के साथ। `stop_on_reply` डिफ़ॉल्ट रूप से true है; opt-out संपर्क को हमेशा रोकता है, चाहे वह कुछ भी कहे। एक नंबर के अधिकतम 100 सीक्वेंस हो सकते हैं।

    <Note>
    `POST /sequences` कोई `Idempotency-Key` नहीं लेता। अगर जवाब खो जाए, तो उसे दोबारा बनाने से पहले `GET /sequences` देखें, ताकि आपके पास दो न हो जाएं।
    </Note>
  </Step>
  <Step title="अपने पहले संपर्क जोड़ें">
    नंबर (`numbers`), नाम सहित नंबर (`contacts`), किसी सहेजे गए सेगमेंट का हर संपर्क (`segment_id`) या किसी टैग वाला हर संपर्क (`tag`) भेजें, प्रति कॉल 5000 तक। `"dry_run": true` से शुरू करें: यह गिनता है कि कौन जोड़ा जाएगा और किसी को नहीं जोड़ता।

    <CodeGroup>

    ```bash cURL
    curl -X POST https://api.app2email.com/v1/YOUR_NUMBER/sequences/12/enrolments \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "contacts": [
          { "number": "61412345678", "name": "Jane" },
          { "number": "61498765432", "name": "Tom" }
        ],
        "dry_run": true
      }'
    ```

    ```javascript Node.js
    async function enrol(sequenceId, contacts, dryRun = false) {
      const res = await fetch(`https://api.app2email.com/v1/YOUR_NUMBER/sequences/${sequenceId}/enrolments`, {
        method: "POST",
        headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
        body: JSON.stringify({ contacts, dry_run: dryRun }),
      });
      return res.json();
    }

    const contacts = [{ number: "61412345678", name: "Jane" }, { number: "61498765432", name: "Tom" }];
    console.log(await enrol(12, contacts, true)); // count only
    console.log(await enrol(12, contacts));       // for real
    ```

    ```python Python
    def enrol(sequence_id, contacts, dry_run=False):
        res = requests.post(
            f"https://api.app2email.com/v1/YOUR_NUMBER/sequences/{sequence_id}/enrolments",
            headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
            json={"contacts": contacts, "dry_run": dry_run},
            timeout=10,
        )
        return res.json()

    contacts = [{"number": "61412345678", "name": "Jane"}, {"number": "61498765432", "name": "Tom"}]
    print(enrol(12, contacts, dry_run=True))  # count only
    print(enrol(12, contacts))                # for real
    ```

    </CodeGroup>

    **जवाब में आपको क्या मिलता है** (200, `dry_run` के साथ और बिना वही रूप):

    ```json
    {
      "success": true,
      "request_id": "s7enr",
      "sequence_id": 12,
      "enrolled": 2,
      "already_in_it": 0,
      "on_do_not_call_list": 0,
      "not_a_number": 0,
      "first_step_at": "2026-11-19T01:00:00.000Z",
      "note": null
    }
    ```

    फिर वही body `dry_run` के बिना भेजें। Do Not Call सूची के संपर्क, इस सीक्वेंस में पहले से मौजूद संपर्क और जो फ़ोन नंबर नहीं है वह सब छोड़ दिए जाते हैं और गिने जाते हैं। इससे कॉल को दोहराना सुरक्षित है: संपर्क कभी दो बार नहीं जुड़ता। `first_step_at` वह समय है जब पहला चरण जाता है।

    अपने साइन-अप कोड में, हर नए ग्राहक को साइन अप करते ही उसके नाम के साथ जोड़ें, ताकि वेलकम तुरंत पहुंचे।
  </Step>
  <Step title="इवेंट के लिए webhook जोड़ें">
    एक कॉल (या इसे API key पेज पर Webhooks के अंतर्गत जोड़ें)। जवाब से `whsec_...` secret रखें: यह हर इवेंट पर हस्ताक्षर करता है।

    ```bash
    curl -X POST https://api.app2email.com/v1/YOUR_NUMBER/webhooks \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url": "https://www.example.com/whatsapp/webhook"}'
    ```

    हर webhook को हर इवेंट प्रकार मिलता है; आपका कोड `type` से `sequence.finished`, `link.clicked` और नीचे दिए बाकी इवेंट चुनता है और बाकी पर 10 सेकंड के भीतर 2xx से जवाब देता है। इसे कैसे सेट करें और हस्ताक्षर कैसे जांचें, अपने कंप्यूटर के लिए टनल के साथ: [API से WhatsApp चैटबॉट बनाएं](/guides/how-to-whatsapp-chatbot)।

    कोई सार्वजनिक पता नहीं है? `GET /events?wait=25&types=sequence.finished` (scope `messages:read`) वही इवेंट लाता है।
  </Step>
  <Step title="प्रगति देखें">
    `GET /sequences/{id}` में गिनतियां और हर चरण की रिपोर्ट है। `GET /sequences/{id}/enrolments` में हर संपर्क है।

    <CodeGroup>

    ```bash cURL
    curl https://api.app2email.com/v1/YOUR_NUMBER/sequences/12 \
      -H "Authorization: Bearer YOUR_API_KEY"

    # who is still in it, with the next step and when it is due
    curl "https://api.app2email.com/v1/YOUR_NUMBER/sequences/12/enrolments?status=active&limit=100" \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```

    ```javascript Node.js
    const headers = { Authorization: `Bearer ${process.env.API_KEY}` };
    const { sequence } = await (await fetch("https://api.app2email.com/v1/YOUR_NUMBER/sequences/12", { headers })).json();
    console.log(sequence.counts);
    for (const row of sequence.report) console.log(row.template_name, row.delivered, row.read, row.clicked);

    const { enrolments } = await (await fetch(
      "https://api.app2email.com/v1/YOUR_NUMBER/sequences/12/enrolments?status=active&limit=100", { headers })).json();
    for (const e of enrolments) console.log(e.contact, e.steps_sent, e.next_at);
    ```

    ```python Python
    headers = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
    sequence = requests.get("https://api.app2email.com/v1/YOUR_NUMBER/sequences/12", headers=headers, timeout=10).json()["sequence"]
    print(sequence["counts"])
    for row in sequence["report"]:
        print(row["template_name"], row["delivered"], row["read"], row["clicked"])

    enrolments = requests.get("https://api.app2email.com/v1/YOUR_NUMBER/sequences/12/enrolments",
                              params={"status": "active", "limit": 100}, headers=headers, timeout=10).json()["enrolments"]
    for e in enrolments:
        print(e["contact"], e["steps_sent"], e["next_at"])
    ```

    </CodeGroup>

    **एक हफ़्ते बाद `GET /sequences/12` से आपको क्या मिलता है** (छोटा किया हुआ: `steps` छोड़ा गया):

    ```json
    {
      "success": true,
      "request_id": "s3get",
      "sequence": {
        "id": 12,
        "name": "Welcome series",
        "status": "active",
        "stop_on_reply": true,
        "enrol_tag": "",
        "counts": { "enrolled": 120, "active": 64, "finished": 31, "stopped": 25, "stopped_by_reply": 21, "opted_out": 3 },
        "report": [
          { "step_id": 31, "position": 0, "template_name": "welcome_new_customer", "posted": 120, "sent": 120, "delivered": 118, "read": 97, "failed": 2, "clicked": 0, "clicks": 0,
            "report_url": "https://www.app2email.com/dashboard/log/broadcast/k3XbQ9rTzP2mWv7a1c9e" },
          { "step_id": 32, "position": 1, "template_name": "plant_care_tips", "posted": 81, "sent": 81, "delivered": 80, "read": 66, "failed": 0, "clicked": 29, "clicks": 41,
            "report_url": "https://www.app2email.com/dashboard/log/broadcast/m7TqW2xRb9LpZc4d8e1f" },
          { "step_id": 33, "position": 2, "template_name": "welcome_offer", "posted": 34, "sent": 34, "delivered": 34, "read": 30, "failed": 0, "clicked": 12, "clicks": 15,
            "report_url": "https://www.app2email.com/dashboard/log/broadcast/p2HsK8vYc3NwQf6g9h2j" }
        ]
      }
    }
    ```

    - `counts`: कितने जोड़े गए, कितने अब भी इसमें हैं, किन्होंने हर चरण पाया (`finished`), या जल्दी छोड़ा (`stopped`, जिनमें से `stopped_by_reply` ने जवाब दिया और `opted_out` ने opt-out किया)।
    - `report`, हर चरण के लिए: `posted`, `sent`, `delivered`, `read`, `failed`, और `clicked` (वे संपर्क जिन्होंने चरण के ट्रैक किए गए लिंक पर क्लिक किया; `clicks` हर क्लिक गिनता है)।
    - पहली बार भेजे जाने के बाद `steps` में हर चरण का एक `report_code` होता है। उसके साथ `GET /broadcasts/{code}` उस चरण का नतीजा हर नंबर के हिसाब से देता है, ब्रॉडकास्ट रिपोर्ट जैसा; `report_url` उसे डैशबोर्ड में खोलता है।

    **एक enrolment**, `GET /sequences/12/enrolments` से:

    ```json
    {
      "success": true,
      "request_id": "s6enl",
      "sequence_id": 12,
      "enrolments": [
        {
          "id": 501,
          "contact": "61412345678",
          "name": "Jane",
          "status": "active",
          "stop_reason": null,
          "steps_sent": 1,
          "next_step": 2,
          "next_at": "2026-11-21T01:00:00.000Z",
          "last_sent_at": "2026-11-19T01:00:00.000Z",
          "enrolled_at": "2026-11-19T01:00:00.000Z",
          "enrolled_by": "api",
          "finished_at": null,
          "history": [
            { "step": 31, "position": 0, "at": "2026-11-19T01:00:00.000Z", "ok": true, "error": "" }
          ]
        }
      ]
    }
    ```

    `status` `active`, `finished` या `stopped` है; `stop_reason` बताता है कि संपर्क क्यों रुका। `history` में हर चरण की हर कोशिश है: जब कोई चरण नहीं जा सका तब `error` के साथ `ok: false`। `limit` 1 से 500 है (डिफ़ॉल्ट 100), सबसे नया पहले।
  </Step>
</Steps>

## नतीजा

Jane के लिए, जो 19 नवंबर को जोड़ी गई:

**दिन 0:** "Hi Jane, welcome to Green Leaf Plants!" उसके साइन अप करने के कुछ ही पल बाद पहुंचता है। आपके webhook को उसके लिए `message.status` इवेंट मिलते हैं (`sent`, `delivered`, `read`), जैसे किसी भी मैसेज के लिए।

**दिन 2:** देखभाल टिप पहुंचती है। उसका लिंक उसका अपना ट्रैक किया गया लिंक है (`https://www.app2email.com/l/...`)। जब वह उसे खोलती है, तो आपके webhook को सीक्वेंस और चरण के साथ `link.clicked` मिलता है:

```json
{
  "id": "evt_Cmp3k9m2Lw8Rt5Yp1Zs03",
  "type": "link.clicked",
  "created": "2026-11-21T08:12:00.000Z",
  "number": "4976659348270",
  "data": {
    "contact": "61412345678",
    "url": "https://www.example.com/plant-care",
    "broadcast_code": null,
    "sequence_id": 12,
    "step_id": 32,
    "first_click": true,
    "clicks": 1,
    "browser": "Safari",
    "timestamp": "2026-11-21T08:12:00.000Z"
  }
}
```

`link.clicked` हर क्लिक पर आता है; `first_click` केवल उसके पहले क्लिक के लिए true है। लिंक प्रीव्यू और क्रॉलर नहीं गिने जाते।

**दिन 7:** ऑफ़र पहुंचता है। जब वह आखिरी चरण था, तो आपके webhook को `result` `completed` के साथ `sequence.finished` मिलता है:

```json
{
  "id": "evt_Cmp3k9m2Lw8Rt5Yp1Zs02",
  "type": "sequence.finished",
  "created": "2026-11-26T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "sequence_id": 12,
    "sequence": "Welcome series",
    "contact": "61412345678",
    "result": "completed",
    "reason": null,
    "steps_sent": 3,
    "steps": 3,
    "enrolled_at": "2026-11-19T01:00:00.000Z",
    "by": "api",
    "timestamp": "2026-11-26T01:00:00.000Z"
  }
}
```

**जब वह जवाब देती है** दिन 3 पर ("Do you deliver on Saturdays?"), तो आपके webhook को `message.received` मिलता है, उसकी चैट Inbox में दिखती है, और ऑफ़र नहीं भेजा जाता। `sequence.finished` `result` `stopped`, `reason` `replied` और `steps_sent` 2 के साथ आता है। कोई व्यक्ति (या आपका बॉट) उसके मैसेज से खुली 24 घंटे की विंडो के भीतर उसे जवाब देता है। देखें [चैट को अपने बॉट से किसी व्यक्ति को सौंपें और वापस लें](/guides/how-to-human-handoff)।

**जब वह STOP लिखती है** (या "Stop promotions" पर टैप करती है), तो वह तुरंत Do Not Call सूची में चली जाती है। आपके webhook को `contact.opted_out` मिलता है, और `reason` `opted_out` के साथ `sequence.finished`।

`result` `stopped` के सभी कारण:

| `reason` | क्या हुआ |
| --- | --- |
| `replied` | संपर्क ने जवाब लिखा (केवल जब `stop_on_reply` true हो) |
| `opted_out` | संपर्क ने opt-out किया |
| `removed` | आपने उसे `DELETE /sequences/{id}/enrolments/{contact}` से बाहर निकाला |
| `sequence_deleted` | आपने सीक्वेंस हटा दिया |
| `failed`, `not_allowed` | कोई चरण इस संपर्क तक नहीं जा सका। enrolment के `history` में उस चरण का `error` है |

## बदलें, रोकें या बंद करें

**सबको जहां वे हैं वहीं रोकें** `PUT /sequences/{id}` और `{"status": "paused"}` से; `{"status": "active"}` इसे आगे बढ़ाता है। केवल वही भेजें जो बदलता है। जवाब पूरा सीक्वेंस है।

```bash
curl -X PUT https://api.app2email.com/v1/YOUR_NUMBER/sequences/12 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused"}'
```

**चरण बदलें** उसी कॉल में `steps` के साथ। यह पूरी सूची को क्रम से बदल देता है: किसी चरण को उसकी रिपोर्ट के साथ रखने के लिए उसका `id` भेजें, `id` के बिना चरण नया है, और जिस चरण को आप छोड़ दें वह हटा दिया जाता है। जो संपर्क पहले ही आखिरी चरण पार कर चुके हैं वे पूरे हो जाते हैं। यहां ऑफ़र दिन 7 से दिन 10 पर जाता है:

```bash
curl -X PUT https://api.app2email.com/v1/YOUR_NUMBER/sequences/12 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "steps": [
      { "id": 31, "wait_days": 0, "template_name": "welcome_new_customer", "language": "en", "parameters": { "body": ["{name}"] } },
      { "id": 32, "wait_days": 2, "template_name": "plant_care_tips", "language": "en", "parameters": { "body": ["{name}", "https://www.example.com/plant-care"] } },
      { "id": 33, "wait_days": 8, "template_name": "welcome_offer", "language": "en", "parameters": { "body": ["{name}", "WELCOME10", "https://www.example.com/shop"] } }
    ]
  }'
```

**एक संपर्क को बाहर निकालें**, जैसे जब वह ऑफ़र आने से पहले खरीद ले:

```bash
curl -X DELETE https://api.app2email.com/v1/YOUR_NUMBER/sequences/12/enrolments/61412345678 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json
{
  "success": true,
  "request_id": "s8rem",
  "sequence_id": 12,
  "contact": "61412345678",
  "status": "stopped",
  "stop_reason": "removed"
}
```

इसके बाद `reason` `removed` के साथ `sequence.finished` आता है। जो संपर्क अभी सीक्वेंस में नहीं है, उस पर 404 `enrolment_not_found` आता है।

**सीक्वेंस को archive करें** `DELETE /sequences/{id}` से। उसमें जो भी अब तक है सब रुक जाता है (हर एक के लिए `reason` `sequence_deleted` के साथ `sequence.finished`), और रिपोर्ट बनी रहती है: `GET /sequences?all=true` उसे अब भी सूचीबद्ध करता है।

```json
{
  "success": true,
  "request_id": "s5del",
  "id": 12,
  "status": "archived",
  "stopped": 4
}
```

## टैग से अपने आप जोड़ें

अपने साइन-अप कोड से `POST /sequences/{id}/enrolments` कॉल करने के बजाय, सीक्वेंस को एक `enrol_tag` दें। जिन संपर्कों को अब से वह टैग मिलता है उन्हें app2email जोड़ता है, हर एक को एक बार। `""` इसे बंद करता है। जिन संपर्कों के पास टैग पहले से था वे नहीं जोड़े जाते; अगर आप उन्हें भी चाहते हैं तो उन्हें `{"tag": "new-customer"}` से एक बार जोड़ें।

```bash
curl -X PUT https://api.app2email.com/v1/YOUR_NUMBER/sequences/12 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enrol_tag": "new-customer"}'
```

फिर किसी संपर्क को साइन अप करते समय टैग करें (scope `contacts:manage`)। आप जो `tags` भेजते हैं वे संपर्क के टैग बदल देते हैं, इसलिए पूरी सूची भेजें:

```bash
curl -X PATCH https://api.app2email.com/v1/YOUR_NUMBER/contacts/61412345678 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Jane", "tags": ["new-customer"]}'
```

सीक्वेंस में `enrol_tag_since` दिखाता है कि टैग किस समय से गिना जाता है। संपर्कों को डैशबोर्ड से या किसी ऑटोमेशन से भी जोड़ा जा सकता है।

## इवेंट पर प्रतिक्रिया दें

एक छोटा handler जो हस्ताक्षर जांचता है, देखे हुए इवेंट को अनदेखा करता है, और दर्ज करता है कि किसने पूरा किया और किसने क्लिक किया। `WEBHOOK_SECRET` को अपने webhook के `whsec_...` मान पर सेट करें।

<Tabs>
  <Tab title="Node.js (Express)">

```javascript drip-events.mjs
// Node.js 18 or newer.  npm install express   then   node drip-events.mjs
import crypto from "node:crypto";
import express from "express";

const { WEBHOOK_SECRET, PORT = 3000 } = process.env;
const done = new Set(); // handled event ids: use a database table or Redis in production

function verify(raw, header, secret) {
  const t = /(?:^|,)\s*t=(\d+)/.exec(header ?? "")?.[1];
  const v1 = [...(header ?? "").matchAll(/(?:^|,)\s*v1=([0-9a-f]+)/g)].map((m) => m[1]);
  if (!t || v1.length === 0 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(t + ".").update(raw).digest("hex");
  return v1.some((v) => v.length === expected.length && crypto.timingSafeEqual(Buffer.from(v), Buffer.from(expected)));
}

const app = express();
app.post("/whatsapp/webhook", express.raw({ type: "application/json" }), (req, res) => {
  if (!verify(req.body, req.get("X-App2email-Signature"), WEBHOOK_SECRET)) return res.sendStatus(401);
  const event = JSON.parse(req.body);
  if (event.test || done.has(event.id)) return res.sendStatus(200);
  const d = event.data;
  if (event.type === "sequence.finished") {
    // result completed, or stopped with reason replied | opted_out | removed | failed | not_allowed | sequence_deleted
    console.log(`sequence ${d.sequence_id}: ${d.contact} ${d.result} ${d.reason ?? ""} after ${d.steps_sent}/${d.steps} steps`);
  } else if (event.type === "link.clicked" && d.sequence_id && d.first_click) {
    console.log(`sequence ${d.sequence_id} step ${d.step_id}: ${d.contact} opened ${d.url}`);
  } else if (event.type === "contact.opted_out") {
    console.log(`${d.number} opted out (${d.source}): mark it in your CRM too`);
  }
  done.add(event.id);
  res.sendStatus(200);
});
app.listen(PORT, () => console.log(`listening on http://localhost:${PORT}/whatsapp/webhook`));
```

  </Tab>
  <Tab title="Python (Flask)">

```python drip_events.py
# Python 3.9 or newer.  pip install flask   then   flask --app drip_events run --port 3000
import hashlib, hmac, json, os, re, time
from flask import Flask, request

SECRET = os.environ["WEBHOOK_SECRET"]
done = set()  # handled event ids: use a database table or Redis in production

def verify(raw: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    t = re.search(r"(?:^|,)\s*t=(\d+)", header or "")
    v1 = re.findall(r"(?:^|,)\s*v1=([0-9a-f]+)", header or "")
    if not t or not v1 or abs(time.time() - int(t.group(1))) > tolerance:
        return False
    expected = hmac.new(secret.encode(), t.group(1).encode() + b"." + raw, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(v, expected) for v in v1)

app = Flask(__name__)

@app.post("/whatsapp/webhook")
def webhook():
    raw = request.get_data()
    if not verify(raw, request.headers.get("X-App2email-Signature"), SECRET):
        return "bad signature", 401
    event = json.loads(raw)
    if event.get("test") or event["id"] in done:
        return "", 200
    d = event["data"]
    if event["type"] == "sequence.finished":
        # result completed, or stopped with reason replied | opted_out | removed | failed | not_allowed | sequence_deleted
        print(f"sequence {d['sequence_id']}: {d['contact']} {d['result']} {d.get('reason') or ''} after {d.get('steps_sent')}/{d.get('steps')} steps")
    elif event["type"] == "link.clicked" and d.get("sequence_id") and d.get("first_click"):
        print(f"sequence {d['sequence_id']} step {d['step_id']}: {d['contact']} opened {d['url']}")
    elif event["type"] == "contact.opted_out":
        print(f"{d['number']} opted out ({d['source']}): mark it in your CRM too")
    done.add(event["id"])
    return "", 200
```

  </Tab>
</Tabs>

<a id="what-it-costs"></a>

## इसकी लागत

- **app2email:** एक निश्चित मासिक प्लान। भेजा गया हर चरण प्लान का एक मैसेज गिना जाता है, प्रति-मैसेज कोई अतिरिक्त मार्कअप नहीं ([प्राइसिंग](https://www.app2email.com/pricing))। नंबर की अपनी मासिक सीमा चरणों पर भी लागू होती है।
- **Meta:** हर डिलीवर हुए टेम्पलेट का शुल्क सीधे आपके WhatsApp Business Account के भुगतान तरीके से लेता है, श्रेणी और ग्राहक के देश के अनुसार। ज़्यादातर देशों में मार्केटिंग सबसे महंगी श्रेणी है। जो ग्राहक जल्दी जवाब देता है उसे कम चरण मिलते हैं, इसलिए वह कम खर्च करवाता है।

इसका अनुमान [WhatsApp प्राइसिंग कैलकुलेटर](https://www.app2email.com/tools/whatsapp-pricing-calculator) से लगाएं। बाद में, `GET /usage` में `meta_pricing` बिलिंग माह के मैसेज Meta की श्रेणी के अनुसार संकेतात्मक लागत के साथ गिनता है, और `message.status` इवेंट में `pricing` ऑब्जेक्ट दिखाता है कि Meta ने हर मैसेज कैसे गिना।

## प्रोडक्शन चेकलिस्ट

<Check>
**पहले मंज़ूरी, फिर enrol।** हर चरण का टेम्पलेट उस चरण की भाषा में APPROVED होना चाहिए। जिस चरण का टेम्पलेट भेजा नहीं जा सकता वह enrolment के `history` में `error` के साथ `ok: false` दिखाता है, और संपर्क `reason` `failed` के साथ रुक सकता है। `template.status_changed` पर नज़र रखें: जिस टेम्पलेट को Meta बाद में रोक दे या बंद कर दे वह भी भेजा नहीं जा सकता।
</Check>

<Check>
**केवल वे लोग जिन्होंने सहमति दी।** उन ग्राहकों को जोड़ें जिन्होंने WhatsApp मार्केटिंग के लिए सहमति दी है। Do Not Call सूची के संपर्क enrolment पर छोड़ दिए जाते हैं, और सीक्वेंस के दौरान opt-out उसे तुरंत रोक देता है। opt-in नियम चालू होने पर (`PUT /settings/optin`), MARKETING चरण केवल उन नंबरों को जाते हैं जिनका opt-in रिकॉर्ड है; उन्हें `POST /optins` से दर्ज करें।
</Check>

<Check>
**footer में STOP रखें।** हर मार्केटिंग टेम्पलेट बताता है कि कैसे रुकना है। बहुत सारे ब्लॉक और रिपोर्ट आपकी क्वालिटी रेटिंग घटाते हैं, और कम रेटिंग टेम्पलेट को रोक सकती है और आपकी मैसेजिंग सीमा घटा सकती है। `GET /health` `quality_rating` दिखाता है।
</Check>

<Check>
**`stop_on_reply` चालू रखें।** जो ग्राहक जवाब लिखता है उसे जवाब चाहिए, अगला चरण नहीं। उसे Inbox में या अपने बॉट से जवाब दें, उसके मैसेज से खुली 24 घंटे की विंडो के भीतर।
</Check>

<Check>
**हर इवेंट सत्यापित करें।** `X-App2email-Signature` को raw body पर webhook के `whsec_...` secret से जांचें, constant time में, और 5 मिनट से पुराने `t` को अस्वीकार करें। ऊपर का कोड यही करता है।
</Check>

<Check>
**इवेंट id पर दोहराव हटाएं।** हर संभाले गए इवेंट का `id` (हेडर `X-App2email-Delivery` में भी) कम से कम दो दिन रखें: जिस webhook ने 2xx से जवाब नहीं दिया उसे वही इवेंट बाद में फिर मिलता है, उसी id के साथ। अपने रिकॉर्ड के लिए, सीक्वेंस में संपर्क की जगह `sequence_id` और `contact` की जोड़ी है; हर क्लिक `step_id`, `contact` और `clicks` है।
</Check>

<Check>
**enrolments को सुरक्षित रूप से दोबारा भेजें।** सीक्वेंस कॉल कोई `Idempotency-Key` नहीं लेते। `POST /sequences/{id}/enrolments` को फिर भेजना सुरक्षित है: सीक्वेंस में पहले से मौजूद संपर्क छोड़ दिए जाते हैं और `already_in_it` में गिने जाते हैं। `POST /sequences` को आंख मूंदकर न दोहराएं; पहले `GET /sequences` देखें।
</Check>

<Check>
**सीमाओं का सम्मान करें।** प्रति enrolment कॉल 5000 संपर्क तक (उससे ऊपर 400 `sequence_too_many_contacts`), प्रति सीक्वेंस 20 चरण, प्रति नंबर 100 सीक्वेंस। हर जवाब में `X-RateLimit-Limit`, `X-RateLimit-Remaining` और `X-RateLimit-Reset` होते हैं; सीमा पार होने पर `Retry-After` के साथ 429 `rate_limited` मिलता है। देखें [Limits](/api/limits)।
</Check>

<Check>
**न्यूनतम पहुंच।** नए ग्राहकों को जोड़ने वाले कोड को केवल `messages:send` चाहिए। key को अपने सर्वर पर रखें, कभी वेब पेज या लॉग में नहीं।
</Check>

## अगर यह काम न करे

| आपको क्या दिखता है | कारण | समाधान |
| --- | --- | --- |
| 403 `sequences_not_enabled` | नंबर के प्लान में ड्रिप सीक्वेंस शामिल नहीं हैं | ये Standard और Professional प्लान और ट्रायल के साथ आते हैं: बिलिंग पेज पर प्लान बदलें |
| 403 `sequence_personal_number` | नंबर QR कोड से जुड़ा व्यक्तिगत WhatsApp नंबर है, जो टेम्पलेट नहीं भेज सकता | WhatsApp Business API नंबर इस्तेमाल करें |
| 403 `plan_not_allowed`, `service_not_live` | API वाला कोई प्लान नहीं, या सेवा रुकी हुई है | प्लान चुनें; रुकी हुई सेवा Settings पेज पर "Go Live" से चालू होती है |
| 403 `insufficient_scope` | key में एक अनुमति नहीं है (संदेश उसका नाम बताता है) | `messages:send` वाली key इस्तेमाल करें (और रिपोर्ट के लिए `messages:read`) |
| 403 `sandbox_key` | sandbox key असली सीक्वेंस बना, बदल या हटा नहीं सकती और असल में enrol नहीं कर सकती | सामान्य key इस्तेमाल करें; sandbox key के साथ केवल पढ़ना और `dry_run` enrolments काम करते हैं |
| 403 `not_in_instant_sandbox` | डेमो नंबर में कोई सीक्वेंस नहीं है | अपने जुड़े हुए नंबर की key इस्तेमाल करें |
| 400 `invalid_sequence` | सीक्वेंस या कोई चरण वैध नहीं है (`template_name` गायब, 90 दिन से ज़्यादा का इंतज़ार, 20 से ज़्यादा चरण ...) | जो संदेश बताए उसे ठीक करें; `error.details.problems` हर समस्या सूचीबद्ध करता है |
| 409 `sequence_limit` | नंबर के 100 सीक्वेंस हैं | जिन्हें अब इस्तेमाल नहीं करते उन्हें हटाएं |
| 409 `sequence_empty` | सीक्वेंस में कोई चरण नहीं है | enrol करने से पहले `PUT /sequences/{id}` से चरण जोड़ें |
| 400 `sequence_no_contacts` | जोड़ने के लिए कोई नहीं: कोई नंबर, संपर्क, सेगमेंट या ऐसा टैग नहीं जिसमें संपर्क हों | `numbers`, `contacts`, `segment_id` या ऐसा `tag` भेजें जिसमें संपर्क हों |
| 400 `sequence_too_many_contacts` | एक कॉल में 5000 से ज़्यादा संपर्क | उन्हें छोटे समूहों में भेजें |
| 404 `sequence_not_found` | इस नंबर पर ऐसा कोई सीक्वेंस नहीं, या वह हटा दिया गया था | `GET /sequences` उन्हें सूचीबद्ध करता है |
| 404 `enrolment_not_found` | संपर्क अभी सीक्वेंस में नहीं है | `GET /sequences/{id}/enrolments?status=active` बताता है कि कौन है |
| `enrolled` 0 है, `on_do_not_call_list` या `already_in_it` नहीं | संपर्कों ने opt-out किया है, या वे पहले से इस सीक्वेंस में हैं | कुछ ठीक करने को नहीं: संपर्क कभी दो बार नहीं जुड़ता, और opt-out के विरुद्ध कभी नहीं |
| `history` में `ok: false` दिखता है, या `reason` `failed` या `not_allowed` के साथ `sequence.finished` | कोई चरण इस संपर्क तक नहीं जा सका, जैसे जो टेम्पलेट मंज़ूर नहीं है, या opt-in नियम चालू होने पर opt-in रिकॉर्ड नहीं | `history` में `error` पढ़ें; टेम्पलेट मंज़ूर कराएं या ठीक करें, या opt-in दर्ज करें |
| 429 `rate_limited` | इस key के लिए बहुत ज़्यादा कॉल | `Retry-After` सेकंड रुकें, फिर दोबारा कोशिश करें |
| 503 `sequences_not_ready` | ड्रिप सीक्वेंस अभी उपलब्ध नहीं हैं | बाद में फिर कोशिश करें; अगर यह होता रहे तो `request_id` के साथ support@app2email.com से संपर्क करें |

हर जवाब में एक `request_id` होता है। `GET /requests/{id}` दिखाता है कि उसके लिए क्या लॉग हुआ, और support@app2email.com भी उसे ढूंढ सकता है। सभी कोड: [Errors](/api/errors)।

## किसी AI एजेंट से चलाएं

MCP सर्वर `https://api.app2email.com/mcp/sequences` में यही कॉल टूल के रूप में हैं: `list_sequences`, `get_sequence`, `create_sequence`, `update_sequence`, `delete_sequence`, `enrol_in_sequence`, `list_sequence_enrolments` और `remove_from_sequence`। तब एजेंट "वेलकम सीरीज़ कैसी चल रही है?" या "Jane को इससे निकाल दो, उसने पहले ही खरीद लिया" का जवाब दे सकता है। देखें [MCP से AI एजेंट को अपना WhatsApp चलाने दें](/guides/how-to-ai-agent-mcp) और [MCP](/api/mcp)।

## और how-to गाइड

<CardGroup cols={2}>
  <Card title="opt-in का सम्मान करने वाला मार्केटिंग ब्रॉडकास्ट भेजें" href="/guides/how-to-marketing-broadcast">
    एक मार्केटिंग टेम्पलेट सूची या सेगमेंट को, सहमति रिकॉर्ड और Do Not Call सूची के साथ।
  </Card>
  <Card title="टेम्पलेट से ऑर्डर और अपॉइंटमेंट नोटिफ़िकेशन भेजें" href="/guides/how-to-order-notifications">
    टेम्पलेट बनाएं, उसे मंज़ूर करवाएं, और ऑर्डर शिप होने पर भेजें।
  </Card>
  <Card title="संपर्क इंपोर्ट करें और उन्हें अपने CRM के साथ सिंक रखें" href="/guides/how-to-contacts-crm-sync">
    नाम, टैग और सहमति वाले संपर्क, आपके अपने सिस्टम से अपडेट रखे जाते हैं।
  </Card>
  <Card title="चैट को अपने बॉट से किसी व्यक्ति को सौंपें और वापस लें" href="/guides/how-to-human-handoff">
    जब कोई ग्राहक किसी चरण का जवाब दे, तो अपनी टीम को चैट संभालने दें।
  </Card>
</CardGroup>

[सभी how-to गाइड](https://www.app2email.com/docs#how-to)
