Contact Sales
Developers

WhatsApp Business API Reference

This documents SMSala's WhatsApp messaging API for developers integrating bulk messaging, OTP, templates, and delivery tracking. Every endpoint below includes its full parameter table and real request/response examples.

WhatsApp Business API

Authentication

Every request requires an ApiToken. Depending on the endpoint, it's passed either as a field in the JSON/form-data request body (POST) or as a query-string parameter (GET) — each endpoint below shows both where applicable.

Send OTP

POST + GEThttps://api2.smsala.com/whatsapp/SendOtp

Parameters

ParamTypeRequiredDescription
PhoneNumberStringRequiredRecipient's phone number with country code
OtpCodeStringRequiredOTP value to send
ApiTokenStringRequiredUnique API token for authorization
CallbackUrlStringOptionalURL to receive delivery status
TemplateIdStringRequiredID of the WhatsApp template to use

POST request body

send-otp.http
  1. POST https://api2.smsala.com/whatsapp/SendOtp
  2. Content-Type: application/json
  3. {
  4. "PhoneNumber": "919906785432",
  5. "OtpCode": "1234",
  6. "ApiToken": "1h9tQbGNPOyNrVpP",
  7. "CallbackUrl": "https://www.localhost:56631/SendResponse",
  8. "TemplateId": 3
  9. }

GET sample request

send-otp-get.http
  1. GET https://api2.smsala.com/whatsapp/SendOtp
  2. ?PhoneNumber=91999900011
  3. &OtpCode=1234
  4. &ApiToken=qrOKq05UZPFr8Kjf
  5. &CallbackUrl=https://www.localhost:56631/SendResponse
  6. &TemplateId=3

Success response

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "Message Accepted",
  5. "ReturnData": 1099
  6. }
  7. # ReturnData is the generated WhatsappCampaignId.

Send Message

POST + GEThttps://api2.smsala.com/whatsapp/SendMessage

Parameters

ParamTypeRequiredDescription
ApiTokenStringRequiredAPI token for authentication
TemplateIdStringRequiredTemplate ID to be used
QuickNumberStringRequired only if QuickNumberFile is not provided
CallbackUrlStringOptionalCallback URL for delivery status
CampaignNameStringOptionalName of the campaign
SampleStringOptionalSample data to populate the template
ButtonExampleStringOptionalURL for template button (if any)
TemplateFilefileOptionalTemplate file (e.g., media content)
TemplateFileExtensionStringOptionalFile extension of the template file
QuickNumberFilefileRequired only if QuickNumber is not provided
QuickNumberFileExtensionStringOptionalFile extension of quick number file
QuickNumberFileColumnStringRequired only if QuickNumberFile is provided
IsScheduledbooleanOptionalSet to true to schedule the message
TimeZoneIdbyteRequired if IsScheduled is true
FinalEffectiveDateDateTimeRequired if IsScheduled is trueDate for scheduled delivery
FinalEffectiveTimetimeSpanRequired if IsScheduled is trueTime for scheduled delivery

ActualScheduleDateTime appears in the source doc's sample form-data example but has no corresponding row in its parameter table — confirmed against the full source doc, this is a real gap in the doc itself, not something we've invented a description for. Confirm the field's exact behavior with the API team before relying on it.

POST form-data example

send-message.sh
  1. curl -X POST https://api2.smsala.com/whatsapp/SendMessage \
  2. -F "ApiToken=btRPVK48r9VlZC9h" \
  3. -F "TemplateId=28" \
  4. -F "QuickNumber=97155555555" \
  5. -F "CallbackUrl=https://www.abc:56631/SendResponse" \
  6. -F "CampaignName=abc" \
  7. -F "Sample=Variable 1, Variable 2" \
  8. -F "ButtonExample=www.google.com" \
  9. -F "IsScheduled=true" \
  10. -F "TimeZoneId=2" \
  11. -F "FinalEffectiveDate=2025-04-28" \
  12. -F "FinalEffectiveTime=23:12:00"
  13. # TemplateFile / QuickNumberFile are attached as additional form fields
  14. # (e.g. -F "TemplateFile=@/path/to/file") when a media template or a
  15. # recipient-list file is used instead of a single QuickNumber.

