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

> Create a new document for the authenticated workspace.



## OpenAPI

````yaml POST /documents/{url}
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:
  /documents/{url}:
    post:
      tags:
        - Documents
      summary: Upload a new document to a workspace
      parameters:
        - name: url
          in: path
          required: true
          description: The URL of the workspace where the document will be uploaded
          schema:
            type: string
        - name: subscriptionId
          in: query
          required: true
          description: The subscription ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The document file to upload
                card:
                  type: string
                  format: binary
                  description: The social card image file to upload
                domain:
                  type: string
                  default: rqk.sh
                  description: The domain associated with the document
                key:
                  type: string
                  default: null
                  description: The key for the document
                name:
                  type: string
                  nullable: true
                  default: ''
                  description: Document name
                isPublic:
                  type: boolean
                  nullable: true
                  description: Visibility of the document
                description:
                  type: string
                  default: >-
                    Turn your files into shareable links and connect
                    effortlessly
                  description: Document description
                title:
                  type: string
                  nullable: true
                  default: Instant File Sharing Link with Reqlick
                  description: Title of the document
                image:
                  type: string
                  nullable: true
                  default: /_static/thumbnail.png
                  description: URL of the image associated with the document
                expiresAt:
                  type: string
                  format: date-time
                  nullable: true
                  default: null
                  description: Expiration date and time of the document link
                password:
                  type: string
                  nullable: true
                  default: null
                  description: Password required to access the document
                ios:
                  type: string
                  nullable: true
                  default: null
                  description: iOS-specific information
                android:
                  type: string
                  nullable: true
                  default: null
                  description: Android-specific information
                utm_source:
                  type: string
                  nullable: true
                  default: null
                  description: UTM source parameter for tracking
                utm_medium:
                  type: string
                  nullable: true
                  default: null
                  description: UTM medium parameter for tracking
                utm_campaign:
                  type: string
                  nullable: true
                  default: null
                  description: UTM campaign parameter for tracking
                utm_term:
                  type: string
                  nullable: true
                  default: null
                  description: UTM term parameter for tracking
                utm_content:
                  type: string
                  nullable: true
                  default: null
                  description: UTM content parameter for tracking
                ref:
                  type: string
                  nullable: true
                  default: null
                  description: Referral information
      responses:
        '200':
          description: Successfully uploaded and created a new document
          content:
            application/json:
              schema:
                type: object
                properties:
                  document_id:
                    type: string
                    description: Document ID
                  link_id:
                    type: string
                    description: Short link ID for the document
                  link_url:
                    type: string
                    description: Short link URL for the document
        '401':
          description: Unauthorized or invalid user
        '422':
          description: Missing or invalid file or request body
        '500':
          description: Upload failed or internal server error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````