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

# Portal Templates

> Configure portal branding, layout, content, and checkout behavior.

A template defines a portal page. It contains branding, a header, an ordered `layout`, and checkout behavior.

## Status and versioning

Templates can be `draft`, `active`, or `paused`. Use the archive and restore methods to manage archived templates. New templates start as `draft` unless you set another valid status.

Template updates use `expected_version`, an integer, instead of a timestamp.

<Warning>
  Template changes do **not** affect existing portal sessions. Each session keeps the configuration snapshot that it started with.
</Warning>

## Layout blocks

`layout` is an ordered array. Every block needs a unique `id`.

| `type`               | Purpose                            | Key fields                                     |
| -------------------- | ---------------------------------- | ---------------------------------------------- |
| `header`             | Renders the configured header.     | —                                              |
| `offerHero`          | Renders one full-width offer.      | `offerId`, `badgeLabel`, `headline`, `tagline` |
| `offer`              | Renders one standard offer card.   | `offerId`, `badge`                             |
| `offerGrid`          | Renders multiple offers in a grid. | `offerIds`, `columns` (`1` or `2`)             |
| `bundle`             | Sells multiple offers together.    | `offerIds`, `label`, `bundlePriceInCents`      |
| `text`               | Renders copy.                      | `body`, `variant` (`section` or `body`)        |
| `trustStrip`         | Renders reassurance items.         | `items`                                        |
| `spacer`             | Adds vertical space.               | `size` (`sm`, `md`, `lg`)                      |
| `image`              | Renders an image.                  | `url`, `alt`, `aspectRatio`                    |
| `formInput`          | Collects a value.                  | `name`, `label`, `required`, `inputType`       |
| `paymentPlaceholder` | Sets the checkout position.        | `label`                                        |

`trustStrip` items are `secure_checkout`, `free_cancellation`, `verified_business`, and `powered_by_stripe`.

Every `offerId` and each `offerIds` entry must reference an existing offer. Create offers before you create the template.

## Creating a template

Call [Create Portal Template](/api-reference/portals/templates/create) with the portal configuration:

```json theme={null}
{
  "name": "Arrival portal",
  "status": "draft",
  "branding": {
    "brand_color": "#1F6F5C",
    "accent_color": "#E8B44A",
    "theme": "light"
  },
  "header": {
    "business_name": "Seabright Rentals",
    "context_line": "Your stay starts soon",
    "hero_source": "listing",
    "show_trust_badge": true
  },
  "layout": [
    { "id": "b1", "type": "header" },
    {
      "id": "b2",
      "type": "offerHero",
      "offerId": "off_late_checkout",
      "headline": "Stay a little longer",
      "tagline": "Check out at 2 PM instead of 10 AM."
    },
    { "id": "b3", "type": "text", "variant": "section", "body": "Add to your stay" },
    {
      "id": "b4",
      "type": "offerGrid",
      "offerIds": ["off_airport_pickup", "off_midstay_clean"],
      "columns": 2
    },
    { "id": "b5", "type": "paymentPlaceholder" },
    {
      "id": "b6",
      "type": "trustStrip",
      "items": ["secure_checkout", "powered_by_stripe"]
    }
  ],
  "checkout": {
    "allow_cart": true,
    "payment_methods": ["card", "apple_pay"],
    "cta_label": "Confirm and pay"
  }
}
```

Colors are six-character hexadecimal values, with or without a leading `#`.

## Other configuration

`listing_data` controls property data on the page. Each field has a Boolean value, and `enabled` controls all fields.

`after_payment` controls the post-purchase state. `confirmation_message` controls the follow-up message. `smart_lock` enables the lock integration.

## Lifecycle methods

[Duplicate Portal Template](/api-reference/portals/templates/duplicate) creates a new draft.

[Archive Portal Template](/api-reference/portals/templates/archive) and [Restore Portal Template](/api-reference/portals/templates/restore) are reversible.

[Delete Portal Template](/api-reference/portals/templates/delete) is permanent. It requires an exact `confirm_name` and a template with no recorded sales.
