Sending a Landing Page (API)

Step 1: Create

Create a Landing Page first by logging in to your account via our website.

Step 2: Send

Use the specified Landing Page ID in your send when sending via API.




RESTful examples:

Example (without custom variables):


POST /bulkmessages HTTP/1.1
HOST: rest.smsportal.com/v1
Content-Type: application/json
Authorization: Bearer [Your Authorization Token]
Accept: application/json
{
  "Messages": [
    {
        "Content": "Hello John. Our new API is available. @@LINK@@ to learn more",
        "Destination": "27830000000",
        "LandingPageVariables":
        {
            "LandingPageId":"20201209063822720"
        }
    }
  ]
}

Custom Variables

Example (with custom variables):


POST /bulkmessages HTTP/1.1
HOST: rest.smsportal.com/v1
Content-Type: application/json
Authorization: Bearer [Your Authorization Token]
Accept: application/json
{
  "Messages": [
  {
      "Content": "Hi John, please find your latest statement by clicking on the following link - @@Link@@",
      "Destination": "27812345678",
      "LandingPageVariables": {
        "LandingPageId": "20201209063822720",
        "Variables": {
            "Name": "John",
            "Account_Number": "123456",
            "Amount": "500"
		}
      }
    }
  ]
}

Password Protection

Example (with password protection and custom variables)


POST /bulkmessages HTTP/1.1
HOST: rest.smsportal.com/v1
Content-Type: application/json
Authorization: Bearer [Your Authorization Token]
Accept: application/json
{
  "Messages": [
  {
      "Content": "Hi John, please find your latest statement by clicking on the following link - @@Link@@",
      "Destination": "27812345678",
      "LandingPageVariables": {
        "LandingPageId": "20201209063822720",
        "Password": "sdfwgw#sfad",
        "Variables": {
            "Name": "John",
            "Account_Number": "123456",
            "Amount": "500"
		}
      }
    }
  ]
}

Response:


HTTP/1.1 200 Accepted
Content-Type: application/json
{
  "Cost": 1,
  "RemainingBalance": 1500,
  "EventId": 12345678901,
  "Sample": "Hello John. Our new API is available. Go to https://pgy.io/XXXXXX to learn more",
  "Messages": 1,
  "Parts": 1,
  "CostBreakDown": 
  [
    {
      "Network": "Local",
      "Cost": 1,
      "Quantity": 1
    }
  ],
  "ErrorReport":
    {
      "NoNetwork": 0,
      "Duplicates": 0,
      "OptedOuts": 0,
      "Faults": []
    }
}



🚧

Message Content

  • The content field of each message should contain the @@LINK@@ variable to allow the document generation to provide the unique URL of the personalized document related to the specific message.