Manage page elements

Reading a collection of landing page elements

Endpoint: GET v2/landings/{landingId}/elements

This endpoint gives you a collection of the elements on a specific landing page. See data type definition below.

Read a specific element

Endpoint: GET v2/landings/{landingId}/elements/{elementId}

This endpoint gives you a specific element on a landing page

Update an element

Endpoint: PUT v2/landings/{landingId}/elements/{elementId}

This endpoint allows you to update an element on a landing page and change stored data. Everything is replaced by new values.

Create a new element

This endpoint allows you to create a new element on a landing page.

This endpoint allows you to create a new landing page element.

Delete an element

Endpoint: DELETE v2/landings/{landingId}/elements/{elementId}

This endpoint allows you to remove an element on a landing page.

Data type

The common properties of all elements are described below.

{ "type": "Title", "id": "615d9a0b792a81c7e32841ef", "order": 0, "backgroundColor": "#f7f7f7", "foregroundColor": "#111", "padding": "2", "margin" : "2,0,2,0", "textAlignment": "Center", "font": "Roboto", "content": "Welcome to the landing page", "level": 1, "bold": false, " italic": false, "underline": false }

type

The element's type. The example shows a title element.

id

The element's ID, used to refer to a specific element.

order

The order of the element on the page, the page is rendered in ascending order (the ID breaks the ties). Optional, the default is null.

backgroundColor

The color used as the element's background (Specified in hexadecimal), if applicable. Default value is #f7f7f7.

foregroundColor

The color used as the foreground of the element (Specified in hexadecimal), if applicable. Default value is #111.

padding

The padding added around the element. Either one (1) number for all pages, or four (4) numbers separated by commas in order (top, bottom, left, right). Any number from 0 to 8. Default is 2.

margin

The margin around the element. Either one (1) number for all pages, or four (4) numbers separated by commas in order (top, bottom, left, right). Any number from 0 to 8. Default is 0.