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
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| PhoneNumber | String | Required | Recipient's phone number with country code |
| OtpCode | String | Required | OTP value to send |
| ApiToken | String | Required | Unique API token for authorization |
| CallbackUrl | String | Optional | URL to receive delivery status |
| TemplateId | String | Required | ID of the WhatsApp template to use |
POST request body
- POST https://api2.smsala.com/whatsapp/SendOtp
- Content-Type: application/json
- {
- "PhoneNumber": "919906785432",
- "OtpCode": "1234",
- "ApiToken": "1h9tQbGNPOyNrVpP",
- "CallbackUrl": "https://www.localhost:56631/SendResponse",
- "TemplateId": 3
- }
GET sample request
- GET https://api2.smsala.com/whatsapp/SendOtp
- ?PhoneNumber=91999900011
- &OtpCode=1234
- &ApiToken=qrOKq05UZPFr8Kjf
- &CallbackUrl=https://www.localhost:56631/SendResponse
- &TemplateId=3
Success response
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "Message Accepted",
- "ReturnData": 1099
- }
- # ReturnData is the generated WhatsappCampaignId.
Send Message
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | String | Required | API token for authentication |
| TemplateId | String | Required | Template ID to be used |
| QuickNumber | String | Required only if QuickNumberFile is not provided | — |
| CallbackUrl | String | Optional | Callback URL for delivery status |
| CampaignName | String | Optional | Name of the campaign |
| Sample | String | Optional | Sample data to populate the template |
| ButtonExample | String | Optional | URL for template button (if any) |
| TemplateFile | file | Optional | Template file (e.g., media content) |
| TemplateFileExtension | String | Optional | File extension of the template file |
| QuickNumberFile | file | Required only if QuickNumber is not provided | — |
| QuickNumberFileExtension | String | Optional | File extension of quick number file |
| QuickNumberFileColumn | String | Required only if QuickNumberFile is provided | — |
| IsScheduled | boolean | Optional | Set to true to schedule the message |
| TimeZoneId | byte | Required if IsScheduled is true | — |
| FinalEffectiveDate | DateTime | Required if IsScheduled is true | Date for scheduled delivery |
| FinalEffectiveTime | timeSpan | Required if IsScheduled is true | Time 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
- curl -X POST https://api2.smsala.com/whatsapp/SendMessage \
- -F "ApiToken=btRPVK48r9VlZC9h" \
- -F "TemplateId=28" \
- -F "QuickNumber=97155555555" \
- -F "CallbackUrl=https://www.abc:56631/SendResponse" \
- -F "CampaignName=abc" \
- -F "Sample=Variable 1, Variable 2" \
- -F "ButtonExample=www.google.com" \
- -F "IsScheduled=true" \
- -F "TimeZoneId=2" \
- -F "FinalEffectiveDate=2025-04-28" \
- -F "FinalEffectiveTime=23:12:00"
- # TemplateFile / QuickNumberFile are attached as additional form fields
- # (e.g. -F "TemplateFile=@/path/to/file") when a media template or a
- # recipient-list file is used instead of a single QuickNumber.
GET sample request (text templates only)
- GET https://api2.smsala.com/whatsapp/SendMessage
- ?TemplateId=2014
- &QuickNumber=8025081067
- &ApiToken=btRPVK5W88VlZC9h
- &CallbackUrl=https://www.abc:56631/SendResponse
- &Sample=User,1234
- &ButtonExample=www.google.com
- &IsScheduled=true
- &TimeZoneId=2
- &FinalEffectiveDate=2025-04-28
- &FinalEffectiveTime=23:12:00
Success response
- {
- "IsSuccess": true,
- "ErrorCode": 40,
- "ErrorDescription": "Message Accepted",
- "ReturnData": 1101
- }
- # ErrorCode 40 indicates successful acceptance. ReturnData contains the
- # newly created WhatsappCampaignId.
Get Time Zone List
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | String | Required | Unique API token for authorization |
POST request body
- POST https://api2.smsala.com/common/GetTimeZoneList
- Content-Type: application/json
- { "ApiToken": "your_api_token" }
GET sample request
- GET https://api2.smsala.com/common/GetTimeZoneList?ApiToken=your_api_token
Response example
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": [
- { "TimeZoneId": 1, "TimeZoneName": "Dateline Standard Time (-12:00)" },
- { "TimeZoneId": 2, "TimeZoneName": "UTC-11 (-11:00)" },
- { "TimeZoneId": 3, "TimeZoneName": "Aleutian Standard Time (-10:00)" },
- { "TimeZoneId": 4, "TimeZoneName": "Hawaiian Standard Time (-10:00)" },
- { "TimeZoneId": 5, "TimeZoneName": "Marquesas Standard Time (-09:30)" },
- { "TimeZoneId": 6, "TimeZoneName": "Alaskan Standard Time (-09:00)" }
- // ... more time zones
- ]
- }
- # TimeZoneId is used in scheduled WhatsApp message APIs to specify the time
- # zone for delivery. The list above is truncated — call this endpoint for
- # the full set.
Get WhatsApp Delivery Report (DLR)
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | String | Required | Auth token |
| WhatsAppCampaignId | String | Required | Campaign ID for which to fetch delivery report |
Response Fields
| Field | Type | Description |
|---|---|---|
| IsSuccess | bool | Indicates if the request succeeded |
| ErrorCode | int | 0 means success |
| ErrorDescription | string | OK on success |
| TotalSms | int | Number of messages sent |
| TotalCost | float | Cost of the campaign |
| Currency | string | Currency of the cost |
| CampaignStatus[] | array | Delivery report summary |
| DlrStatus | string | e.g., "Read", "Delivered" |
| NumberofSms | int | Number of SMS/messages in that status |
POST request body
- POST https://api2.smsala.com/whatsapp/GetDlrDetails
- Content-Type: application/json
- { "ApiToken": "0fpS2acaoKaVgy55", "WhatsAppCampaignId": "2308" }
GET sample request
- GET https://api2.smsala.com/whatsapp/GetDlrDetails?ApiToken=0fpS2acao5668jnnd&WhatsAppCampaignId=2310
Sample response
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": {
- "TotalSms": 1,
- "TotalCost": 0.02000,
- "Currency": "INR",
- "CampaignStatus": [
- { "DlrStatus": "Read", "NumberofSms": 1 }
- ]
- }
- }
Get WhatsApp Campaign Details
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | String | Required | Auth token |
| campaignId | String | Required | Campaign ID(s) to fetch — comma-separated for multiple |
Response Fields
| Field | Type | Description |
|---|---|---|
| WhatsAppCampaignId | int | Unique ID of the WhatsApp campaign |
| WhatsAppCampaignParentId | int/null | ID of parent campaign if recurring; null if none |
| CampaignStatus | int | Status code (e.g., 2 for Completed) |
| CampaignStatusName | string | Name/description of the status |
| UserName | string | Username of account that created the campaign |
| CampaignName | string | Name of the campaign |
| TotalAudience | int | Total recipients in the campaign |
| IsScheduled | boolean | Whether campaign was scheduled |
| ReOccurringSchedule | boolean | Whether campaign is recurring |
| ScheduledDateTime | string/null | Scheduled date & time, null if not scheduled |
| SubmittedDateTime | string | Date & time submitted |
| FirstRunDateTime | string | Date & time executed/sent |
| ScheduleTypeId | int | Type of scheduling (0 = no schedule) |
| ScheduleTypeName | string/null | Name of schedule type; null if none |
POST request body
- POST https://api2.smsala.com/whatsapp/GetWhatsAppCampaignDetails
- Content-Type: application/json
- { "ApiToken": "0fpS2acaoK59872", "campaignId": "2404,2405" }
GET sample request
- GET https://api2.smsala.com/whatsapp/GetWhatsAppCampaignDetails?ApiToken=0fpS2acaoKaVgy55&campaignId=2404,2405
Sample response (usernames anonymized)
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": [
- {
- "WhatsAppCampaignId": 2404,
- "WhatsAppCampaignParentId": null,
- "CampaignStatus": 2,
- "CampaignStatusName": "Completed",
- "UserName": "username1",
- "CampaignName": "api_97e636d0-e9af-415f-aa9d-dcb1534e5083",
- "TotalAudience": 3,
- "IsScheduled": false,
- "ReOccurringSchedule": false,
- "ScheduledDateTime": null,
- "SubmittedDateTime": "2025-05-02T11:39:28",
- "FirstRunDateTime": "2025-05-02T06:09:27.687",
- "ScheduleTypeId": 0,
- "ScheduleTypeName": null
- },
- {
- "WhatsAppCampaignId": 2405,
- "WhatsAppCampaignParentId": null,
- "CampaignStatus": 2,
- "CampaignStatusName": "Completed",
- "UserName": "username2",
- "CampaignName": "From Chat Box",
- "TotalAudience": 1,
- "IsScheduled": false,
- "ReOccurringSchedule": false,
- "ScheduledDateTime": null,
- "SubmittedDateTime": "2025-04-30T10:04:27",
- "FirstRunDateTime": "2025-04-30T04:34:26.63",
- "ScheduleTypeId": 0,
- "ScheduleTypeName": null
- }
- ]
- }
Add WhatsApp Template
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | string | YES | API access token |
| TemplateName | string | YES | Name of the new template |
| TemplateCategoryId | Byte | YES | 1 = Marketing, 2 = Utility, 3 = Authentication |
| CustomerWhatsAppNumber | int | YES | Registered WhatsApp business phone number |
| BodyText | file * | NO | Required if TemplateCategoryId = 1 or 2 |
| ButtonTypeId | byte | NO | 1 = OTP, 2 = Quick Reply, 3 = Phone Number, 4 = URL |
| ButtonText | string | NO | Required for ButtonTypeId 2, 3, or 4 |
| ButtonPhoneNumber | string | NO | Required if ButtonTypeId = 3 |
| ButtonUrl | string | NO | Required if ButtonTypeId = 4 |
| ButtonExample | string | NO | Required if ButtonTypeId = 4 |
| ComponentFormatId | byte | YES | 1 = Text, 2 = Image, 3 = Video, 4 = Document |
| File | file | NO | Required if ComponentFormatId = 2, 3, or 4 |
| HeaderText | string | NO | Required for TemplateCategoryId 1 or 2 |
| ExampleBodyText | string | NO | Required for TemplateCategoryId 1 or 2 & if {{1}}, {{2}}, {{3}} appear in the text |
| FooterText | string | NO | Required 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
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": "Template Added Successfully"
- }
Get All WhatsApp Templates List
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | string | YES | Your API access token |
POST request body
- POST https://api2.smsala.com/whatsapp/templates/getlist
- Content-Type: application/json
- { "ApiToken": "qrOKq05UZPFr8Kjf" }
Response example (array of templates)
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": [
- {
- "WhatsAppTemplateId": 88,
- "CustomerHttpConnectionId": 24,
- "CustomerWhatsAppCredentialId": 14,
- "CustomerWhatsAppConnectionId": 2,
- "CompanyId": 279,
- "ShortName": "NCNSKSD",
- "TemplateName": "follow_up",
- "TemplateType": 1,
- "FbTemplateId": "1090888053058893",
- "TemplateCategoryId": 2,
- "FileUploaded": null,
- "Language": "English (US)",
- "LanguageId": null,
- "CreateDateTime": "2025-04-30T21:02:39",
- "TemplateStatus": 2,
- "TemplateStatusDescription": "APPROVED",
- "FileExtension": null,
- "TemplateCategory": "Utility",
- "TemplateTypeDescription": "Text",
- "TemplateOtpTypeDescription": null,
- "HeaderTypeId": null,
- "HeaderText": null,
- "BodyTypeId": null,
- "BodyText": null,
- "FooterTypeId": null,
- "FooterText": null,
- "ButtonTypeId": null,
- "ButtonText": null,
- "ButtonPhoneNumber": null,
- "ButtonUrl": null,
- "ButtonExample": null,
- "OtpType": null,
- "FileContentType": null,
- "ExampleBodyText": null,
- "ButtonTypeIdDescription": null,
- "WhatsAppNo": "97155555555",
- "FileName": null
- }
- // ... more templates
- ]
- }
- # Response includes an array of templates with metadata such as ID, name,
- # status, type, and associated WhatsApp number.
Get WhatsApp Template Approval Status
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| ApiToken | string | YES | API access token |
| whatsAppTemplateId | int | YES | Template ID to be retrieved |
GET sample request
- GET https://api2.smsala.com/whatsapp/templates/GetById?whatsAppTemplateId=891&apitoken=qrOKq05UZPFr8Kjf
Response example
- {
- "IsSuccess": true,
- "ErrorCode": 0,
- "ErrorDescription": "OK",
- "ReturnData": {
- "WhatsAppTemplateId": 891,
- "CustomerHttpConnectionId": 241,
- "CustomerWhatsAppCredentialId": 141,
- "CustomerWhatsAppConnectionId": 21,
- "CompanyId": 2791,
- "ShortName": null,
- "TemplateName": "no_reply",
- "TemplateType": 11,
- "FbTemplateId": "1184779178971630",
- "TemplateCategoryId": 2,
- "FileUploaded": null,
- "Language": "English (US)",
- "LanguageId": "18",
- "CreateDateTime": "2025-05-01T04:39:44",
- "TemplateStatus": 2,
- "TemplateStatusDescription": "APPROVED",
- "FileExtension": null,
- "TemplateCategory": "Utility",
- "TemplateTypeDescription": "Text",
- "TemplateOtpTypeDescription": null,
- "HeaderTypeId": null,
- "HeaderText": "Thank you for Choosing SMSALA",
- "BodyTypeId": null,
- "BodyText": "Hello, How are You?",
- "FooterTypeId": null,
- "FooterText": "Warm Regards!",
- "ButtonTypeId": 2,
- "ButtonText": "Yes",
- "ButtonPhoneNumber": null,
- "ButtonUrl": null,
- "ButtonExample": null,
- "OtpType": null,
- "FileContentType": null,
- "ExampleBodyText": "Name",
- "ButtonTypeIdDescription": "QUICK_REPLY",
- "WhatsAppNo": null,
- "FileName": null,
- "TemplateErrorDescription": null
- }
- }
Error Codes
| Code | Text | Description |
|---|---|---|
| 3 | API key not specified | API key not specified |
| 30 | Template Id not specified | Template Id not specified |
| 32 | Quick Number not specified | Quick Number not specified |
| 33 | Sample variables mismatch with body text placeholders | Sample variables mismatch with body text placeholders |
| 34 | Upload file for media templates | Upload file for media templates |
| 36 | Invalid Template Id | Invalid Template Id |
| 37 | Provided template is not approved yet | Provided template is not approved yet |
| 38 | ButtonExample mismatch with Url placeholders | ButtonExample mismatch with Url placeholders |
| 39 | Authentication Category Template Not Allowed | Authentication Category Template Not Allowed |
| 40 | Message Accepted | Message Accepted |
| 41 | Invalid Api Token | Invalid Api Token |
| 42 | Insufficient Credit Balance | Insufficient Credit Balance |
| 43 | IpAddress Not Allowed | IpAddress Not Allowed |
| 44 | Invalid Callback Url | Invalid Callback Url |
| 45 | Button OTP not specified | Button OTP not specified |
| 59 | Invalid Msisdn/Mcc Mnc Not Found | Invalid Msisdn/Mcc Mnc Not Found |
| 69 | Rate Plan Not Found | Rate Plan Not Found |
| 78 | Quick Number File Column Not Specified | Quick Number File Column Not Specified |
| 82 | TimeZoneId or FinalEffectiveDate or FinalEffectiveTime not specified | TimeZoneId or FinalEffectiveDate or FinalEffectiveTime not specified |
Support
For assistance, reach out to help@smsala.com

