> ## Documentation Index
> Fetch the complete documentation index at: https://docs.min-ai.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp

> Each agent has its own WhatsApp group and you talk to it from your usual WhatsApp. With a minai line or a separate number of yours.

On WhatsApp, each agent lives in **its own group**: the group has the agent's name and picture, and in it are you and a **line** (a WhatsApp number that gives the agent its voice). You write to it from your usual WhatsApp, like in any group.

| | |
| - | - |
| **For** | Personal and group agents |
| **What it needs** | Your WhatsApp. And, if you choose **Another line of mine**, a second number |
| **Who talks to it** | Only you (or the whole group, if it's a group agent) |

## What you need

The first time an agent uses WhatsApp, you choose your account's line. All your WhatsApp agents share that line, so with the next ones this step doesn't show up.

* **A minai line** (“No number of your own”): a number minai provides. You don't need anything but your WhatsApp.
* **Another line of mine** (“A separate number for your agents”): a **second WhatsApp number** of yours (another phone, another SIM or a WhatsApp Business with another number), different from the one you chat with. That phone needs to have WhatsApp working.

### Why can't it be my own number?

Because WhatsApp doesn't notify you of messages sent by your own account: if the agent talked from your number, you'd never find out what it writes to you. That's why the line is always another number, and you talk to it from yours.

<Info>
  Having your agent **read your WhatsApp chats** and draft replies for you is something else: that's the [WhatsApp plugin](/en/plugins/whatsapp). That one does use your number, and nothing goes out without your OK.
</Info>

## How to connect it

<Tabs>
  <Tab title="A minai line">
    <Steps>
      <Step title="Choose WhatsApp">
        When you create the agent, under **Where will you talk with Clara?**, tap **WhatsApp** (“A group in your WhatsApp”).
      </Step>

      <Step title="Choose the line">
        Under **Which line?**, tap **A minai line**. It's assigned instantly: there's nothing to link. If it says **No room**, there are no free lines right now and the other option is the way to go.
      </Step>

      <Step title="Introduce yourself to the line">
        Tap **Open WhatsApp**. A chat opens with minai's number and a message already written, something like “Linking code: HG7-KFH”. Send it as is, from your usual WhatsApp. The code lasts one hour.
      </Step>

      <Step title="Done, your group">
        The line answers “Done ✅ I'm creating Clara's group for you.” and adds you to the group. In minai you see “I created the group «Clara»” → **Done**. Your agent writes to you there.
      </Step>
    </Steps>

    <Frame caption="Choosing the line">
      <img src="https://mintcdn.com/min-ai/EQr5ljJyas4JWh5G/images/es/canal-whatsapp-linea.png?fit=max&auto=format&n=EQr5ljJyas4JWh5G&q=85&s=87dbedadfb15a4b18d49c88130ffbb6f" alt="Which line? screen with A minai line and Another line of mine" width="1280" height="657" data-path="images/es/canal-whatsapp-linea.png" />
    </Frame>

    The minai line is shared by several accounts, but each account has its own groups, people and messages, kept separate. If you message that number privately without a code, it replies once that the agents talk in their groups, not there.
  </Tab>

  <Tab title="Another line of mine">
    <Steps>
      <Step title="Choose WhatsApp and Another line of mine">
        When you create the agent, tap **WhatsApp** and, under **Which line?**, **Another line of mine**. Then **Create the line**.
      </Step>

      <Step title="Link the line">
        Under **Link the line**, choose how:

        * **Scan QR**: on that line's phone, open WhatsApp → **Linked devices** → **Link a device** and scan the code (it refreshes every 30 seconds).
        * **With a code**: enter the line's number (**Country**, **Number**) and tap **Get a code**. On the line's phone, go to **Link with phone number instead** and enter the code minai shows you.

        minai shows “Waiting for the link…” until it's ready.
      </Step>

      <Step title="Introduce yourself to the line">
        Tap **Open WhatsApp** and, **from your usual WhatsApp** (not from the line), send the message with the code as is.
      </Step>

      <Step title="Done, your group">
        The line creates the agent's group with you in it. In minai you see “I created the group «Clara»” → **Done**.
      </Step>
    </Steps>

    The line stays as a linked device of that WhatsApp, just like WhatsApp Web.
  </Tab>
</Tabs>

<Frame caption="Introduce yourself to the line from your usual WhatsApp">
  <img src="https://mintcdn.com/min-ai/EQr5ljJyas4JWh5G/images/es/canal-whatsapp-presentate.png?fit=max&auto=format&n=EQr5ljJyas4JWh5G&q=85&s=52e629e4642374123ce88be9a5448b5d" alt="Introduce yourself to the line screen with the Open WhatsApp button" width="1280" height="657" data-path="images/es/canal-whatsapp-presentate.png" />
</Frame>

## How it behaves

* **Formatting:** only *bold*, *italics*, ~~strikethrough~~ and code blocks. **No tables, headings or links with text**: web addresses are written out in full.
* **No buttons:** WhatsApp doesn't have them, so options arrive as a **numbered list** at the end of the message. You answer with the number or the text. See [Buttons and options](/en/reference/agent/buttons).
* **While it works:** you see “typing…”.
* **Files, photos, audio and video:** they go both ways.
* **Voice notes:** they're turned into text automatically.
* **Reactions:** they work both ways.
* **Only you:** in a personal agent's group, if you add someone else, the agent doesn't answer them.
* **To stop it:** send `/stop` on its own, with nothing else.

In minai, the chat shows up in **Chats** with the WhatsApp mark: you read it there, but you answer from WhatsApp.

## Reconnect if something fails

<Tabs>
  <Tab title="A minai line">
    If the line has a problem, in **Overview** → **Where it talks** you see **No line** and “It's a minai line and we're already reconnecting it.”. You don't have to do anything: your agent answers again as soon as it's back.
  </Tab>

  <Tab title="Another line of mine">
    minai checks the line every few minutes. If it got unlinked (for example, you removed it from **Linked devices**), in **Where it talks** you see **No line** and “Your WhatsApp line was unlinked…”. Since it's the line of all your WhatsApp agents, they all stop. Tap **Link the line again** and repeat the QR or the code: they all come back together.
  </Tab>
</Tabs>

## Change channels

A personal agent can move from WhatsApp to another channel and take everything with it. In the old group it leaves one last message (“This group isn't used anymore: you can leave and delete it.”) and the line leaves the group. See [Change an agent](/en/setup/change-an-agent).

## Limits

* Your own number can never be the line.
* Only one line per account, shared by all your WhatsApp agents. Having **Another line of mine** counts in your [plan](/en/reference/plans) as “Own WhatsApp”; the minai line doesn't count.
* If you rename a personal agent, its group changes name and picture. A group agent's group keeps its name.
* Up to 15 MB per file.
* Notifications that it wrote to you come from WhatsApp, not minai.

<CardGroup cols={2}>
  <Card title="WhatsApp plugin" icon="https://mintcdn.com/min-ai/EQr5ljJyas4JWh5G/images/plugins/whatsapp.png?fit=max&auto=format&n=EQr5ljJyas4JWh5G&q=85&s=90e5e8840e6a973e320cb40ea281dea8" href="/en/plugins/whatsapp" width="128" height="128" data-path="images/plugins/whatsapp.png">
    Have your agent read your chats and reply with your OK.
  </Card>

  <Card title="Agents for a group" icon="users" href="/en/reference/channels/groups">
    An agent in a WhatsApp group, for everyone.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.