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

# Send Link Custom Preview

> Send a WhatsApp message with a link preview to enhance engagement and provide context to your recipients.

<Info>
  This feature is only available for subscribed accounts.
</Info>

Using **`send-text`** or **`send-text-safe`** you can send auto-generated link previews.

## You can send custom link preview in two ways:

### Provide a URL for the image.

<Frame>
  <img src="https://mintcdn.com/hypersender/wRhhZceRmMXcHkoh/images/docs/whatsapp/img/send-link-custom-preview-url.png?fit=max&auto=format&n=wRhhZceRmMXcHkoh&q=85&s=206cbce8c3864427fce93aa72c1a72b6" alt="send link custom preview url preview" width="1038" height="795" data-path="images/docs/whatsapp/img/send-link-custom-preview-url.png" />
</Frame>

<Info>
  WhatsApp requires the text to contain the **preview URL** anywhere in the text.

  Example: `"text": "Check this out! https://hypersender.com/"`
</Info>

<Warning>
  Please note that the URL must be publicly accessible and not require any authentication or special headers to access the file.
</Warning>

***

### Send the image it self as a file upload.

<Frame>
  <img src="https://mintcdn.com/hypersender/wRhhZceRmMXcHkoh/images/docs/whatsapp/img/send-link-custom-preview-file.png?fit=max&auto=format&n=wRhhZceRmMXcHkoh&q=85&s=682be9c460d5f788c100405af6847a4f" alt="send link custom preview file" width="1032" height="798" data-path="images/docs/whatsapp/img/send-link-custom-preview-file.png" />
</Frame>

<Info>
  By specifying the `high_quality` parameter as `true`, you can get a higher quality image.
</Info>

<Frame>
  <img src="https://mintcdn.com/hypersender/wRhhZceRmMXcHkoh/images/docs/whatsapp/img/send-link-custom-preview-preview.png?fit=max&auto=format&n=wRhhZceRmMXcHkoh&q=85&s=906ae3ae8afa499eb5e0f5c595ed5c52" alt="send link custom preview preview" width="1200" height="1519" data-path="images/docs/whatsapp/img/send-link-custom-preview-preview.png" />
</Frame>


## OpenAPI

