---
title: "Create Portal Url"
method: POST
path: "/customers/{customerId}/portal"
tags: ["Customers"]
---

# Create Portal Url

`POST /customers/{customerId}/portal`

## Request

- Base URL: `https://api.upflow.io/v1`
- URL: `https://api.upflow.io/v1/customers/{customerId}/portal`
- Auth: API key in header `X-Api-Key` and API key in header `X-Api-Secret`

This endpoint is used to generate a portal URL for a customer. You can
link this URL in your app, or embed it in an iframe to allow your users
to access the customer portal from your app. To embed it in an iframe,
you must specify the `frameAncestors` attribute in the request.

The call to retrieve the portal URL must strictly be made from the
backend (not the frontend) as it utilises the client’s API secret.

## Request body

- object
  - `user` string, email: An email identifying the user who is using the generated URL and the token.
  - `frameAncestors` string: Space-separated fully qualified domain names which are authorized to embed the portal in an iframe.
  - `expiresIn` integer: Expressed in seconds. Time span during which the token is valid. Default is 86400 (1 day).

## Response `200`

Portal URL generated successfully.

- object
  - `url` string, uri, required: The URL for the Customer Summary Page including the access token.

---

[API](https://skmtc.dev/upflow/apis/upflow-api.md) - [All operations](https://skmtc.dev/upflow/apis/upflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upflow/apis/upflow-api/revisions/898a98ca0587?raw)
