Whatsapp API

Introduction

As for destination parameter, the value is either phone number or group id. Example: 628123456xxxx (Whatsapp phone number account), 628123456xxxx-1243456xxxx (Whatsapp group id)


Primary access point / Base URL:
http://api.smscenter.net/wa_api/1.0/

How Get API Key


Grab your APIKey on login.smscenter.net, on Account > User management menu.


API Usage Notes

  • Credit top up might be required for making transactions.
  • Max API HIT is one hit per 50.0 milliseconds

WA API For Send Message


POST /wa_api/1.0/whatsapp/message


Note

  • This endpoint will deduct 1 WA Credits per 1500 (updated) character message.
  • If sender parameter is not set, random sender will be used to send the message.

Parameters


Name In Type Required Description
Body body SendMessageParam true none

Response


Status Meaning Description Schema
201 Created Successful Response SendMessageResponse
422 Unprocessable Entity Validation Error HTTP Validation Error

cUrl SAMPLE CODE


                            curl -X POST "${BASE_URL}/whatsapp/message" \
                                -H 'Content-type: application/json; charset=utf-8' \
                                -H "Accept: application/json" \
                                -H "APIKey: {YOUR_API_KEY}" \
                                -d "{
                                    \"destination\": \"{YOUR_DESTINATION}\",
                                    \"message\": \"Message text\"
                                }"
                            #     --insecure     # Ignore SSL Verification
                            

Body Parameters


Parameter { "timeout": 0, "sender": "string", "is_group": false, "destination": "string", "message": "string" }

Example Response


201 Response { "error": false, "error_code": 0, "message": "Data message", "data": { "sender": "string", "destination": "string", "message": "string", "ref_no": "string" } }