When the user sends a message with media (image, document, audio, video, or a sticker), the WhatsApp Business API client will download the media. Once the media downloads, our platform sends the event's notification to your Webhook. It contains information for identifying the media object and enables you to download the media file.

Common payload object description

KeyDescriptionExample
captionOptional

The provided caption for the media is only present if specified.
Purchase receipt
nameMedia file's name as received from the userfile1.pdf
urlYou can use this link to download the media file sent by the user.https://filemanager.gupshup.io/fm/wamedia/Jeet20/68f1e51b-ac53-4dfb-b970-7b23431ed1d3c
content-typeMIME type of the media fileapplication/pdf
urlExpiryThe timestamp for the expiry of the media download url1624957005482

Different payloads for different types of inbound media messages

{   
  "app": "DemoApp", 
  "timestamp": 1580227895991,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhAE0dyndiP9cVlr4hC5xU64",   
    "source": "918x98xx21x4",   
    "type": "image",    
    "payload": {    
      "caption": "Sample image",    
      "url": "https://filemanager.gupshup.io/fm/wamedia/DemoApp/546af999-825e-485b-bf54-4a3323824cca",  
      "contentType": "image/jpeg",  
      "urlExpiry": 1624956794816    
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "John",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}
{   
  "app": "DemoApp", 
  "timestamp": 1580228104661,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhC8Sqz6bdT95X8wgVH28wz8",   
    "source": "918x98xx21x4",   
    "type": "audio",    
    "payload": {    
      "url": "https://filemanager.gupshup.io/fm/wamedia/DemoApp/eae8a65a-b3ec-4085-94a6-3738338835fc",  
      "contentType": "audio/ogg; codecs=opus",  
      "urlExpiry": 1624956864635    
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "John",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}
{   
  "app": "DemoApp", 
  "timestamp": 1580228336953,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhDHMK-ctBQwqxyKoMbKcxES",   
    "source": "918x98xx21x4",   
    "type": "video",    
    "payload": {    
      "caption": "Sample video",    
      "url": "https://filemanager.gupshup.io/fm/wamedia/DemoApp/9f5ff20a-d14f-47ea-b336-754756a8b950",  
      "contentType": "video/mp4",   
      "urlExpiry": 1580833136954    
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "John",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}
{   
  "app": "DemoApp", 
  "timestamp": 1580228523976,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhCzqobr15BdMPcRup1fIXAJ",   
    "source": "918x98xx21x4",   
    "type": "file", 
    "payload": {    
      "caption": "Document caption",    
      "name": "samplefile.pdf", 
      "url": "https://filemanager.gupshup.io/fm/wamedia/DemoApp/b6e4e360-be01-4ffa-8928-84b8f40dd2eb",  
      "contentType": "application/pdf", 
      "urlExpiry": 1624957181122    
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "Smit",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}
{
  "app": "DemoApp",
  "timestamp": 1580228523976,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkYaYVSEEAhCzqobr15BdMPcRup1fIXAJ",
    "source": "918x98xx21x4",
    "type": "sticker",
    "payload": {
      "url": "https://filemanager.gupshup.io/fm/wamedia/DemoApp/32030cb2-68de-4c3c-a795-c4647fd4a9c7",
      "contentType": "image/webp",
      "urlExpiry": 1624957279044
    },
    "sender": {
      "phone": "918x98xx21x4",
      "name": "John",
      "country_code": "91",
      "dial_code": "8x98xx21x4"
    }
  }
}

What’s Next

In the next chapter of this guide, you'll learn about inbound message type: Interactive messages.