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

# Send Image Message

> Send an image message via WhatsApp

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your API key for authentication
</ParamField>

## Request Body

<ParamField body="to" type="string" required>
  Recipient phone number
</ParamField>

<ParamField body="mediaUrl" type="string" required>
  Public URL of the image file
</ParamField>

<ParamField body="type" type="string" required>
  Message Type (e.g., image)
</ParamField>

<ParamField body="message" type="string">
  Image caption (optional)
</ParamField>

<ParamField body="replyToMessageId" type="string">
  Message ID to reply to (optional)
</ParamField>

<ParamField body="clientId" type="string">
  Custom reference ID (optional)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://backend.conversales.in/api/v1/sendImageMessage" \
    -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "1234567890",
      "mediaUrl": "https://example.com/image.jpg",
      "message": "Check out this image!",
      "type":"image"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://backend.conversales.in/api/v1/sendImageMessage",
    {
      method: "POST",
      headers: {
        "X-API-Key": "3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        to: "1234567890",
        mediaUrl: "https://example.com/image.jpg",
        message: "Check out this image!",
        type: "image",
      }),
    }
  );
  ```

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

  url = "https://backend.conversales.in/api/v1/sendImageMessage"
  headers = {"X-API-Key": "3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI"}
  payload = {
      "to": "1234567890",
      "mediaUrl": "https://example.com/image.jpg",
      "message": "Check out this image!",
      "type":"image"
  }

  response = requests.post(url, json=payload, headers=headers)
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "statusCode": 200,
    "message": "Image message sent successfully",
    "data": {
      "messageId": "wamid.HBgNMTIzNDU2Nzg5MA==",
      "status": "sent",
      "to": "1234567890"
    }
  }
  ```
</ResponseExample>

<Note>
  The image URL must be publicly accessible. Supported formats: JPG, PNG, GIF.
</Note>
