> ## 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.

# Create Portal Link Sharing Session

Create a shareable customer portal session link. The link can be sent to customers to access their billing portal.

<ParamField body="accountId" type="string" required>
  The account ID.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.alguna.io/billing/customer-session/create/portal-link-sharing \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "accountId": "acc_abc123"
    }'
  ```

  ```javascript Node.js theme={null}
  const session = await alguna.billingSessions.createPortalLink({
    accountId: 'acc_abc123'
  });

  // Share session.sessionUrl with customer
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "sess_def456",
    "sessionToken": "tok_def456...",
    "sessionUrl": "https://portal.alguna.io/hs/tok_def456..."
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string">
  Session identifier.
</ResponseField>

<ResponseField name="sessionToken" type="string">
  Token for the session.
</ResponseField>

<ResponseField name="sessionUrl" type="string">
  Shareable URL for the customer portal.
</ResponseField>

<Note>
  Portal visibility settings (plan overview, billing details, invoice list, etc.) are inherited from your organization's customer portal configuration.
</Note>
