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/"
}Creates a new customer portal session, returning a token and URL to redirect the customer to their billing portal.
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/"
}The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'
The unique identifier of the customer for whom the portal session is being created.
"cust_789"
Portal Session Created
The session token for authenticating the customer portal session.
"cpt-4f7c5dc4-da9f-447b-d447-6266dc35ed6d:23fca530-adeb-4685-b3d5-9928c6d38275"
The email address of the customer.
"geo@example.com"
The URL to redirect the customer to their billing portal.
"https://www.kelviq.com/portal/aphelo/"