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

# Send Typing Indicators

> Show the WhatsApp typing indicator while your own system prepares a reply to a customer's message 💬

When a customer messages you and your system needs a moment to answer, the typing indicator ("…") tells them a reply is on its way. Send it as soon as you start preparing the reply, then send the reply itself with [Send session message](/messaging/session-messages).

<Note>
  **Why a message id, not a phone number.** WhatsApp shows the typing indicator only as part of marking a specific customer message as read. There is no way to show it to a phone number on its own. So instead of a recipient, you pass the `id` of the message you are about to answer, taken from the inbound webhook. WhatsApp then shows the indicator in that chat and marks the message as read (blue ticks). The two cannot be separated.
</Note>

<Warning>
  **Typing indicators may count toward your number's sending limit.** WhatsApp limits how many messages each business phone number can send per second. WhatsApp doesn't say whether typing indicators count toward it, but they are sent from the same number and through the same endpoint as your replies. If they do, sending them too often could delay or block the messages your customers are waiting for. See [Use it sparingly](#use-it-sparingly).
</Warning>

## Endpoint

```json theme={null}
POST https://api.connectly.ai/v1/businesses/{businessId}/send/typing_indicators
```

| Parameter    | Location | Description                                 |
| ------------ | -------- | ------------------------------------------- |
| `businessId` | Path     | Your Connectly business ID.                 |
| `X-API-Key`  | Header   | An API key with the `messaging.send` scope. |

**Rate limit:** 200 requests/second. Exceeding this returns `429 Too Many Requests`.

***

## Request body

| Field       | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `messageId` | string | Yes      | The id of the customer message you are replying to, from the [inbound webhook](/webhooks/payload-types#inbound-message-payloads): `message.id` for a message, `buttonResponse.id` for a button tap. This is the only way to address the indicator: WhatsApp attaches it to that message, not to the customer's phone number. It must be a message the customer sent to your business over WhatsApp in the last 30 days. |

## Response

```json theme={null}
{}
```

A `200` means WhatsApp accepted the indicator. If WhatsApp refuses it, the call fails with WhatsApp's reason in the error, so there is nothing to wait for or follow up on.

***

## How it behaves

* The call returns once WhatsApp has accepted the indicator, so a reply you send afterwards always arrives after it.
* The indicator is dismissed when your reply reaches the customer or after 25 seconds, whichever comes first.
* Any message the customer sent you in the last 30 days works, not only the latest one. WhatsApp refuses older messages.
* It works for messages received on WhatsApp Cloud API numbers only.

## Use it sparingly

Your replies matter more than the dots. Keep indicators for the moments a customer would otherwise wait in silence.

* **One per customer message.** Send it when you start preparing the reply. Send another for the same message only if the reply takes longer than 25 seconds.
* **Only when a reply will follow.** An indicator with no reply behind it is a poor experience, and WhatsApp asks that it not be shown in that case.
* **Not for instant replies.** If your answer is ready within a second or two, send the answer instead.
* **Not while the number is busy.** During a campaign or a traffic spike, skip indicators. If they count toward the limit, your messages need that capacity more.
* **Back off on `429`.** It means your business or your number is at its limit. Stop sending indicators for a while, and let your messages go first.

## Errors

| Status | Meaning                                                                                                                                                                                                                                                                                                             |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | `messageId` is missing or malformed, or the message is not one a customer sent to your business over WhatsApp in the last 30 days — for example a message you sent, a delivery status, or an older message. The error names `messageId`. Also returned when WhatsApp refuses the indicator, with WhatsApp's reason. |
| `401`  | The API key is missing or invalid.                                                                                                                                                                                                                                                                                  |
| `403`  | The API key can't send messages for this business, or WhatsApp denied access to your business number.                                                                                                                                                                                                               |
| `404`  | Your business has no message with that id.                                                                                                                                                                                                                                                                          |
| `429`  | Too many requests, to Connectly or to WhatsApp. Pause indicators for a while and let your messages go first.                                                                                                                                                                                                        |
| `503`  | WhatsApp is temporarily unavailable. Retry shortly.                                                                                                                                                                                                                                                                 |

***

## Examples

<AccordionGroup>
  <Accordion title="Show the indicator, then reply">
    The webhook delivers the customer's message with its `message.id`. Send the indicator with that id, prepare the reply, then send the reply to the customer's number within 25 seconds.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --request POST \
        --url https://api.connectly.ai/v1/businesses/<business_id>/send/typing_indicators \
        --header 'Content-Type: application/json' \
        --header 'X-API-Key: <YOUR_KEY_HERE>' \
        --data '{ "messageId": "01ARZ3NDEKTSV4RRFFQ69G5FAV" }'

      curl --request POST \
        --url https://api.connectly.ai/v1/businesses/<business_id>/send/messages \
        --header 'Content-Type: application/json' \
        --header 'X-API-Key: <YOUR_KEY_HERE>' \
        --data '{
          "recipient": { "id": "+16044441111", "channelType": "whatsapp" },
          "message": { "text": "Here is your answer." }
        }'
      ```

      ```python Python theme={null}
      import requests

      base = "https://api.connectly.ai/v1/businesses/<business_id>"
      headers = { "Content-Type": "application/json", "X-API-Key": "<YOUR_KEY_HERE>" }

      # message_id comes from the inbound message webhook
      requests.post(f"{base}/send/typing_indicators", headers=headers,
                    json={ "messageId": message_id })

      reply = generate_reply(customer_text)  # your own agent

      requests.post(f"{base}/send/messages", headers=headers, json={
          "recipient": { "id": customer_phone, "channelType": "whatsapp" },
          "message": { "text": reply },
      })
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>
