POST
/
matters
/
{matterId}
/
documents
/
files
Add file to a matter
curl --request POST \
  --url https://api.smokeball.com/matters/{matterId}/documents/files \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "fileName": "court filing.pdf",
  "folderId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
  "userId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
  "folderPath": "Court Filings/2023/January",
  "fileAdditionalData": {},
  "dateCreated": "2023-04-23T14:00:00Z",
  "dateModified": "2023-04-24T14:00:00Z"
}'
{
  "fileId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
  "uploadUrl": "",
  "expiry": "2022-04-23T14:30:00Z"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Path Parameters

matterId
string
required

Body

fileName
string
required

Full name of the file including the file extension

Maximum length: 256
Example:

"court filing.pdf"

folderId
string | null

Unique identifier of the folder to add the file to. If null it will be placed in the root folder

Example:

"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"

userId
string | null

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

Example:

"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8"

folderPath
string | null

Path of the folder to add the file to. If null then the FolderId will be used

Example:

"Court Filings/2023/January"

fileAdditionalData
object | null

Collection of KeyValuePair(string, string) to update File meta data.

dateCreated
string<date-time> | null

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

Example:

"2023-04-23T14:00:00Z"

dateModified
string<date-time> | null

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

Example:

"2023-04-24T14:00:00Z"

Response

When request is accepted. Returns an 'UploadFileInfo' object.

fileId
string | null

Unique identifier of the file.

Example:

"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"

uploadUrl
string | null

Temporary Link to upload file.

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'

Example:

""

expiry
string<date-time>

Expiry date/time when the upload link is no longer accessible.

Example:

"2022-04-23T14:30:00Z"