````yaml v1/api-reference/whatsapp/whatsapp-collection.json POST /{instance}/send-link-custom-preview
openapi: 3.1.0
info:
  version: v1.0
  title: Hypersender WhatsApp API Docs
  description: >

    The Hypersender WhatsApp API is a powerful api to send and recieve messages
    using your own whatsapp number.

    Without the high costs of Meta's Whatsapp business API.


    In this Docs you'll learn how to use and integrate Hypersnder Whatsapp API
    into your existing system/service or application using simple API endpoints.


    **What you can Do?**


    - Send Text and basic Url messages.

    - Send Media through Link or uploaded file.

    - Send Audio through Link or uploaded file.

    - Send Contact Card

    - Send Location

    - Send Poll votes


    **You can also**


    - React to a message

    - Forward messages to other chats

    - Acknowledge messages (mark as read)

    - Star and unstar messages



    <hr />


    **Quick Demo**

      **Learn how to use Hypersender whatsapp API to send a message using Postman:**
      [Demo Link](https://app.hypersender.com/send-whatsapp-message-in-postman) **to easily interact with our API.**

    <hr />


    **postman collection**


    You can download our [Postman
    Collection](https://docs.hypersender.com/whatsapp-postman-collection.json)
    to easily interact with our API.


    ## Servers (Endpoints)


    - Production (activated):
    [https://app.hypersender.com/api/whatsapp/v1](https://app.hypersender.com/api/whatsapp/v1)
servers:
  - url: https://app.hypersender.com/api/whatsapp/v1
    description: Production
security:
  - Authorization: []
paths:
  /{instance}/send-link-custom-preview:
    post:
      tags:
        - Send Messages
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
            example: application/json
          examples:
            default:
              value: application/json
        - name: Content-Type
          in: header
          schema:
            type: string
            example: application/json
          examples:
            default:
              value: application/json
        - name: instance
          in: path
          description: Instance UUID copied from hypersender dashboard
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
          examples:
            default:
              value: '{{ instance_id }}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendLinkCustomPreview'
            examples:
              Example 1:
                value:
                  chatId: 1111111111@c.us
                  text: Check this out! https://hypersender.com/
                  reply_to: string
                  high_quality: true
                  preview_title: Hypersender is awesome
                  preview_description: Check this out, this is a custom link preview!
                  preview_url: https://hypersender.com/
                  preview_image_url: >-
                    https://m.media-amazon.com/images/M/MV5BMjRhYjdkOGMtZDY5Zi00OWEwLTlkOWEtYz.jpg
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      key:
                        type: object
                        properties:
                          remoteJid:
                            type: string
                          fromMe:
                            type: boolean
                          id:
                            type: string
                      message:
                        type: object
                        properties:
                          extendedTextMessage:
                            type: object
                            properties:
                              text:
                                type: string
                              matchedText:
                                type: string
                              description:
                                type: string
                              title:
                                type: string
                              previewType:
                                type: string
                              jpegThumbnail:
                                type: string
                              thumbnailDirectPath:
                                type: string
                              thumbnailSha256:
                                type: string
                              thumbnailEncSha256:
                                type: string
                              mediaKey:
                                type: string
                              mediaKeyTimestamp:
                                type: string
                              thumbnailHeight:
                                type: number
                              thumbnailWidth:
                                type: number
                      messageTimestamp:
                        type: string
                      status:
                        type: string
                x-examples:
                  Example 1:
                    content:
                      text: |-
                        https://hypersender.com

                              Hypersender is Amazing!
                      matchedText: https://hypersender.com
                      canonicalUrl: https://hypersender.com
                      description: >-
                        Hypersender is a powerful API for sending Whatsapp and
                        SMS messages. It is designed to be simple and easy to
                        use, with a focus on security and reliability.
                      title: Hypersender
                      previewType: NONE
              examples:
                Example 1:
                  value:
                    key:
                      remoteJid: 1111111111@s.whatsapp.net
                      fromMe: true
                      id: 3EB091A456D98511123FEA
                    message:
                      extendedTextMessage:
                        text: Check this out! https://hypersender.com/
                        matchedText: https://hypersender.com/
                        description: Check this out, this is a custom link preview!
                        title: Hypersender is awesome
                        previewType: NONE
                        jpegThumbnail: >-
                          /9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCAARACADASIAAhEBAxEB/8QAGgAAAgIDAAAAAAAAAAAAAAAAAAUDBAECBv/EACwQAAECBQIEBAcAAAAAAAAAAAECAwAEBREhBjESEzVBYYGDsTI0UXJ0srP/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAXEQEBAQEAAAAAAAAAAAAAAAAAARIC/9oADAMBAAIRAxEAPwBi2HEqaUEXTY54hEEjVF1MOrTLqa5V0pJVnfe0Y1CX6fLS77E206gLIIbTw2NsE2ORviI9OzQmWVNKfQ282LhAbCisdzDehI3VU3kVBEutlTbjgt8YORkeREQ1GvKp86gusp5YBTw8YVfxt4WitW5GWS4h+cfcUt10qBKSjt9ADsIpT7NOm5d0tVdgu9kKSc22AO/naDRzDjUHRXPuT7wr0v8ANzH459xBBGSdDqFK9b+cclpjrvpPfoYIIoa//9k=
                        thumbnailDirectPath: >-
                          /o1/v/t24/f2/m232/AQMNFP0XcTmGZckNL1WI6_-o4AAzaPTlTtqRat-YC7SlRrlpV8e_0fmUj7xBK5kS_9m4B-3wgG8wJ-aitI6TQqAXSTHEUhH5u4m1QCxRmw?ccb=9-4&oh=01_Q5Aa2gFW4du4I6OfD9Y_djyP1KIukQnFQRfu8YEfQJ6ydbY8JQ&oe=68F20A99&_nc_sid=e6ed6c
                        thumbnailSha256: KccP5I7AxrmcoUeD868qd0ISDFf6TYUTtw6dJS/Sdjk=
                        thumbnailEncSha256: Vveij+Avc8amAa2u6AtPSZG/07FzjJfDtMJqmYt/g4A=
                        mediaKey: Tp1eSebY/WJr+mZmzWmbRAj4WXyEmGsvSKZySAw9Kj8=
                        mediaKeyTimestamp: 1758105918
                        thumbnailHeight: 649
                        thumbnailWidth: 1200
                    messageTimestamp: 1758105918,
                    status: PENDING
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      security:
        - Authorization: []
components:
  schemas:
    SendLinkCustomPreview:
      type: object
      properties:
        chatId:
          type: string
          description: >-
            Contact number - **learn what is
            [`chatId`](https://docs.hypersender.com/docs/whatsapp/what-is-chatid)**
          example: 111111111111@c.us
        text:
          type: string
          description: text should contain the url to send
        reply_to:
          type: string
          description: reply to message id
        high_quality:
          type: boolean
          description: high quality for the image
        preview_title:
          type: string
          description: title of the link preview
        preview_description:
          type: string
          description: description of the link preview
        preview_url:
          type: string
          description: must be a valid URL
        preview_image_url:
          type: string
          description: >-
            URL of the image to be used in the link preview - (only if
            preview_image_file is not provided)
        preview_image_file:
          type: string
          description: >-
            file of the image to be used in the link preview - (only if
            preview_image_url is not provided)
      required:
        - chatId
        - text
        - preview_title
        - preview_description
        - preview_url
        - preview_image_url
        - preview_image_file
    NotFoundError:
      type: object
      title: NotFoundError
      example:
        message: Resource not found.
      properties:
        message:
          type: string
      x-examples:
        Example 1:
          message: Resource not found.
      x-stoplight:
        id: ar3vz55asbxme
    ValidationError:
      type: object
      title: ValidationError
      properties:
        message:
          type: string
        errors:
          type: object
          description: Invalid or missing feilds will be shown here
        statusCode:
          type: number
      example:
        message: The given data was invalid.
        errors: {}
        statusCode: 422
      required:
        - errors
        - statusCode
      x-examples:
        Multiple fields Error:
          message: The given data was invalid.
          errors:
            messages:
              - The number you want to send the message to is not on whatsapp.
            jid: 20121323124131@s.whatsapp.net
            exists: false
          statusCode: 422
        'Single Field error ':
          message: The given data was invalid.
          errors:
            messages:
              - textMessage.text should not be empty
          statusCode: 422
      x-stoplight:
        id: 90x3wfxw7gqcb
    ServerError:
      type: object
      title: ServerError
      properties:
        message:
          type: string
      example:
        message: Internal Server Error
      x-stoplight:
        id: 2fhq2gihsfreh
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````