> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pages

> Pages live inside sections and contain groups of blocks. Each supports an access level for buyer visibility control.

## Endpoints

| Method   | Path                                   | Description                   |
| -------- | -------------------------------------- | ----------------------------- |
| `GET`    | `/api/v2/pages?sectionId={section_id}` | List pages in a section       |
| `POST`   | `/api/v2/pages`                        | Create pages                  |
| `PATCH`  | `/api/v2/pages/{page_id}`              | Update a page                 |
| `DELETE` | `/api/v2/pages/{page_id}`              | Delete a page and its content |

## Access levels

| Value        | Behaviour                    |
| ------------ | ---------------------------- |
| `visible`    | Shown to everyone            |
| `restricted` | Requires password or sign-in |
| `locked`     | Visible but not accessible   |
| `hidden`     | Not shown to the buyer       |

***

## List pages

`GET /api/v2/pages?sectionId={section_id}`

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.flowla.com/api/v2/pages?sectionId=<section_id>" \
    -H "x-flowla-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.flowla.com/api/v2/pages",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      params={"sectionId": "<section_id>"},
  )
  ```

  ```js JavaScript theme={null}
  const res = await fetch(
    "https://api.flowla.com/api/v2/pages?sectionId=<section_id>",
    { headers: { "x-flowla-api-key": "YOUR_API_KEY" } }
  );
  ```
</CodeGroup>

***

## Create pages

`POST /api/v2/pages`

Create one or more pages in a single request.

<ParamField body="sectionId" type="string" required>
  The section to add pages to.
</ParamField>

<ParamField body="pages" type="array" required>
  Array of page objects.

  <Expandable title="Page object fields">
    <ParamField body="title" type="string" required>
      Display title of the page.
    </ParamField>

    <ParamField body="access" type="&#x22;visible&#x22; | &#x22;restricted&#x22; | &#x22;locked&#x22; | &#x22;hidden&#x22;">
      Visibility setting. Defaults to `visible`.
    </ParamField>
  </Expandable>
</ParamField>

```json Example theme={null}
{
  "sectionId": "<section_id>",
  "pages": [
    { "title": "Plans", "access": "visible" },
    { "title": "FAQ", "access": "visible" }
  ]
}
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.flowla.com/api/v2/pages \
    -H "x-flowla-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sectionId": "<section_id>",
      "pages": [
        { "title": "Plans", "access": "visible" },
        { "title": "FAQ", "access": "visible" }
      ]
    }'
  ```

  ```python Python theme={null}
  requests.post(
      "https://api.flowla.com/api/v2/pages",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      json={
          "sectionId": "<section_id>",
          "pages": [
              {"title": "Plans", "access": "visible"},
              {"title": "FAQ", "access": "visible"},
          ],
      },
  )
  ```

  ```js JavaScript theme={null}
  await fetch("https://api.flowla.com/api/v2/pages", {
    method: "POST",
    headers: {
      "x-flowla-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      sectionId: "<section_id>",
      pages: [
        { title: "Plans", access: "visible" },
        { title: "FAQ", access: "visible" },
      ],
    }),
  });
  ```
</CodeGroup>

***

## Update a page

`PATCH /api/v2/pages/{page_id}`

<ParamField body="title" type="string">
  New display title.
</ParamField>

<ParamField body="access" type="&#x22;visible&#x22; | &#x22;restricted&#x22; | &#x22;locked&#x22; | &#x22;hidden&#x22;">
  New access level.
</ParamField>

```json Example theme={null}
{ "title": "Questions & Answers", "access": "visible" }
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.flowla.com/api/v2/pages/<page_id> \
    -H "x-flowla-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"title": "Questions & Answers"}'
  ```

  ```python Python theme={null}
  requests.patch(
      "https://api.flowla.com/api/v2/pages/<page_id>",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      json={"title": "Questions & Answers"},
  )
  ```
</CodeGroup>

***

## Delete a page

`DELETE /api/v2/pages/{page_id}`

<Warning>
  Deletes the page and all its groups and blocks permanently.
</Warning>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://api.flowla.com/api/v2/pages/<page_id> \
    -H "x-flowla-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  requests.delete(
      "https://api.flowla.com/api/v2/pages/<page_id>",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
  )
  ```
</CodeGroup>
