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

# Create a preview request

> Creates a preview for the specified file.



## OpenAPI

````yaml /openapi.json post /matters/{matterId}/documents/files/{fileId}/preview
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /matters/{matterId}/documents/files/{fileId}/preview:
    post:
      tags:
        - Files
      summary: Create a preview request
      description: Creates a preview for the specified file.
      operationId: CreatePreview
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
        - name: fileId
          in: path
          required: true
          schema:
            type: string
      responses:
        '202':
          description: When request is accepted. Returns a 'PreviewFileInfo' object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewFileInfo'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: When the file is not associated with the authenticated client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When the file name does not exist or isn't uploaded yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    PreviewFileInfo:
      type: object
      properties:
        fileId:
          type: string
          description: Unique identifier of the requested file
          nullable: true
          example: b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2
        documentVersionId:
          type: string
          nullable: true
        downloadUrl:
          type: string
          description: Temporary Link to download file
          nullable: true
          example: ''
        expiry:
          type: string
          description: Expiry date/time when the download link is no longer accessible
          format: date-time
          nullable: true
          example: '2022-04-23T14:30:00Z'
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````