Skip to content

Create file

Request

Creates a file resource (File, Folder, ContractDocument).

  • File or ContractDocument upload: Use Content-Type: multipart/form-data
  • Folder creation: Use Content-Type: application/json
Bodyrequired
filestring or null, (binary)required

The file to be uploaded

targetResourceTypestring(FileUploadResourceType)required

The type of the resource the file will be uploaded to

Enum:"Matter""Contract""ContractCreation"
Example:"Matter"
targetResourceIdinteger or null, (int32)

The id of the resource the file will be uploaded to. Required unless TargetResourceType is ContractCreation

Example:65436
folderIdinteger or null, (int32)

The parent folder id of the file. Leave null if the file is not in a folder

Example:32535
boundary=abc1234
abc1234
Content-Disposition: form-data; name="file"; filename="contract.pdf"
Content-Type: application/pdf
<Binary file contents>
abc1234
Content-Disposition: form-data; name="targetResourceType"
ContractCreation
abc1234

Responses

Created

Headers
Locationstring

Relative location to retrieve the created file or folder

Bodyapplication/json
idinteger, (int32)read-only

The system identifier for the file

Example:9456
Response
{ "id": 9456 }