WhatsApp API Documentation

This page documents the endpoints provided by WhatsApp Api.

Table of Contents


Send Text

Back to top

Method: POST

Route: /api/v1/WhatsApp/SendText

Query Params:

Example:

curl -X POST "https://your-host/api/v1/WhatsApp/SendText?subRef=SUB123&secret=SECRET&phone=2189...&text=Hello%20World&direct=false"

Send Image

Back to top

Method: POST

Route: /api/v1/WhatsApp/SendImage

Query Params:

Body (JSON): `dataDto` with `data` as base64 byte array.

Example:

curl -X POST "https://your-host/api/v1/WhatsApp/SendImage?subRef=SUB123&secret=SECRET&phone=2189...&imageFormat=jpg&caption=Sample" \
  -H "Content-Type: application/json" \
  -d '{"data":"BASE64_IMAGE_BYTES"}'

Send Image from Url

Back to top

Method: POST

Route: /api/v1/WhatsApp/SendImageFromUrl

Query Params:

Body (JSON):imageUrlDto with url.

Example:

curl -X POST "https://your-host/api/v1/WhatsApp/SendImageFromUrl?subRef=SUB123&secret=SECRET&phone=2189...&imageFormat=png&caption=From%20Web" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/image.png"}'

Send File

Back to top

Method: POST

Route: /api/v1/WhatsApp/SendFile

Query Params:

Body (JSON): `dataDto` with `data` as base64 byte array.

Example:

curl -X POST "https://your-host/api/v1/WhatsApp/SendFile?subRef=SUB123&secret=SECRET&phone=2189...&mimeType=pdf&fileName=document.pdf&caption=Docs" \
  -H "Content-Type: application/json" \
  -d '{"data":"BASE64_FILE_BYTES"}'

Send File from Url

Back to top

Method: POST

Route: /api/v1/WhatsApp/SendFileFromUrl

Query Params:

Body (JSON): fileUrlDto with url

Example:

curl -X POST "https://your-host/api/v1/WhatsApp/SendFileFromUrl?subRef=SUB123&secret=SECRET&phone=2189...&mimeType=word&fileName=report.docx&caption=Report" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/report.docx"}'

Get Message Status

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetMsgStatus

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetMsgStatus?subRef=SUB123&secret=SECRET&msgId=1001"

Is User Exists

Back to top

Method: GET

Route: /api/v1/WhatsApp/IsUserExists

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/IsUserExists?subRef=SUB123&secret=SECRET&phone=2189..."

Get QR Code Value

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetQRCodeValue

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetQRCodeValue?subRef=SUB123&secret=SECRET"

Get QR Code Image

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetQRCodeImage

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetQRCodeImage?subRef=SUB123&secret=SECRET"

Get QR Code Image Data Url

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetQRCodeImageDataUrl

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetQRCodeImageDataUrl?subRef=SUB123&secret=SECRET"

Request Authentication Code

Back to top

Method: GET

Route: /api/v1/WhatsApp/RequestAuthCode

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/RequestAuthCode?subRef=SUB123&secret=SECRET&phone=2189..."

Get Linked Phone Info

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetPhoneInfo

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetPhoneInfo?subRef=SUB123&secret=SECRET"

Get Groups

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetGroups

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetGroups?subRef=SUB123&secret=SECRET"

Get Group

Back to top

Method: GET

Route: /api/v1/WhatsApp/GetGroup

Query Params:

Example:

curl "https://your-host/api/v1/WhatsApp/GetGroup?subRef=SUB123&secret=SECRET&groupId=GROUPID"

Delete Group

Back to top

Method: DELETE

Route: /api/v1/WhatsApp/DeleteGroup

Query Params:

Example:

curl -X DELETE "https://your-host/api/v1/WhatsApp/DeleteGroup?subRef=SUB123&secret=SECRET&groupId=GROUPID"