Oops! Facing network problem. Unable to load this page. Refresh

Hello Guest


Send a file to a new or existing chat.

Send a file to a new or existing chat. api document


Send a file to a new or existing chat.

POST /whatsapp/msg/send-file

Request Information

Request URLhttps://insprl.com/api/whatsapp/msg/send-file
AuthenticationRequired How to Generate API keys?
AuthorizationStringUse your "CLIENT KEY" for this Parameter
client_idStringRequiredUse your "CLIENT ID" for this Parameter
instance_idStringRequiredUse your WhatsApp Account "SPRL INSTANCE ID" for this Parameter
chat_idStringConditionalRequired if mobile is not set. Add Chat group id.
countrycodeNumericConditionalRequired if mobile is set. Use Contact number country code
mobileNumericConditionalRequired if Chat id is not set.
file_urlURLRequiredHTTPS link Or base64-encoded file with mime data
filenameStringRequiredFile name, for example myphoto.jpg or document.pdf
captionStringOptionalText under the photo
codeNumericFind the code information below under "API Codes"
messageString / ArrayAs per the request handler
100successStringOn Success
101failedStringAuthorization Error
102failedArrayParameter Validation Error
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://insprl.com/api/whatsapp/msg/send-file");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: {CLIENT_KEY}'
curl_setopt($ch, CURLOPT_POSTFIELDS, 
   'client_id' => '{CLIENT_ID}',
   'instance_id' => '{SPRL_INSTANCE_ID}',
   'countrycode' => '91',
   'mobile' => '9000000000',
   'file_url' => 'https://insprl.com/assets/images/NEW/share-img.jpg',
   'filename' => 'demoimage.jpg',
   'caption' => 'You are viewing Demo Image'
)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close ($ch);
"code": 100,
"message": "success",
"data": {
   "campaign_id": "2302383923",
   "msgid": "SKFIEK239D",
   "status": "sent",
   "msg": "ok"


If you'd like to use our REST API into your application, Feel free to contact us.

8088 948 172 or Contact Us

Latest From Blog

Read our latest posts from our blog

Bulk URL generators the NEXT BIG thing in Digital Marketing

If you are into marketing, you must have heard of Bulk URL shortening. They are saying Bulk URL shortening is the new ..

03 May, 2022 SRPL Shortener
How Best Indian URL Shorteners can help your business grow?

Every profit driven business enterprise is adopting and incorporating URL Shortening as a part of best business ..

24 Apr, 2022 SRPL Shortener
Email Marketing Do's and Don'ts

If your company or business isn’t using email promoting, ought to they? The solution is affirmative, as email is ..

01 Mar, 2021 Email Marketing

This website uses cookies in order to offer you the most relevant information. We may place cookies on your computer for functional, marketing and tracking purposes to improve our site and to show personalised content. You can read more about our cookies here: Cookie Policy. Please accept cookies for optimal performance.

Yes, I accept Cookies.