GET sample request (text templates only)

send-message-get.http
  1. GET https://api2.smsala.com/whatsapp/SendMessage
  2. ?TemplateId=2014
  3. &QuickNumber=8025081067
  4. &ApiToken=btRPVK5W88VlZC9h
  5. &CallbackUrl=https://www.abc:56631/SendResponse
  6. &Sample=User,1234
  7. &ButtonExample=www.google.com
  8. &IsScheduled=true
  9. &TimeZoneId=2
  10. &FinalEffectiveDate=2025-04-28
  11. &FinalEffectiveTime=23:12:00

Success response

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 40,
  4. "ErrorDescription": "Message Accepted",
  5. "ReturnData": 1101
  6. }
  7. # ErrorCode 40 indicates successful acceptance. ReturnData contains the
  8. # newly created WhatsappCampaignId.

Get Time Zone List

POST + GEThttps://api2.smsala.com/common/GetTimeZoneList

Parameters

ParamTypeRequiredDescription
ApiTokenStringRequiredUnique API token for authorization

POST request body

get-time-zone-list.http
  1. POST https://api2.smsala.com/common/GetTimeZoneList
  2. Content-Type: application/json
  3. { "ApiToken": "your_api_token" }

GET sample request

get-time-zone-list-get.http
  1. GET https://api2.smsala.com/common/GetTimeZoneList?ApiToken=your_api_token

Response example

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": [
  6. { "TimeZoneId": 1, "TimeZoneName": "Dateline Standard Time (-12:00)" },
  7. { "TimeZoneId": 2, "TimeZoneName": "UTC-11 (-11:00)" },
  8. { "TimeZoneId": 3, "TimeZoneName": "Aleutian Standard Time (-10:00)" },
  9. { "TimeZoneId": 4, "TimeZoneName": "Hawaiian Standard Time (-10:00)" },
  10. { "TimeZoneId": 5, "TimeZoneName": "Marquesas Standard Time (-09:30)" },
  11. { "TimeZoneId": 6, "TimeZoneName": "Alaskan Standard Time (-09:00)" }
  12. // ... more time zones
  13. ]
  14. }
  15. # TimeZoneId is used in scheduled WhatsApp message APIs to specify the time
  16. # zone for delivery. The list above is truncated — call this endpoint for
  17. # the full set.

Get WhatsApp Delivery Report (DLR)

POST + GEThttps://api2.smsala.com/whatsapp/GetDlrDetails

Parameters

ParamTypeRequiredDescription
ApiTokenStringRequiredAuth token
WhatsAppCampaignIdStringRequiredCampaign ID for which to fetch delivery report

Response Fields

FieldTypeDescription
IsSuccessboolIndicates if the request succeeded
ErrorCodeint0 means success
ErrorDescriptionstringOK on success
TotalSmsintNumber of messages sent
TotalCostfloatCost of the campaign
CurrencystringCurrency of the cost
CampaignStatus[]arrayDelivery report summary
DlrStatusstringe.g., "Read", "Delivered"
NumberofSmsintNumber of SMS/messages in that status

POST request body

get-dlr-details.http
  1. POST https://api2.smsala.com/whatsapp/GetDlrDetails
  2. Content-Type: application/json
  3. { "ApiToken": "0fpS2acaoKaVgy55", "WhatsAppCampaignId": "2308" }

GET sample request

get-dlr-details-get.http
  1. GET https://api2.smsala.com/whatsapp/GetDlrDetails?ApiToken=0fpS2acao5668jnnd&WhatsAppCampaignId=2310

Sample response

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": {
  6. "TotalSms": 1,
  7. "TotalCost": 0.02000,
  8. "Currency": "INR",
  9. "CampaignStatus": [
  10. { "DlrStatus": "Read", "NumberofSms": 1 }
  11. ]
  12. }
  13. }

