Send Media message using URL

This endpoint sends a media message to a phone number on WhatsApp.

Please note: We can only send a media message if the recipient has initiated the conversation.

URL:​ ​https://waapi.pepipost.com/api/v2/message/

Method: POST

Parameters:

Request Body

{ 
  "message": [
  { 
    "recipient_whatsapp": "919833078369", 
    "message_type": "media", 
    "recipient_type": "individual", 
    "source": "fa9d647a-c8d7-423e-bd27-7d2ca2875dc1",
    "x-apiheader": "Your_unique_identifier", 
    "type_media": [
      { 
      "attachments": [
          { 
          "attachment_url": "https://img.freepik.com/free-vector/triangular-dark-polygonal-background_23-2148261453.jpg", 
          "attachment_type": "image",
          "caption": "yourdocumentcaption" 
          }
      ] 
      }
    ] 
  }
  ] 
} 
  

Responses for message API

In case of success

{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

In case of failure

{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 

According to error code and message will change.

Last updated