curl --request PATCH \
--url https://api.smokeball.com/matters/{matterId}/documents/files/{fileId} \
--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",
"fileAdditionalData": {},
"isFavorite": true
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
payload = {
"fileName": "court filing.pdf",
"folderId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"userId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"fileAdditionalData": {},
"isFavorite": True
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
fileName: 'court filing.pdf',
folderId: 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
userId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
fileAdditionalData: {},
isFavorite: true
})
};
fetch('https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fileName' => 'court filing.pdf',
'folderId' => 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
'userId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'fileAdditionalData' => [
],
'isFavorite' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
payload := strings.NewReader("{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}"
response = http.request(request)
puts response.read_body{
"fileId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"uploadUrl": "",
"expiry": "2022-04-23T14:30:00Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Patch a file
Updates the metadata for a file or uploads a new version of the file
curl --request PATCH \
--url https://api.smokeball.com/matters/{matterId}/documents/files/{fileId} \
--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",
"fileAdditionalData": {},
"isFavorite": true
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
payload = {
"fileName": "court filing.pdf",
"folderId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"userId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"fileAdditionalData": {},
"isFavorite": True
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
fileName: 'court filing.pdf',
folderId: 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
userId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
fileAdditionalData: {},
isFavorite: true
})
};
fetch('https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fileName' => 'court filing.pdf',
'folderId' => 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
'userId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'fileAdditionalData' => [
],
'isFavorite' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
payload := strings.NewReader("{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"fileName\": \"court filing.pdf\",\n \"folderId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"userId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"fileAdditionalData\": {},\n \"isFavorite\": true\n}"
response = http.request(request)
puts response.read_body{
"fileId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"uploadUrl": "",
"expiry": "2022-04-23T14:30:00Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Body
Full name of the file including the file extension
256"court filing.pdf"
Unique identifier of the folder to add the file to. If null it will be placed in the root folder
"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"
Unique identifier of the user modifying the file. If null it will fallback to the authenticated user
"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8"
Collection of KeyValuePair(string, string) to update File meta data.
Show child attributes
Show child attributes
Flag indicating whether this file is a favorite. If null it will be ignored
Response
When request is accepted. Returns an 'UploadFileInfo' object.
Unique identifier of the file.
"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"
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'
""
Expiry date/time when the upload link is no longer accessible.
"2022-04-23T14:30:00Z"