Get WhatsApp Campaign Details

POST + GEThttps://api2.smsala.com/whatsapp/GetWhatsAppCampaignDetails

Parameters

ParamTypeRequiredDescription
ApiTokenStringRequiredAuth token
campaignIdStringRequiredCampaign ID(s) to fetch — comma-separated for multiple

Response Fields

FieldTypeDescription
WhatsAppCampaignIdintUnique ID of the WhatsApp campaign
WhatsAppCampaignParentIdint/nullID of parent campaign if recurring; null if none
CampaignStatusintStatus code (e.g., 2 for Completed)
CampaignStatusNamestringName/description of the status
UserNamestringUsername of account that created the campaign
CampaignNamestringName of the campaign
TotalAudienceintTotal recipients in the campaign
IsScheduledbooleanWhether campaign was scheduled
ReOccurringSchedulebooleanWhether campaign is recurring
ScheduledDateTimestring/nullScheduled date & time, null if not scheduled
SubmittedDateTimestringDate & time submitted
FirstRunDateTimestringDate & time executed/sent
ScheduleTypeIdintType of scheduling (0 = no schedule)
ScheduleTypeNamestring/nullName of schedule type; null if none

POST request body

get-campaign-details.http
  1. POST https://api2.smsala.com/whatsapp/GetWhatsAppCampaignDetails
  2. Content-Type: application/json
  3. { "ApiToken": "0fpS2acaoK59872", "campaignId": "2404,2405" }

GET sample request

get-campaign-details-get.http
  1. GET https://api2.smsala.com/whatsapp/GetWhatsAppCampaignDetails?ApiToken=0fpS2acaoKaVgy55&campaignId=2404,2405

Sample response (usernames anonymized)

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": [
  6. {
  7. "WhatsAppCampaignId": 2404,
  8. "WhatsAppCampaignParentId": null,
  9. "CampaignStatus": 2,
  10. "CampaignStatusName": "Completed",
  11. "UserName": "username1",
  12. "CampaignName": "api_97e636d0-e9af-415f-aa9d-dcb1534e5083",
  13. "TotalAudience": 3,
  14. "IsScheduled": false,
  15. "ReOccurringSchedule": false,
  16. "ScheduledDateTime": null,
  17. "SubmittedDateTime": "2025-05-02T11:39:28",
  18. "FirstRunDateTime": "2025-05-02T06:09:27.687",
  19. "ScheduleTypeId": 0,
  20. "ScheduleTypeName": null
  21. },
  22. {
  23. "WhatsAppCampaignId": 2405,
  24. "WhatsAppCampaignParentId": null,
  25. "CampaignStatus": 2,
  26. "CampaignStatusName": "Completed",
  27. "UserName": "username2",
  28. "CampaignName": "From Chat Box",
  29. "TotalAudience": 1,
  30. "IsScheduled": false,
  31. "ReOccurringSchedule": false,
  32. "ScheduledDateTime": null,
  33. "SubmittedDateTime": "2025-04-30T10:04:27",
  34. "FirstRunDateTime": "2025-04-30T04:34:26.63",
  35. "ScheduleTypeId": 0,
  36. "ScheduleTypeName": null
  37. }
  38. ]
  39. }

Add WhatsApp Template

POSThttps://api2.smsala.com/whatsapp/templates/add

Parameters

