MSGPK.COM API
This documentation will provide instructions on how to quickly integrate whatsapp messaging services into various solutions by using HTTP API.
Parameters For API
Parameter | Type | Description |
---|---|---|
api_key | required | Your Api Key |
mobile | required | Phone with international format e.g. 923001234567 |
message | required | Text Message |
priority | optional | This parameter is optional, You can use it to create a professional queue for messages The Messages with less priority value are sent first. example of usage : priority = 0: for High priority like OTP messages. priority = 10: used with general messages. priority =20: Non-urgent notifications to your customers. priority =30: Non-urgent promotional offers to your customers. Default value : 10 |
type | required | 0=Text, 1= Images, 2= Documents Default Value: 0=Text type=1, send images Supported extensions ( jpg , jpeg , gif , png , svg , webp , bmp ) . Max file size : 3 MB . type=2, send documents Supported most extensions like ( zip , xlsx , csv , pptx , docx ....etc ) Max file size : 3 MB |
url | optional | image / documents HTTP Link (if type = 1 or 2) Sample: https://sample-videos.com/img/Sample-jpg-image-50kb.jpg Example: https://msgpk.com/api/send.php?api_key=???&mobile=923???&type=1&url=https://sample-videos.com/img/Sample-jpg-image-50kb.jpg&caption=ImageCaption&priority=0 |
file | optional | Use the following parameter file to send a direct file instead of any URL (POST Method using form-data ) Example: file=C:/Users/Downloads/sample.jpg |
schedule | optional | schedule=1 schedule_time=2023-12-22 05:38:06 Example: https://msgpk.com/api/send.php?api_key=???&mobile=923???&message=HelloWorld&schedule=1&schedule_time=2023-12-22%2005:38:06&priority=0 |
personalized | optional | Send Customized SMS (Text Data Will Be Change In Each & Every Messages) personalized=1 **message=**[{"mobile":923101234567,"message":"Hello Ahmad Shahzad"},{"mobile":923011234567,"message":"Hello Ali Ahmad"},{"mobile":923331234567,"message":"Hello Mustafa Kamal"}] Example: https://msgpk.com/api/send.php?api_key=???&mobile=923???&personalized=1&message=[{"mobile":923101234567,"message":"Hello%20%20Ahmad%20Shahzad"},{"mobile":923011234567,"message":"Hello%20%20Ali%20Ahmad"},{"mobile":923331234567,"message":"Hello%20%20Mustafa%20Kamal"}]&priority=0 |
POSTSend Text Message
YOUR_API_KEY
Your API-Key (Login Your Account Get It From Your Profile Or API Menu)
92XXXX
Recipient Mobile Number (International Format) i.e 234xxx,234xxx,234xxx
Hello World
Text Message
0
Message Queue (0 = Instant Delivery)
0
Message Type (0=Text, 1=Image, 2=Documents)
POSTSend Image Message
YOUR_API_KEY
Your API-Key (Login Your Account Get It From Your Profile Or API Menu)
923XXXX
Recipient Mobile Number (International Format) i.e 234xxx,234xxx,234xxx
0
Message Queue (0 = Instant Delivery)
1
Message Type (0=Text, 1=Image, 2=Documents)
https://sample-videos.com/img/Sample-jpg-image-50kb.jpg
image Link (HTTP URL Address)
Use This Method If You Want To Send Direct Images From Your System
Type Image Caption Here
Image Caption
POSTSend Document Message
YOUR_API_KEY
Your API-Key (Login Your Account Get It From Your Profile Or API Menu)
923XXXX
Recipient Mobile Number (International Format) i.e 234xxx,234xxx,234xxx
0
Message Queue (0 = Instant Delivery)
2
Message Type (0=Text, 1=Image, 2=Documents)
https://www.africau.edu/images/default/sample.pdf
Document Link (HTTP URL Address)
Use This Method If You Want To Send Direct Images From Your System
Type Your Document Caption Here
Document Caption