Landing page elements
Manage title, text, button, image and video elements and their shared properties.
Element endpoints read and modify the content of a specific landing page.
Endpoints
| Method | Path | Description |
|---|---|---|
GET |
/v2/landings/{landingId}/elements |
List the page’s elements. |
GET |
/v2/landings/{landingId}/elements/{elementId} |
Read an element. |
POST |
/landings/{landingId}/elements |
Create an element. |
PUT |
/v2/landings/{landingId}/elements/{elementId} |
Replace an element. |
DELETE |
/v2/landings/{landingId}/elements/{elementId} |
Delete an element. |
The endpoint for creating elements belongs to an older API structure that remains operational and sits directly under https://api.ip1sms.com, without /v2. The other element operations use /v2.
Shared properties
{
"type": "Title",
"id": "element_abc123",
"order": 0,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111111",
"padding": "2",
"margin": "2,0,2,0",
"textAlignment": "Center",
"font": "Roboto"
}
| Field | Description |
|---|---|
type |
Element type: Title, TextBlock, Button, Image or Video. |
id |
Element ID. |
order |
Sort value in ascending order; default null. |
backgroundColor |
Hex color, published default #f7f7f7. |
foregroundColor |
Hex color, published default #111. |
padding |
One value or four comma-separated values from 0–8. |
margin |
One value or four comma-separated values from 0–8. |
textAlignment |
Left, Center, Right or Justified. |
alignment |
Media alignment: Left, Center or Right. |
font |
Web font name. |
The published description specifies the order for four padding and margin values as top, bottom, left, right. Verify the order visually if the client generates these values automatically.
Title
{
"type": "Title",
"content": "Welcome to the campaign",
"level": 1,
"bold": false,
"italic": false,
"underline": false
}
level accepts 1–5. The text-formatting fields are booleans with a default value of false.
Text block
{
"type": "TextBlock",
"content": "First paragraph\n\nNext paragraph",
"fontSize": 16
}
content is interpreted as Markdown. fontSize is specified in pixels and has a published default of 16. Treat external content as untrusted and do not allow unsanitized HTML.
Button
{
"type": "Button",
"content": "Book now",
"link": "https://example.com/book",
"buttonType": "Standalone",
"size": null,
"buttonColor": "#89b642"
}
| Field | Values |
|---|---|
buttonType |
Standalone or Block. |
size |
sm, lg or null. |
buttonColor |
Hex color, published default #89b642. |
Image
{
"type": "Image",
"link": "https://example.com/campaign-image.png",
"responsive": true,
"alignment": "Center",
"height": null,
"width": null,
"alt": "Description of the campaign image"
}
According to the reference, fixed height and width are ignored when responsive is true. Always provide meaningful alt text when the image conveys information.
Video
{
"type": "Video",
"link": "https://example.com/campaign-video.mp4",
"responsive": true,
"alignment": "Center",
"height": null,
"width": null,
"alt": "Campaign video",
"previewLink": "https://example.com/preview-image.png",
"showControls": true,
"autoplay": false,
"loop": false,
"muted": false,
"embed": false
}
previewLink is optional. showControls, autoplay, loop, muted and embed are booleans. Avoid autoplay with sound and give users controls to meet basic accessibility requirements.