ParamTypeRequiredDescription
ApiTokenstringYESAPI access token
TemplateNamestringYESName of the new template
TemplateCategoryIdByteYES1 = Marketing, 2 = Utility, 3 = Authentication
CustomerWhatsAppNumberintYESRegistered WhatsApp business phone number
BodyTextfile *NORequired if TemplateCategoryId = 1 or 2
ButtonTypeIdbyteNO1 = OTP, 2 = Quick Reply, 3 = Phone Number, 4 = URL
ButtonTextstringNORequired for ButtonTypeId 2, 3, or 4
ButtonPhoneNumberstringNORequired if ButtonTypeId = 3
ButtonUrlstringNORequired if ButtonTypeId = 4
ButtonExamplestringNORequired if ButtonTypeId = 4
ComponentFormatIdbyteYES1 = Text, 2 = Image, 3 = Video, 4 = Document
FilefileNORequired if ComponentFormatId = 2, 3, or 4
HeaderTextstringNORequired for TemplateCategoryId 1 or 2
ExampleBodyTextstringNORequired for TemplateCategoryId 1 or 2 & if {{1}}, {{2}}, {{3}} appear in the text
FooterTextstringNORequired for TemplateCategoryId 1 or 2

The source doc lists BodyText's Type as "file" (marked * above) — likely a typo, since BodyText is plain text content everywhere else in the source doc. Shown as-is rather than silently corrected; confirm with whoever authored the original document before publishing.

Success response

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": "Template Added Successfully"
  6. }

Get All WhatsApp Templates List

POSThttps://api2.smsala.com/whatsapp/templates/getlist

Parameters

ParamTypeRequiredDescription
ApiTokenstringYESYour API access token

POST request body

get-templates-list.http
  1. POST https://api2.smsala.com/whatsapp/templates/getlist
  2. Content-Type: application/json
  3. { "ApiToken": "qrOKq05UZPFr8Kjf" }

Response example (array of templates)

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": [
  6. {
  7. "WhatsAppTemplateId": 88,
  8. "CustomerHttpConnectionId": 24,
  9. "CustomerWhatsAppCredentialId": 14,
  10. "CustomerWhatsAppConnectionId": 2,
  11. "CompanyId": 279,
  12. "ShortName": "NCNSKSD",
  13. "TemplateName": "follow_up",
  14. "TemplateType": 1,
  15. "FbTemplateId": "1090888053058893",
  16. "TemplateCategoryId": 2,
  17. "FileUploaded": null,
  18. "Language": "English (US)",
  19. "LanguageId": null,
  20. "CreateDateTime": "2025-04-30T21:02:39",
  21. "TemplateStatus": 2,
  22. "TemplateStatusDescription": "APPROVED",
  23. "FileExtension": null,
  24. "TemplateCategory": "Utility",
  25. "TemplateTypeDescription": "Text",
  26. "TemplateOtpTypeDescription": null,
  27. "HeaderTypeId": null,
  28. "HeaderText": null,
  29. "BodyTypeId": null,
  30. "BodyText": null,
  31. "FooterTypeId": null,
  32. "FooterText": null,
  33. "ButtonTypeId": null,
  34. "ButtonText": null,
  35. "ButtonPhoneNumber": null,
  36. "ButtonUrl": null,
  37. "ButtonExample": null,
  38. "OtpType": null,
  39. "FileContentType": null,
  40. "ExampleBodyText": null,
  41. "ButtonTypeIdDescription": null,
  42. "WhatsAppNo": "97155555555",
  43. "FileName": null
  44. }
  45. // ... more templates
  46. ]
  47. }
  48. # Response includes an array of templates with metadata such as ID, name,
  49. # status, type, and associated WhatsApp number.

Get WhatsApp Template Approval Status

GEThttps://api2.smsala.com/whatsapp/templates/GetById

Parameters

ParamTypeRequiredDescription
ApiTokenstringYESAPI access token
whatsAppTemplateIdintYESTemplate ID to be retrieved

GET sample request

get-template-status-get.http
  1. GET https://api2.smsala.com/whatsapp/templates/GetById?whatsAppTemplateId=891&apitoken=qrOKq05UZPFr8Kjf

Response example

