Update a contact document's type or notes
curl --request PUT \
--url https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentType": "Proof of Address",
"notes": "Updated label after re-review"
}
'import requests
url = "https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}"
payload = {
"documentType": "Proof of Address",
"notes": "Updated label after re-review"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentType: 'Proof of Address', notes: 'Updated label after re-review'})
};
fetch('https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}', 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://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'documentType' => 'Proof of Address',
'notes' => 'Updated label after re-review'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}"
payload := strings.NewReader("{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"document": {
"_id": "64f0a1b2c3d4e5f6a7b8ca40",
"storageKey": "org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf",
"filename": "id-proof.pdf",
"contentType": "application/pdf",
"documentType": "ID Proof"
}
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}Contacts
Update a contact document's type or notes
Updates the documentType and/or notes on a document attached to a contact. At least one of the two fields must be provided.
PUT
/
api
/
contacts
/
{contactId}
/
documents
/
{documentId}
Update a contact document's type or notes
curl --request PUT \
--url https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentType": "Proof of Address",
"notes": "Updated label after re-review"
}
'import requests
url = "https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}"
payload = {
"documentType": "Proof of Address",
"notes": "Updated label after re-review"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentType: 'Proof of Address', notes: 'Updated label after re-review'})
};
fetch('https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}', 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://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'documentType' => 'Proof of Address',
'notes' => 'Updated label after re-review'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}"
payload := strings.NewReader("{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contacts/{contactId}/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documentType\": \"Proof of Address\",\n \"notes\": \"Updated label after re-review\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"document": {
"_id": "64f0a1b2c3d4e5f6a7b8ca40",
"storageKey": "org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf",
"filename": "id-proof.pdf",
"contentType": "application/pdf",
"documentType": "ID Proof"
}
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}{
"error": "Attachment not found",
"message": "Attachment not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Document updated
Available options:
true Show child attributes
Show child attributes
Example:
{
"_id": "64f0a1b2c3d4e5f6a7b8ca40",
"storageKey": "org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf",
"filename": "id-proof.pdf",
"contentType": "application/pdf",
"size": 184320,
"documentType": "ID Proof",
"uploadedAt": "2026-05-12T10:00:00.000Z",
"uploadedBy": "64f0a1b2c3d4e5f6a7b8c9d4",
"notes": "Driver license, front + back",
"signedUrl": "https://example-r2.signed/.../id-proof.pdf?X-Amz-Expires=600"
}
⌘I