Skip to main content
POST
/
portal
/
session
Create a portal session
curl --request POST \
  --url https://api.kelviq.com/api/v1/portal/session/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "cust_789"
}
'
{
  "token": "cpt-4f7c5dc4-da9f-447b-d447-6266dc35ed6d:23fca530-adeb-4685-b3d5-9928c6d38275",
  "email": "geo@example.com",
  "customerPortalUrl": "https://www.kelviq.com/portal/aphelo/"
}

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Body

application/json
customerId
string
required

The unique identifier of the customer for whom the portal session is being created.

Example:

"cust_789"

Response

Portal Session Created

token
string

The session token for authenticating the customer portal session.

Example:

"cpt-4f7c5dc4-da9f-447b-d447-6266dc35ed6d:23fca530-adeb-4685-b3d5-9928c6d38275"

email
string<email>

The email address of the customer.

Example:

"geo@example.com"

customerPortalUrl
string<url>

The URL to redirect the customer to their billing portal.

Example:

"https://www.kelviq.com/portal/aphelo/"