Using a Landing Page (API)

The following guide will show you how to make use of your Landing Page if you are sending via an API.

Step 1:

You would first need to create a Landing Page by logging in to your account via our website. If you have not created a Landing Page as yet, you can do so by following these STEPS.

Step 2:

Using the normal process of sending messages through your API channel, you would need to use the Landing Page ID in your send. This will ensure that the Landing Page is inserted in your message, allowing for full tracking on all outgoing messages, as seen on the below RESTful example:

Example:

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. @@[email protected]@ to learn more",
        "Destination": "27830000000",
        "LandingPageVariables":
        {
            "LandingPageId":"MyLandingPageApiId"
        }
    }
  ]
}

🚧

Message Content

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

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": []
    }
}

Updated about a month ago


Using a Landing Page (API)


The following guide will show you how to make use of your Landing Page if you are sending via an API.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.