Skip to main content
POST
Generate a portal token for a customer

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id_or_alias
string
required

customer ID or alias

Body

application/json
expires_in_seconds
integer<int32> | null

Token lifetime in seconds. Defaults to 86400 (24 hours). Must be between 60 and 2592000 (30 days).

Required range: x >= 0
scopes
enum<string>[] | null

Scopes granted to the token. Defaults to ["read", "manage"]. Use ["read"] for tokens that only read billing state, e.g. to gate features in a browser.

Minimum array length: 1

What a customer portal token may do.

Available options:
read,
manage

Response

Portal token generated

api_url
string
required

Base URL of the public REST API

expires_at
string<date-time>
required

When the token expires (RFC 3339)

Hosted customer portal URL, token included

portal_url
string
required

Base URL of the customer portal

token
string
required

JWT token for portal access