Skip to main content

Manage your Landing Pages

Management operations require the owner user’s Bearer token. The id identifies the record in management routes; the stable public_id is used by the consumer application to read content.

Create

POST /landing_pages accepts a name and the Content Document defined by your application. allowed_hosts is optional.
The endpoint returns 201 Created with the created record:
Keep public_id for public reads and use id only for authenticated management operations.

Content Document

current_data is required and accepts freely nested objects and arrays, including empty ones. Every primitive value, however, must live inside an Editable Field: an object with both value and type keys.
A document outside this contract returns 422 Unprocessable Content, pointing to the offending path:
Other possible messages: contains a value outside an editable field, editable fields must contain both value and type, and contains an unsupported editable field type. LPData does not interpret how fields are presented; that remains your application’s responsibility.

Allowed hosts

allowed_hosts lists the frontend hosts that read the Landing Page from the browser, such as ["example.com", "localhost:3000"]. Values are lowercased. A host without a port also matches its subdomains; a host with a port requires an exact host and port match. Public reads are rate limited per IP each minute: 1,000 requests when the Origin header matches an allowed host and 30 otherwise, such as server-side calls. When the limit is exceeded, the API returns 429 Too Many Requests with Retry-After: 60.

List and retrieve

List only the Landing Pages owned by the authenticated account:
Retrieve one owned Landing Page by id:
Responses are wrapped in landing_pages or landing_page, respectively. An account cannot retrieve another account’s records; the resource returns 404 Not Found.

Update

PATCH /manage/landing_pages/:id accepts one or more attributes. When you send current_data, it replaces the entire Content Document; LPData does not merge individual fields.
A successful update returns 200 OK and the updated landing_page object.

Delete

DELETE /manage/landing_pages/:id removes a Landing Page owned by the authenticated user and returns 204 No Content.

Read content in the consumer application

GET /landing_pages/:public_id is public and returns only the Content Document as JSON, without authentication and without the landing_page wrapper.
An unknown identifier returns 404 Not Found:
Reads above the limit return 429 Too Many Requests; see Allowed hosts.