Customers

Create Portal Url

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.

post/customers/{customerId}/portal

Request

  • Base URL
    https://api.upflow.io/v1
  • Auth
    API key in header X-Api-Key and API key in header X-Api-Secret

Request body

userstring email

An email identifying the user who is using the generated URL and the token.

frameAncestorsstring

Space-separated fully qualified domain names which are authorized to embed the portal in an iframe.

expiresIninteger

Expressed in seconds. Time span during which the token is valid. Default is 86400 (1 day).

Example request

{
  "user": "john@customer.com",
  "frameAncestors": "extranet.merchant.com intranet.merchant.com",
  "expiresIn": 86400
}

Response

Portal URL generated successfully.

urlstring uri required

The URL for the Customer Summary Page including the access token.

Example response

{
  "url": "https://app.upflow.com/customers/00a70b35-2be3-4c43-aefb-397190134655?token=xxx"
}

Changes

No recorded changes to this operation across all 1 revision of this API.