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

# Get files on a matter

> Returns a list of files associated with a matter. 
Defaults to ascending order of date created, i.e. oldest first, unless sort option is supplied.
Custom sorting and searching options does not apply to cursor-based pagination.



## OpenAPI

````yaml /openapi.json get /matters/{matterId}/documents/files
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:
    get:
      tags:
        - Files
      summary: Get files on a matter
      description: "Returns a list of files associated with a matter. \r\nDefaults to ascending order of date created, i.e. oldest first, unless sort option is supplied.\r\nCustom sorting and searching options does not apply to cursor-based pagination."
      operationId: GetFiles
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
        - name: Offset
          in: query
          schema:
            maximum: 2147483647
            minimum: 0
            type: integer
            format: int32
        - name: Limit
          in: query
          schema:
            maximum: 500
            minimum: 1
            type: integer
            format: int32
        - name: Cursor
          in: query
          schema:
            type: string
        - name: Sort
          in: query
          description: ' Available fields: dateCreated'
          schema:
            type: string
        - name: Search
          in: query
          description: ' Available fields: query, fileExtension'
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: >-
            When request is successful. Returns a paged collection of 'File'
            objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilePagedCollection'
        '403':
          description: >-
            When the requested matter does not belong to the account making the
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    FilePagedCollection:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
        self:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        value:
          type: array
          items:
            $ref: '#/components/schemas/File'
          nullable: true
        offset:
          type: integer
          format: int32
          nullable: true
        limit:
          type: integer
          format: int32
          nullable: true
        size:
          type: integer
          format: int64
        first:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        previous:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        next:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        last:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
      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: {}
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    File:
      type: object
      properties:
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
        self:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        id:
          type: string
          description: Unique identifier of the file.
          nullable: true
          example: b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2
        versionId:
          type: string
          description: Unique identifier of the file's current version.
          nullable: true
        folder:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: Hypermedia link of the folder to which the file belongs.
          nullable: true
        matter:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: Hypermedia link of the matter to which the file belongs.
          nullable: true
        name:
          type: string
          description: Name of the file, excluding file extension.
          nullable: true
          example: court filing
        fileExtension:
          type: string
          description: Extension of the file.
          nullable: true
          example: .pdf
        ownerId:
          type: string
          description: Unique identifier of the user who created/uploaded this file.
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        to:
          type: string
          description: >-
            The 'To' or recipients' email address (only applicable for email
            files).
          nullable: true
          example: recipient@email.com
        from:
          type: string
          description: >-
            The 'From' or sender's email address (only applicable for email
            files).
          nullable: true
          example: sender@email.com
        dateCreated:
          type: string
          description: The original datetime that the file was created.
          format: date-time
          example: '2022-04-23T14:00:00Z'
        dateModified:
          type: string
          description: The datetime that the file was last modified.
          format: date-time
          example: '2022-04-25T17:00:00Z'
        sizeBytes:
          type: integer
          description: Size of the file (in bytes).
          format: int64
          example: 19104768
        downloadInfo:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: Hypermedia link to the download details of the file.
          nullable: true
        additionalData:
          type: object
          additionalProperties:
            nullable: true
          description: Collection of file meta data as KeyValuePair(string, object).
          nullable: true
        isFavorite:
          type: boolean
          description: Flag indicating whether this file is a favorite
          example: false
        isUploaded:
          type: boolean
          description: >-
            Flag indicating whether the file contents are uploaded to the
            server.
          example: false
        isCancelled:
          type: boolean
          description: Flag indicating whether the file upload has been cancelled.
          example: false
        isDuplicate:
          type: boolean
          description: >-
            Flag indicating whether the file data is duplicated. Applies to
            emails only for now.
        isDeleted:
          type: boolean
          description: Flag indicating whether the file has been deleted.
          example: false
      additionalProperties: false
  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

````