Files

Add files to a matter

Registers a batch of new files on the matter and returns one 'UploadFileInfo' (presigned PUT URL, valid for 1 hour) per file, in request order. Intended for data migrations. The same rules as 'AddFile' apply to each item.

The operation is not atomic: items are validated in order and a 400 on item n leaves the upload requests for items before it in place. No 'Location' header is returned. There is no cap on the array size.

post/matters/{matterId}/documents/files/bulk

Path parameters

matterIdstring required

Unique identifier (GUID) of the matter.

Request body

fileNamestring required

Full name of the file including the file extension. Required, maximum 256 characters. The name is split on the last '.' into name and extension, and the name is normalised to XML-safe characters. It must contain at least one valid character after normalisation.

folderIdstring nullable

Unique identifier (GUID) of the folder to add the file to. If null (and FolderPath is not set) the file is placed in the root folder. Mutually exclusive with FolderPath. The folder is not validated for existence.

userIdstring nullable

Unique identifier (GUID) of the file owner. If null it will fallback to the authenticated user

folderPathstring nullable

Path of the folder to add the file to, relative to the matter root, with '/' separating folder names. Mutually exclusive with FolderId: set at most one of the two. If neither is set the file is placed in the root folder.

fileAdditionalDataobject nullable

Dictionary of custom metadata to store against the file. Keys must not be blank. Values must be strings, integers, numbers, booleans or null; objects and arrays are rejected.

dateCreatedstring date-time nullable

The original datetime that the file was created. If null the current datetime will be used

dateModifiedstring date-time nullable

The initial datetime that the file was last modified. If null the current datetime will be used

Example request

[
  {
    "fileName": "court filing.pdf",
    "folderId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
    "userId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
    "folderPath": "Court Filings/2023/January",
    "fileAdditionalData": {
      "Author": "Jane Smith",
      "Pages": 12,
      "Signed": true
    },
    "dateCreated": "2023-04-23T14:00:00Z",
    "dateModified": "2023-04-24T14:00:00Z"
  }
]

Response

When request is accepted. Returns an array of 'UploadFileInfo' objects.

fileIdstring nullable

Unique identifier of the file.

uploadUrlstring nullable

Temporary presigned URL to upload the file content to. Send the raw file bytes with an HTTP PUT request. The URL is valid for 1 hour from the time of the API call (see Expiry).

Important note: When uploading to this URL, set the 'Content-Type' header to an empty value.

Example cURL: curl --location --request PUT 'URL_GOES_HERE' \ --header 'Content-Type: ""' \ --data '@/C:/dir/test.pdf'

expirystring date-time

UTC date/time when the upload link is no longer accessible (1 hour after issue).

Example response

[
  {
    "fileId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
    "uploadUrl": "https://example-bucket.s3.amazonaws.com/apiuploads/2f1c9a3e-6b1d-4c7e-9a0f-1d2e3f4a5b6c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=...",
    "expiry": "2022-04-23T14:30:00Z"
  }
]

Changes