Connectly Documentation
  • 👋Welcome to Connectly.ai
  • 🚀Quick Start
    • Prerequisites
    • Authentication
    • Send WhatsApp template message
    • Send WhatsApp session message
  • 📣Campaigns
    • Campaign Sendout
      • Send Campaigns
  • 🤖Sofia AI
    • How to use Sofia AI?
    • Sofia AI API
      • Reference
        • Core Concepts
        • sales_assistant_v2/invoke/v1
  • 📱Message API
    • Message Service API
      • MessageService
        • Send template message
        • Send session message
      • Error codes
    • Webhook API
      • WebhookService
        • Create a webhook registration by event topic
        • Update an existing webhook registration by event topic
        • Get webhook registrations for business
        • Delete a webhook registration for business
      • Webhook Payload
        • Delivery Status Error Codes
        • Payload Media Types
  • 🤖Business Management
    • Business Management API
      • Template Management
        • Create a template
        • Get templates
      • Quality Signals
  • 📱Integrations
    • Integrations
      • WebEngage Integration
      • Message your customers on Zendesk through Connectly
      • Message your customer on Intercom through Connectly
    • [Alpha] Moengage
      • MessageService
        • Send Campaign via API
  • 📊Analytics
    • Analytics
      • [Alpha] Campaign report
      • Reports API
        • Webhooks configuration
  • 👀FAQ
  • Migrating WhatsApp Accounts
  • How to use time delay?
Powered by GitBook
On this page
  1. Message API
  2. Webhook API
  3. Webhook Payload

Payload Media Types

Webhook Payload Media Types

Connectly webhooks support 4 media types that correspond to certain MIME types:

Type
Description
Supported MIME types

image

images in .jpeg, .png format

- image/jpeg - image/png

video (Coming soon!)

video files

- video/mp4 - video/3gpp

audio

audio files and audio recordings

- audio/aac - audio/mp4 - audio/mpeg - audio/amr - audio/ogg - audio/ogg; codecs=opus

document

work documents, text files and all other file types that are not listed in the previous 3 categories

Most common MIMEs: - text/plain - application/pdf - application/vnd.ms-powerpoint - application/msword - application/vnd.ms-excel - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - application/vnd.android.package-archive

The media webhook payload has the following format:

JSON

{
  "timestamp": "1640204070",
  "sender": {
    "id": "+16315555500",
    "channelType": "whatsapp",
    "name": "Vasi from Connectly"
  },
  "recipient": {
    "id": "+16044441234",
    "channelType": "whatsapp",
    "name": "connectlyai"
  },
  "message": {
    "attachments": [
      {
        "type": "audio",
        "url": "https://cdn.connectly.ai/46b6/46b6725c-a821-480c-901b-8a76b990a25c"
      }
    ]
  }
}

The media payload is stored under attachments. Connectly supports sending multiple attachments in one webhook event but currently, only ONE attachment is sent at a time. The type indicates the media type and the media file is accessible by visiting the url. If you download the media file from the URL programmatically then you should get the MIME type from the response headers.

PreviousDelivery Status Error CodesNextBusiness Management API

Last updated 3 years ago

📱