response.json
  1. {
  2. "IsSuccess": true,
  3. "ErrorCode": 0,
  4. "ErrorDescription": "OK",
  5. "ReturnData": {
  6. "WhatsAppTemplateId": 891,
  7. "CustomerHttpConnectionId": 241,
  8. "CustomerWhatsAppCredentialId": 141,
  9. "CustomerWhatsAppConnectionId": 21,
  10. "CompanyId": 2791,
  11. "ShortName": null,
  12. "TemplateName": "no_reply",
  13. "TemplateType": 11,
  14. "FbTemplateId": "1184779178971630",
  15. "TemplateCategoryId": 2,
  16. "FileUploaded": null,
  17. "Language": "English (US)",
  18. "LanguageId": "18",
  19. "CreateDateTime": "2025-05-01T04:39:44",
  20. "TemplateStatus": 2,
  21. "TemplateStatusDescription": "APPROVED",
  22. "FileExtension": null,
  23. "TemplateCategory": "Utility",
  24. "TemplateTypeDescription": "Text",
  25. "TemplateOtpTypeDescription": null,
  26. "HeaderTypeId": null,
  27. "HeaderText": "Thank you for Choosing SMSALA",
  28. "BodyTypeId": null,
  29. "BodyText": "Hello, How are You?",
  30. "FooterTypeId": null,
  31. "FooterText": "Warm Regards!",
  32. "ButtonTypeId": 2,
  33. "ButtonText": "Yes",
  34. "ButtonPhoneNumber": null,
  35. "ButtonUrl": null,
  36. "ButtonExample": null,
  37. "OtpType": null,
  38. "FileContentType": null,
  39. "ExampleBodyText": "Name",
  40. "ButtonTypeIdDescription": "QUICK_REPLY",
  41. "WhatsAppNo": null,
  42. "FileName": null,
  43. "TemplateErrorDescription": null
  44. }
  45. }

Error Codes

CodeTextDescription
3API key not specifiedAPI key not specified
30Template Id not specifiedTemplate Id not specified
32Quick Number not specifiedQuick Number not specified
33Sample variables mismatch with body text placeholdersSample variables mismatch with body text placeholders
34Upload file for media templatesUpload file for media templates
36Invalid Template IdInvalid Template Id
37Provided template is not approved yetProvided template is not approved yet
38ButtonExample mismatch with Url placeholdersButtonExample mismatch with Url placeholders
39Authentication Category Template Not AllowedAuthentication Category Template Not Allowed
40Message AcceptedMessage Accepted
41Invalid Api TokenInvalid Api Token
42Insufficient Credit BalanceInsufficient Credit Balance
43IpAddress Not AllowedIpAddress Not Allowed
44Invalid Callback UrlInvalid Callback Url
45Button OTP not specifiedButton OTP not specified
59Invalid Msisdn/Mcc Mnc Not FoundInvalid Msisdn/Mcc Mnc Not Found
69Rate Plan Not FoundRate Plan Not Found
78Quick Number File Column Not SpecifiedQuick Number File Column Not Specified
82TimeZoneId or FinalEffectiveDate or FinalEffectiveTime not specifiedTimeZoneId or FinalEffectiveDate or FinalEffectiveTime not specified

Support

For assistance, reach out to help@smsala.com

FAQ

Frequently asked questions

Everything you need to know about routing, compliance and going live.

We maintain direct carrier connections and Sender ID rules across 190+ countries and 500+ operators — with MNP-aware routing and live network detection in every region.

Requirements vary by country and sender type. Our team handles registration, document submission, renewals and compliance monitoring on your behalf — and our database shows approval timelines and required documents before you commit.

Grey routes use unauthorised international gateways — cheaper, but unreliable and frequently blocked. SMSala uses direct, contracted carrier connections, so your traffic is compliant, delivered, and fully reportable.

Yes. Time-critical OTP and transactional SMS route over priority paths with sub-second delivery, smart failover and a 99.9% uptime SLA across all regions.

Most teams integrate via our SMPP or HTTP API in a day. Where Sender ID pre-registration is required, go-live depends on the country's approval window — which we tell you upfront and manage end to end.

Competitive per-message CPM based on destination and volume, with transparent real-time reporting and no hidden grey-route markups. Talk to our team for a quote tailored to your routes and volumes.