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

# Send image

> Send image messages

## Overview

Sends an image message to a contact. The `content.type` field must be `IMAGE` and the image is sent via URL in the `attachments` array.

Optionally, you can include a `caption` with the image.

<Note>
  This endpoint only works when the [conversation window](/en/conversation-window) is open (24 hours).
</Note>


## OpenAPI

````yaml en/messages/openapi-image.json POST /v1/channels/{channelId}/messages
openapi: 3.1.0
info:
  title: Hub Message - Send Image
  version: 1.0.0
servers:
  - url: https://api.hubmessage.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/messages:
    post:
      tags:
        - Messages
      summary: Send image
      description: Sends a message with an image.
      operationId: sendImageMessage
      parameters:
        - name: channelId
          in: path
          required: true
          description: Channel ID
          schema:
            type: string
            example: YOUR_CHANNEL_ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendImageRequest'
            example:
              recipient:
                identifier: '5511999999999'
              content:
                type: IMAGE
                attachments:
                  - url: https://example.com/image.jpg
                    caption: Image caption
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SendImageRequest:
      type: object
      required:
        - recipient
        - content
      properties:
        recipient:
          type: object
          required:
            - identifier
          properties:
            identifier:
              type: string
              description: Recipient phone number (country code + area code + number)
              example: '5511999999999'
        content:
          type: object
          required:
            - type
            - attachments
          properties:
            type:
              type: string
              description: Message type
              enum:
                - IMAGE
            attachments:
              type: array
              description: List of attachments
              items:
                type: object
                required:
                  - url
                properties:
                  url:
                    type: string
                    description: Image URL
                  caption:
                    type: string
                    description: Image caption
    MessageResponse:
      type: object
      properties:
        messageId:
          type: string
          description: Sent message ID
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
  responses:
    MessageSuccess:
      description: Message sent successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            messageId: wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0
    Unauthorized:
      description: Invalid or missing token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generated in the Hub Message Security panel

````