Send Image Message

In this page we show you how to send a message containing an image.

An image conversation type refers to a message that includes an image, and optionally, text and/or actions.

Arguments/Parameters are additional pieces of information that you include in the request to customise the behavior of the API or to filter the results returned by the API.

In this table below you'll see the Arguments for this request.

Arguments
Explaination

mediaURL *required

Provides the URL where the file content is hosted or located.

text (optional)

The text content of the message. Maximum length of 4096 characters.

altText (optional)

A description of the image that's optional, provided mainly for accessibility reasons. By default, it'll be saved using the image file's name.

actions (optional)

An array of actions related to the message.

Both examples demonstrate how to construct a request to send an image message to a WhatsApp user using the specified API endpoint.

The placeholders indicate that certain values, such as image URLs and organization/app user IDs, will be provided dynamically or replaced with actual values when making the request.

{
    "type": "image",
    "mediaUrl": "https://example.org/test.jpeg",
    "altText": "Here is an image attached to the message"
}

The provided YAML configuration below defines an API specification using the OpenAPI (formerly known as Swagger) format.

Send image request

post

API request to send an image

Path parameters
orgIdstringRequired
appUserstringRequired
Body
typestring · enumRequiredExample: imagePossible values:
mediaUrlstringRequiredExample: https://example.org/test.png
altTextstringRequiredExample: Here is an image attached to the message
Responses
200
Successfully Replied.
application/json
post
POST /V1.1/org/{orgId}/whatsapp/appuser/{appUser}/reply HTTP/1.1
Host: www.channel360.co.za
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "type": "image",
  "mediaUrl": "https://example.org/test.png",
  "altText": "Here is an image attached to the message"
}
200

Successfully Replied.

{
  "conversation": {
    "_id": "7g5a782574s53d87487537642",
    "appMakerLastRead": 8475635121.871,
    "appUserLastRead": 9593289247.783,
    "unreadCount": 3
  },
  "message": {
    "_id": "662f89b15833c2b5bc9ae96e",
    "role": "appMaker",
    "authorId": "05thfg521jhf505h",
    "type": "image",
    "avatarUrl": "https://www.gravatar.com/avatar/00000000000000000000000000000000.png?s=200&d=mm",
    "mediaUrl": "https://example.org/test.png",
    "mediaSize": 5190,
    "altText": "Here is an image attached to the message",
    "received": 1714391473.791,
    "mediaType": "image/png",
    "source": {
      "type": "api"
    }
  }
}

Last updated

Was this helpful?