POST api/v2/sms/messages
This method sends either of the following type of messages: 1) Advanced Messages (Secure or long message) 2) Standard Messages 3) Recurring Messages
Request Information
URI Parameters
None.
Body Parameters
The details of the message to be sent.
TwoSms.CustomerPortalRole.API.SMS.MessageV2| Name | Description | Type | Additional information |
|---|---|---|---|
| Contacts |
List of all the contacts to send the message to. |
TwoSms.CustomerPortalRole.API.SMS.ContactsIncQuick |
Required |
| Content |
The actual message to be sent. |
string |
None. |
| Options |
The options for the message. |
TwoSms.CustomerPortalRole.API.SMS.MessageOptionsV2 |
Required |
| Template |
The template of the message to be sent out. If present, it will overwrite whatever is in the content parameter. |
TwoSms.CustomerPortalRole.API.SMS.TemplateInfo |
None. |
| Type |
Determines the type of message. Standard, advanced or recurring. |
TwoSms.CustomerPortalRole.API.SMS.MessageRequestType |
Required |
Request Formats
application/json, text/json
Sample:
{
"Contacts": {
"ContactID": {
"sample string 1": 0,
"sample string 2": 0
},
"GroupID": {
"sample string 1": 0,
"sample string 2": 0
},
"QuickRecipients": {
"sample string 1": 0,
"sample string 2": 0
}
},
"Content": "sample string 1",
"Options": {
"DateToSend": "2025-10-26T11:42:31.4461082+00:00",
"DeliveryReceipt": true,
"DstPort": 1,
"DeliverToValidatedOnly": true,
"RecurringOptions": {
"OccurrencesEnd": 1,
"PatternScheduleDays": 0,
"Range": 0,
"RecDateToSend": "2025-10-26T11:42:31.4461082+00:00"
},
"EmailReadReceipt": true,
"Reference": "sample string 1",
"ExpiryDate": "2025-10-26T11:42:31.447101+00:00",
"Repeat": {
"Frequency": 1,
"Repetitions": 2
},
"Reads": 1,
"EmailOptions": {
"FromAddress": "sample string 1",
"FromName": "sample string 2",
"Subject": "sample string 3",
"ReplyTo": "sample string 4"
},
"ResponseAlert": 0,
"SmsReadReceipt": true,
"ResponseLimit": 2,
"Sender": "sample string 3",
"SecureMessage": true,
"SrcPort": 1
},
"Template": {
"ID": "86dc152b-ccbb-4be8-b283-fdd250329113",
"PlaceHolders": {
"1": "sample string 2",
"3": "sample string 4"
}
},
"Type": 0
}
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.SMS.SMSTransactionV2| Name | Description | Type | Additional information |
|---|---|---|---|
| Error | TwoSms.CustomerPortalRole.API.Misc.Error |
None. |
|
| ResponseData | TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.SMS.SMSTransactionV2 |
None. |
Response Formats
application/json, text/json
Sample:
{
"Error": {
"ErrorCode": "sample string 1",
"ErrorReason": "sample string 2"
},
"ResponseData": {
"Identification": {
"UserId": "sample string 1"
},
"Result": "sample string 1",
"Detail": {
"IDs": {
"AdvancedMessageID": "5b33dcc8-e4ef-439b-b521-f8aba46b9dbb",
"StandardMessageIDs": {
"sample string 1": [
"sample string 1",
"sample string 2"
],
"sample string 2": [
"sample string 1",
"sample string 2"
]
}
},
"NoOfContacts": "sample string 1",
"NoOfQuickRecipients": "sample string 2",
"NoOfSMS": "sample string 3",
"NoOfEmails": "sample string 4",
"PreTransaction": "sample string 5",
"PostTransaction": "sample string 6",
"CreditsUsed": "sample string 7",
"MessageText": "sample string 8"
}
}
}