> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanpay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# get client portal url



## OpenAPI

````yaml https://public.leanpay.fr/openapi/leanpay_api_documentation.swagger.yaml post /clients/portal-session
openapi: 3.1.1
info:
  version: 1.0.0
  title: LeanPay Api documentation
  contact:
    email: integration@leanpay.fr
servers:
  - url: https://api.leanpay.fr/v1/public
security: []
tags:
  - name: clients
    description: Routes related to clients
  - name: invoices
    description: Routes related to invoices
  - name: credit-notes
    description: Routes related to credit notes
  - name: misc-operations
    description: Routes related to misc operations
  - name: contacts
    description: Routes related to client contacts
  - name: addresses
    description: Routes related to client addresses
  - name: payments
    description: Routes related to invoice payments
  - name: portal-payments
    description: >-
      Routes related to portal payments (online payments made by debtors from
      the customer portal)
  - name: paybacks
    description: Routes related to credit note paybacks
  - name: links
    description: Routes related to invoice/credit note links
  - name: comments
    description: Routes related to comments
  - name: deleted-elements
    description: Routes related to deleted elements
  - name: client-properties
    description: Routes related to client properties
paths:
  /clients/portal-session:
    post:
      tags:
        - clients
      summary: get client portal url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client:
                  $ref: '#/components/schemas/IdOrExternalId'
                expiresInSeconds:
                  type: integer
                  minimum: 1
              required:
                - client
      responses:
        '200':
          description: Returns the client portal url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientPortalResponse'
        '400':
          description: Response sent when the data provided is invalid
        '404':
          description: Client not found
      security:
        - authorization: []
components:
  schemas:
    IdOrExternalId:
      type: object
      oneOf:
        - properties:
            id:
              type: string
              format: uuid
        - properties:
            externalId:
              type: string
              maxLength: 80
    ClientPortalResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
  securitySchemes:
    authorization:
      type: apiKey
      name: Authorization
      in: header

````