Skip to main content
POST
/
customer-portal-sessions
Create a customer portal session
curl --request POST \
  --url https://api.alguna.io/customer-portal-sessions \
  --header 'Alguna-Version: <alguna-version>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "billing_details_settings": {
    "allow_autopay_edit": true,
    "show_section": true
  },
  "customer_alias": "ext_39003209203023902",
  "customer_id": "cust_abc123",
  "invoice_list_settings": {
    "show_section": true
  },
  "plan_overview_settings": {
    "allow_subscription_cancel": true,
    "show_section": true
  }
}
'
{
  "created_at": "2026-04-01T10:00:00Z",
  "customer_id": "cust_abc123",
  "expires_at": "2026-04-01T11:00:00Z",
  "id": "a8B3kLmQ",
  "url": "https://portal.alguna.io/hs/abc123"
}

Documentation Index

Fetch the complete documentation index at: https://alguna.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

Alguna-Version
enum<string>
required
Available options:
2026-04-01
Idempotency-Key
string

A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.

Maximum string length: 255
Example:

"ik_a1b2c3d4e5f6"

Body

application/json
billing_details_settings
object

Settings for the billing details section of the customer portal. When omitted, the organization's defaults apply.

customer_alias
string | null

Alternative identifier (external ID) for the customer. Used when customer_id is not provided.

Example:

"ext_39003209203023902"

customer_id
string | null

Customer ID the portal session is for. Either customer_id or customer_alias must be provided.

Example:

"cust_abc123"

invoice_list_settings
object

Settings for the invoice list section of the customer portal. When omitted, the organization's defaults apply.

plan_overview_settings
object

Settings for the plan overview section of the customer portal. When omitted, the organization's defaults apply.

Response

Success

created_at
string<date-time>
required

When the session was created

Example:

"2026-04-01T10:00:00Z"

customer_id
string
required

Customer ID the session was issued for

Example:

"cust_abc123"

expires_at
string<date-time>
required

When the session URL will expire. After this, the customer must be redirected to a freshly created session.

Example:

"2026-04-01T11:00:00Z"

id
string
required

Unique identifier for the session

Example:

"a8B3kLmQ"

url
string
required

Hosted customer portal URL

Example:

"https://portal.alguna.io/hs/abc123"