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

# Generate sharable sale invoice link (private or public)



## OpenAPI

````yaml api-reference/openapi.json post /api/sale-invoices/{id}/generate-link
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/sale-invoices/{id}/generate-link:
    post:
      tags:
        - Sale Invoices
      summary: Generate sharable sale invoice link (private or public)
      operationId: SaleInvoicesController_generateSaleInvoiceSharableLink
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: The sale invoice id
          schema:
            type: number
      responses:
        '201':
          description: The link has been generated successfully.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GenerateSaleInvoiceSharableLinkResponseDto
components:
  schemas:
    GenerateSaleInvoiceSharableLinkResponseDto:
      type: object
      properties:
        link:
          type: string
          description: Sharable payment link for the sale invoice
          example: http://localhost:3000/payment/123e4567-e89b-12d3-a456-426614174000
      required:
        - link

````