ASPSMS WebAPI – Overview

The ASPSMS WebAPI (https://webapi.aspsms.com) is the current, actively maintained interface for sending and managing SMS. Authentication is done with Userkey and Password as query parameters. Responses are JSON (or plain text where noted). Full interactive documentation (Swagger) is available at the base URL.

Topics

1. Sending SMS

Submit text messages immediately or with deferred delivery, estimate costs, check credentials and cancel pending messages.

MethodEndpointPurpose
GET/CheckUserCredentialsValidate Userkey / Password
GET/ASPSMSCreditsCurrent credit balance
POST/ASPSMSEstimateCreditConsumptionEstimate credits for a list of MSISDNs (optional multiplicity, e.g. "0041791111111,5")
GET/SendSimpleSMSSend one SMS with basic query parameters (Operation=SendTextSMS required)
POST/ASPSMSSendSMSAdvanced send (JSON body SMSData): multiple recipients, TRN, deferred time, webhooks, flashing SMS, etc.
POST/ASPSMSDeactivatePendingSMSWithMSISDNCancel submitted but not yet sent SMS by phone number
POST/ASPSMSDeactivatePendingSMSWithTransactionReferenceNumberCancel pending SMS by TransactionReferenceNumber

Typical use cases

2. Delivery Webhooks

When sending via ASPSMSSendSMS you can set three URL properties. ASPSMS then calls your server exclusively via HTTP GET when the status of a message changes. Placeholders in the URL are replaced automatically.

Properties on SMSData: URLBufferedMessageNotification, URLDeliveryNotification, URLNonDeliveryNotification

Placeholders: <SCTS>, <DSCTS>, <RSN>, <DST>, <TRN>, <RCPNT>, <CREDITS> (URL length max. 200 characters)

DSTMeaning
-1Not yet submitted or rejected
0Delivered
1Buffered
2Not Delivered

After status 1 (Buffered) you almost always receive a second call with status 0 or 2. Reason codes (RSN) explain why a message was buffered or failed (e.g. 000 Unknown Subscriber, 103 Call Barred, 107 Absent Subscriber, 108 Delivery Fail).

Typical use cases

3. Sendlog, Statistics & Two-Way Incoming Traffic

Query outbound send logs, daily traffic aggregates and the inbound SMS inbox. Optionally configure a receive URL for push of incoming messages.

MethodEndpointPurpose
GET/TrafficStat01/GetDaily outbound counts (and optional credit sum) – useful for navigation / calendars
GET/SendingStat01/GetDetailed send log by year / month / day (max. 50 000 records)
GET/SendingStat02/GetSend log for one specific MSISDN
GET/SendingStat03/GetSend log by TransactionReferenceNumber
GET/SendingStat04/GetSend log by JobID
GET/ReceivingStat01/GetInbox detail (filters: year, month, day, MSISDN, originator, max records)
GET/ReceivingStat02/GetDaily inbound counts
GET/ReceiveURL/GetRead configured URL for incoming SMS
GET/ReceiveURL/SetSet URL that is called when an SMS is received
GET/ReceiveURL/DeleteRemove the receive URL

Typical use cases

4. Delivery Statistics per Recipient

Aggregated delivery quality per MSISDN and management of an ignore list (messages to listed numbers are not processed).

MethodEndpointPurpose
GET/MSISDNDLRStat/GetPer-MSISDN stats: success / failure counters, last dates, current DST
GET/IgnoreList/GetRead the ignore list
POST/MSISDNDLRStatIgnoreListAdd/PostAdd one or more MSISDNs to the ignore list
POST/MSISDNDLRStatIgnoreListRemove/PostRemove MSISDNs from the ignore list

Typical use cases

5. Phonebook (Numbers, Groups, Relations)

5.1 Phone numbers

MethodEndpointPurpose
GET/PhoneNumbers/ReadRead phonebook (optional filter by MSISDN)
POST/PhoneNumbers/AddAdd entries
POST/PhoneNumbers/UpdateUpdate existing entries
POST/PhoneNumbers/UpsertInsert or update
POST/PhoneNumbers/UpsertExUpsert and assign to groups in one step
POST/PhoneNumbers/DeleteDelete by IDs

Each contact supports LastName, FirstName, MSISDN and VariableData01–14 for custom fields.

5.2 Groups

MethodEndpointPurpose
GET/Groups/GetList groups
POST/Groups/UpsertCreate or update groups
POST/Groups/DeleteDelete groups

5.3 Group relations

MethodEndpointPurpose
GET/GroupRelationsAll/GetAll memberships
GET/GroupRelationsPhoneNumber/GetMemberships for one MSISDN
POST/GroupRelations/AddNewGroupRelationsAdd memberships
POST/GroupRelations/UpdateUpdate memberships
POST/GroupRelations/DeleteDelete specific relations
POST/GroupRelations/DeleteWithPhoneBookIDRemove all relations of one phonebook entry

Typical use cases

6. Jobs (Documentation of Sending Actions)

Jobs document sending actions. You can attach free-text, memo, integer, float and date remarks (JobRemarksText01–10, Memo01–03, Int01–03, Float01–03, Date01–03).

MethodEndpointPurpose
GET/Jobs/GetList all jobs
POST/Jobs/UpsertCreate or update jobs
POST/Jobs/DeleteDelete jobs

When sending via ASPSMSSendSMS you can pass a JobID; later you can retrieve all messages of that job with /SendingStat04/Get.

Typical use cases

7. Templates (Preparation of SMS Texts)

Store reusable originator + message text pairs.

MethodEndpointPurpose
GET/Templates/GetList templates
POST/Templates/UpsertCreate or update templates
POST/Templates/DeleteDelete templates

Typical use cases

8. Operators & Originators

MethodEndpointPurpose
GET/Operators/GetList of operators (networks) with country and price-list status
GET/Originators/GetList registered originators / sender IDs
GET/Originators/CheckAuthorizationCheck if an originator is authorised
GET/Originators/SendUnlockCodeSend unlock code for a new originator
GET/Originators/UnlockOriginatorUnlock an originator with the code
GET/Originators/DeleteRemove an originator
GET/MostRecentlyUsedNumbers/GetRecently used numbers (convenience)
GET/UserSetting/Get / /UserSetting/SetRead / write account settings
GET/SupportedFunctions/GetWhich functions are enabled for the account

Typical use cases

Code examples by language

Ready-to-run examples covering sending, webhooks, statistics, phonebook, jobs and templates:

Language overview: /en/examples/webapi/