---
title: "POST /v2/sites/{site_id}/webviews/sessions"
method: POST
path: "/v2/sites/{site_id}/webviews/sessions"
tags: ["sites"]
---

# POST /v2/sites/{site_id}/webviews/sessions

`POST /v2/sites/{site_id}/webviews/sessions`

## Path parameters

- `site_id` number, required

## Request body

- SitesCreateWebviewSessionRequestBody
  - `channel` string, required — The name of your app. Can contain only alphanumeric characters, dots and underscores
  - `language` string — The current language as an `ISO 639-1` code, e.g. `en`. If language is not provided or is not supported by this site, the default language will be used instead
  - `currency` string — The current currency as an `ISO 4217` currency code, e.g. `usd`. If currency is not provided or is not supported by this site, the default currency will be used instead
  - `customer` object — Customer to include in the resulting WebView content. If included, the rendered webview will be scoped to this customer. This means the customer will be able to see their points and redeem rewards
    - `merchant_id` string, required — ID of the customer in your platform or ecommerce store
    - `email` string, required

## Response `201`

201

- SitesCreateWebviewSessionResponseBody
  - `webview_session` object, required — The created session, which includes a URL that can be used as the source for a WebView
    - `url` string, required — Full URL that can be used as the source for a WebView to render a complete Loyalty Page for the site. This URL should be rendered immediately and not cached, as it will expire
    - `expires_at` string, required — `ISO 8601` timestamp indicating when the WebView session and its URL will expire. Using an expired URL to render a WebView will result in an error

## Other responses

- `400` — Bad Request
- `401` — 401
- `403` — 403
- `404` — 404

---

[API](https://skmtc.net/loyaltylion/apis/loyaltylion-admin-api.md) · [All operations](https://skmtc.net/loyaltylion/apis/loyaltylion-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyaltylion/loyaltylion-admin-api/revisions/4cfed13b45bc/schema)
