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

# Create a new document link

> Create a new link for a document for the authenticated workspace.



## OpenAPI

````yaml POST /links/document
openapi: 3.0.0
info:
  title: Reqlick API
  version: 1.0.0
  description: Reqlick API Documentation
servers:
  - url: https://api.reqlick.com
security:
  - bearerAuth: []
tags:
  - name: Documents
    description: Documents management
  - name: Domains
    description: Domains management
  - name: GoogleAuth
    description: Google Authentication
  - name: Links
    description: Links management
  - name: Payments
    description: Payments management
  - name: QRCodes
    description: QR Codes management
  - name: Resources
    description: Resources management
  - name: Subscriptions
    description: Subscription management
  - name: Users
    description: User management and authentication
  - name: Workspaces
    description: Workspaces management
paths:
  /links/document:
    post:
      tags:
        - Links
      summary: Create a new link for a document within a workspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                documentId:
                  type: string
                  description: ID of the document
                workspace:
                  type: string
                  description: Workspace URL
                domain:
                  type: string
                  description: The domain under which the link will be created
                  example: example.com
                key:
                  type: string
                  description: The key to be used for the link
                  example: unique-key-123
      responses:
        '200':
          description: Link created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the created link
                    example: link123
                  documentId:
                    type: string
                    description: The document ID linked to the workspace
                    example: doc123
                  projectId:
                    type: string
                    description: The ID of the workspace associated with the link
                  domain:
                    type: string
                    description: The domain for the link
                    example: example.com
                  key:
                    type: string
                    description: The key for the link
                    example: unique-key-123
                  usage:
                    type: object
                    properties:
                      userId:
                        type: string
                        description: The ID of the user who created the link
                        example: user123
                      projectId:
                        type: string
                        description: The ID of the workspace associated with the usage
                      subscriptionId:
                        type: string
                        description: The subscription ID associated with the workspace
                        example: sub123
                      snap_asset_type:
                        type: string
                        description: The type of asset created
                        example: link
                      snap_link_url:
                        type: string
                        description: Full URL of the created link
                        example: example.com/unique-key-123
                  _count:
                    type: object
                    properties:
                      views:
                        type: integer
                        description: The number of views for the link
                        example: 0
                  views:
                    type: array
                    items:
                      type: object
        '422':
          description: workspace or Link not found
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````