⚙️
Channel360
HomeSign InSign Up
  • 🏠ChannelMobile Docs
  • Quick Start
    • Channel360 API
    • AgentChat API
    • Channel360 Guide
      • Dashboard
      • Templates
        • Template Creation
        • Template Configuration
      • Groups
        • Deleting Groups
        • Managing Group Details
      • Campaign
        • Campaign Creation
        • Campaign Statistics
      • Subscribers
        • Managing Subscribers
        • Subscriber Profile
  • Whatsapp Business API
    • WABA Prerequisites
    • WhatsApp Account Health
  • Our Products
    • Products
      • AgentChat
      • SMS
      • Broadcasting
      • ChatBot
  • API Usage
    • Using the Channel360 V1.1 API
      • Notifications
      • Templates
        • Create Templates
        • Read / Get Templates
        • Update Templates
        • Delete Templates
      • Webhooks
      • Conversations
        • Send Interactive Messages
        • Send Text Message
        • Send Media Message
          • Send Video Message
          • Send Image Message
          • Send File Message
        • Get Conversation History
  • Reference
    • API Reference
      • AgentChat API
      • Channel360 V1.1 API
  • FAQs
    • General FAQs
    • Channel360 FAQs
      • Templates
      • Notification Status
    • Technical FAQs
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. API Usage
  2. Using the Channel360 V1.1 API
  3. Conversations
  4. Send Media Message

Send File Message

In this page we show you how to send a message containing a pdf file.

PreviousSend Image MessageNextGet Conversation History

Last updated 1 year ago

Was this helpful?

A file-type conversation refers to a message that includes a file attachment.

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

Arguments
Explanation

mediaURL *required

Provides the URL where the file content is hosted or located

type *required

To specify the media type that will be used.

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.

Here's how to create a request for sending a file message to a WhatsApp user using the provided API endpoint.

{
    "type": "file",
    "mediaUrl": "https://www.w3.org/dummy.pdf",
    "altText": "Here is a pdf attached"
}
curl --location 'channel360.co.za/v1.1/org/{{orgId}}/whatsapp/appuser/{{appUserId}}/reply' \
--data '{
    "type": "file",
    "mediaUrl": "https://www.w3.org/dummy.pdf",
    "altText": "Here is a pdf attached"
}'

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

Send file request

post

API request to send a file

Path parameters
orgIdstringRequired
appUserstringRequired
Body
typestring · enumRequiredExample: filePossible values:
mediaUrlstringRequiredExample: https://www.w3.org/dummy.pdf
altTextstringRequiredExample: Here is a pdf attached
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: 92

{
  "type": "file",
  "mediaUrl": "https://www.w3.org/dummy.pdf",
  "altText": "Here is a pdf attached"
}
200

Successfully Replied.

{
  "conversation": {
    "_id": "5x3v39263cnmvb9537548416",
    "appMakerLastRead": 1714391363,
    "appUserLastRead": 1714390358.894,
    "unreadCount": 2
  },
  "message": {
    "_id": "edf85dfg2h82d5f2d93s",
    "role": "appMaker",
    "authorId": "2wm6nj7i8d09fg8h45c7",
    "type": "file",
    "avatarUrl": "https://www.gravatar.com/avatar/00000000000000000000000000000000.png?s=200&d=mm",
    "mediaUrl": "https://www.w3.org/dummy.pdf",
    "mediaSize": 15658,
    "altText": "Here is a pdf attached",
    "received": 1714391363,
    "mediaType": "application/pdf",
    "source": {
      "type": "api"
    }
  }
}