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

# Send Typing Indicator

> Show "typing…" in the customer's WhatsApp chat while you prepare a reply. WhatsApp attaches it to one message the customer sent: that message is marked read, and the indicator shows until you reply or about 25 seconds pass. Nothing is stored as a message. Needs the `send` permission.

Show "typing…" in the customer's WhatsApp chat while your code prepares a reply, for example while it looks up an order or waits on an AI model.

WhatsApp attaches the indicator to one message the customer sent: that message is **marked as read** (blue ticks), and "typing…" shows until you send your reply or about **25 seconds** pass, whichever comes first. Nothing is stored in the chat.

## Basic Usage

```bash theme={null}
curl -X POST "https://api.flowiq.live/send-whatsapp" \
  -H "Authorization: Bearer fiq_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+27123456789",
    "message_type": "typing"
  }'
```

Without a `message_id`, FlowIQ uses the customer's latest WhatsApp message. To answer a specific message, pass its id (the `whatsapp_message_id` of the [`message_received`](https://docs.flowapt.com/flowiq-api-reference/webhooks#message_received) webhook):

```json theme={null}
{
  "phone_number": "+27123456789",
  "message_type": "typing",
  "typing": {
    "message_id": "wamid.HBgLMjc4MTIzNDU2NzgVAgASGBQzRUI..."
  }
}
```

***

## Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `phone_number` | string | Yes | The customer's WhatsApp number with country code. The contact must exist in FlowIQ |
| `message_type` | string | Yes | Must be `"typing"` |
| `typing.message_id` | string | No | A message the customer sent (`wamid.…`). Default: their latest message |

The API key needs the `send` permission.

***

## Response

### Success (200)

```json theme={null}
{
  "success": true,
  "message": "Typing indicator shown to 27123456789 for up to 25 seconds or until you reply",
  "data": {
    "message_type": "typing",
    "contact_id": "4f1c2a3b-…",
    "whatsapp_id": "27123456789",
    "message_id": "wamid.HBgLMjc4MTIzNDU2NzgVAgASGBQzRUI...",
    "message_id_source": "latest_inbound",
    "marked_read": true,
    "expires_in_seconds": 25
  }
}
```

### Errors

| Status | When |
| - | - |
| `400` | `typing.message_id` is not a WhatsApp message id |
| `403` | The API key has no `send` permission |
| `404` | No contact with that number |
| `409` | The customer has never sent you a WhatsApp message, so there is nothing to answer |
| `502` | WhatsApp refused it (for example a message id it does not know); `message` and `meta_error_code` carry its reason |

***

## Integration Example

Show the indicator as soon as a message arrives, then send the reply when it is ready:

```javascript theme={null}
async function replyWithTyping(apiKey, phoneNumber, incomingMessageId, buildReply) {
  const headers = { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" };

  await fetch("https://api.flowiq.live/send-whatsapp", {
    method: "POST",
    headers,
    body: JSON.stringify({
      phone_number: phoneNumber,
      message_type: "typing",
      typing: { message_id: incomingMessageId },
    }),
  });

  const text = await buildReply(); // keep it under ~25 seconds, or send typing again

  const response = await fetch("https://api.flowiq.live/send-whatsapp", {
    method: "POST",
    headers,
    body: JSON.stringify({ phone_number: phoneNumber, message_type: "text", text }),
  });
  const data = await response.json();
  if (!response.ok) throw new Error(data.message);
  return data;
}
```

> [!NOTE]
>
> The indicator also marks the customer's message as read. Only send it when you are about to reply.


## OpenAPI

````yaml flowiq-api-reference/openapi-send-typing.json POST /send-whatsapp
openapi: 3.1.0
info:
  title: FlowIQ - Send Typing Indicator
  version: 1.0.0
servers:
  - url: https://api.flowiq.live
    description: FlowIQ Production API
security:
  - BearerAuth: []
paths:
  /send-whatsapp:
    post:
      tags:
        - Endpoints
      summary: Send Typing Indicator
      description: >-
        Show "typing…" in the customer's WhatsApp chat while you prepare a
        reply. WhatsApp attaches it to one message the customer sent: that
        message is marked read, and the indicator shows until you reply or about
        25 seconds pass. Nothing is stored as a message. Needs the `send`
        permission.
      operationId: sendTypingIndicator
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: string
                  description: >-
                    The customer's WhatsApp number with country code. The
                    contact must exist in FlowIQ.
                  example: '+27123456789'
                message_type:
                  type: string
                  enum:
                    - typing
                  description: Must be "typing"
                  example: typing
                typing:
                  type: object
                  description: Optional.
                  properties:
                    message_id:
                      type: string
                      description: >-
                        WhatsApp message ID (wamid.…) of a message the customer
                        sent. Leave it out to use their latest message.
              required:
                - phone_number
                - message_type
      responses:
        '200':
          description: Typing indicator shown
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: >-
                      Typing indicator shown to 27123456789 for up to 25 seconds
                      or until you reply
                  data:
                    type: object
                    properties:
                      message_type:
                        type: string
                        example: typing
                      contact_id:
                        type: string
                        format: uuid
                      whatsapp_id:
                        type: string
                        example: '27123456789'
                      message_id:
                        type: string
                        description: >-
                          The customer's message the indicator was attached to
                          (now marked read).
                        example: wamid.HBgLMjc4MTIzNDU2NzgVAgASGBQzRUI...
                      message_id_source:
                        type: string
                        enum:
                          - request
                          - latest_inbound
                      marked_read:
                        type: boolean
                        example: true
                      expires_in_seconds:
                        type: integer
                        example: 25
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '403':
          description: The API key has no `send` permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '409':
          description: The contact has never sent you a WhatsApp message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '502':
          description: >-
            WhatsApp refused the indicator (for example a message id it does not
            know)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  meta_error_code:
                    type:
                      - integer
                      - 'null'
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your FlowIQ API key (from Settings → Profile → API Keys), sent as a
        bearer token. Format: `Bearer fiq_YOUR_API_KEY`
      bearerFormat: fiq_ API key

````

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