# Create landing page

`POST https://api.tentary.com/v1/landing-pages`

Source: https://tentary.com/en/help/api/create-landing-page/
Area: Landing pages
MCP tool: `create_landing_page`. Changes data at once.

---

Creates a landing page from your own HTML code, at the shop URL plus `/<url_slug>`. It is a draft unless `status` is `live`.

- A draft has no preview. Its URL opens the shop until the page is live.
- Tentary serves your HTML as it is. It only adds what the account set up in the shop settings: tracking codes, the cookie banner, and the custom code if it is allowed for HTML pages.
- Forms with `data-tentary` get their sign-up function.
- The answer has the URL, but not the HTML. [`GET /v1/landing-pages/{page_id}`](https://tentary.com/en/help/api/get-landing-page/) returns the HTML.
- Tentary does not store a change time.

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Request body

- `title` (string): Name in the Tentary app (not the <title> of the page). Limits: maxLength 255.
- `url_slug` (string): The page address: shop URL/<url_slug>. Lowercase letters, digits and hyphens. Default from the title. A url_slug of another landing page gives an error. A new url_slug does not redirect: the old address then opens the shop. Limits: maxLength 120.
- `html` (string, required): The full HTML document, served as it is (at most 900 KB). A newsletter sign-up form: put data-tentary="subscribe" on the <form> tag and an <input type="email"> in it, with no JavaScript for the form. Right after the form, outside it, add one element with data-tentary="subscribed" that holds the confirmation text; Tentary shows it after the sign-up (do not hide or show it with your own code). Only for a separate thank-you page, add data-tentary-return="/its-address" on the <form> tag. Link to products with their shop URL from list_products. Limits: maxLength 900000.
- `status` (string): live = public at its URL. draft = not public (the URL opens the shop). Allowed values: `draft`, `live`.
- `affiliates` (boolean): Show the page to the seller's affiliates in their affiliate hub, with their affiliate ID attached.

## Response

- `id` (integer): The ID.
- `title` (string): Name in the Tentary app.
- `type` (string): html = own HTML code. builder = made with the page builder in the app. Allowed values: `html`, `builder`.
- `status` (string): draft = not public: its URL opens the shop. Allowed values: `live`, `draft`.
- `url_slug` (string): The address part of the URL.
- `url` (string<uri>): shop URL/<url_slug>.
- `affiliates` (boolean): true = shown to the affiliates in their affiliate hub.
- `created_at` (string<date-time>, can be null): UTC, like 2026-01-31T14:05:00Z.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl -X POST "https://api.tentary.com/v1/landing-pages" \
  -H "Authorization: Bearer $TENTARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Free stretching guide",
  "url_slug": "stretching-guide",
  "html": "<!doctype html><html><body><h1>Free stretching guide</h1><form data-tentary=\"subscribe\"><input type=\"email\" name=\"email\"><button>Send it to me</button></form><p data-tentary=\"subscribed\">Check your inbox.</p></body></html>"
}'
```

## Example response

```json
{
  "id": 902,
  "title": "Free stretching guide",
  "type": "html",
  "status": "draft",
  "url_slug": "stretching-guide",
  "url": "https://lena-yoga.mytentary.com/stretching-guide",
  "affiliates": false,
  "created_at": "2026-10-27T08:51:48Z",
  "admin_url": "https://app.tentary.com/landingpages/edit-html/902"
}
```
