curl --request POST \
--url https://api.decodahealth.com/faxes/{fax_id}/unlink-patient \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/faxes/{fax_id}/unlink-patient"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/faxes/{fax_id}/unlink-patient', 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.decodahealth.com/faxes/{fax_id}/unlink-patient",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/faxes/{fax_id}/unlink-patient"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decodahealth.com/faxes/{fax_id}/unlink-patient")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/faxes/{fax_id}/unlink-patient")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fax": {
"id": "<string>",
"signalwireFaxSid": "<string>",
"phoneNumberId": "<string>",
"phoneNumberE164": "<string>",
"faxContact": {
"id": "<string>",
"name": "<string>",
"faxNumber": "<string>",
"organization": "<string>",
"notes": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"createdByUserId": "<string>"
},
"numPages": 123,
"cost": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"pdfPath": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"patientId": "<string>",
"patient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"filedDocument": {
"id": "<string>",
"title": "<string>",
"docType": "<string>"
},
"readDate": "2023-11-07T05:31:56Z",
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"gcsPath": "<string>",
"displayOrder": 123,
"documentId": "<string>"
}
],
"analysis": {
"errorMessage": "<string>",
"extraction": {
"patientFirstName": "<string>",
"patientLastName": "<string>",
"patientDateOfBirth": "<string>",
"patientPhone": "<string>",
"patientMrn": "<string>",
"requestingProviderName": "<string>",
"documentCategory": "<string>",
"summary": "<string>",
"keySections": [
{
"heading": "<string>",
"content": "<string>"
}
],
"suggestedDocumentTitle": "<string>",
"suggestedDocType": "<string>",
"suggestedNoteTemplateId": "<string>"
},
"suggestedPatient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"patientMatchReason": "<string>",
"suggestedTemplate": {
"id": "<string>",
"name": "<string>"
},
"suggestedProvider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"createdNoteId": "<string>",
"createdTaskId": "<string>",
"patientSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"noteSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"taskSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
},
"affectedDocument": {
"id": "<string>",
"patientId": "<string>",
"filePath": "<string>",
"fileType": "<string>",
"title": "<string>",
"summary": "<string>",
"docType": "<string>",
"signatureUrl": "<string>",
"expiryDate": "2023-12-25",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"noteIds": [],
"sourceNoteId": "<string>",
"reviewedByProviderId": "<string>",
"reviewedDate": "2023-11-07T05:31:56Z",
"reviewComment": "<string>",
"sharedWithPatient": false,
"sharedDate": "2023-11-07T05:31:56Z",
"sharedByProviderId": "<string>",
"patientMessage": "<string>",
"sourceAnsweredFormId": "<string>",
"sourceFormId": "<string>",
"sourceFormName": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Unlink Fax Patient
Undo a fax→patient filing.
Archives the chart document(s) this fax produced, which dissolves the
derived fax↔patient link (the fax row stores no patient). A dedicated action
because the link dialog inherently requires selecting a patient to confirm —
there’s no “select nobody”. The GCS file is retained (soft-delete),
consistent with delete_document; only the chart document row is archived.
curl --request POST \
--url https://api.decodahealth.com/faxes/{fax_id}/unlink-patient \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/faxes/{fax_id}/unlink-patient"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/faxes/{fax_id}/unlink-patient', 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.decodahealth.com/faxes/{fax_id}/unlink-patient",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/faxes/{fax_id}/unlink-patient"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decodahealth.com/faxes/{fax_id}/unlink-patient")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/faxes/{fax_id}/unlink-patient")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fax": {
"id": "<string>",
"signalwireFaxSid": "<string>",
"phoneNumberId": "<string>",
"phoneNumberE164": "<string>",
"faxContact": {
"id": "<string>",
"name": "<string>",
"faxNumber": "<string>",
"organization": "<string>",
"notes": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"createdByUserId": "<string>"
},
"numPages": 123,
"cost": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"pdfPath": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"patientId": "<string>",
"patient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"filedDocument": {
"id": "<string>",
"title": "<string>",
"docType": "<string>"
},
"readDate": "2023-11-07T05:31:56Z",
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"gcsPath": "<string>",
"displayOrder": 123,
"documentId": "<string>"
}
],
"analysis": {
"errorMessage": "<string>",
"extraction": {
"patientFirstName": "<string>",
"patientLastName": "<string>",
"patientDateOfBirth": "<string>",
"patientPhone": "<string>",
"patientMrn": "<string>",
"requestingProviderName": "<string>",
"documentCategory": "<string>",
"summary": "<string>",
"keySections": [
{
"heading": "<string>",
"content": "<string>"
}
],
"suggestedDocumentTitle": "<string>",
"suggestedDocType": "<string>",
"suggestedNoteTemplateId": "<string>"
},
"suggestedPatient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"patientMatchReason": "<string>",
"suggestedTemplate": {
"id": "<string>",
"name": "<string>"
},
"suggestedProvider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"createdNoteId": "<string>",
"createdTaskId": "<string>",
"patientSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"noteSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"taskSuggestionDismissedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
},
"affectedDocument": {
"id": "<string>",
"patientId": "<string>",
"filePath": "<string>",
"fileType": "<string>",
"title": "<string>",
"summary": "<string>",
"docType": "<string>",
"signatureUrl": "<string>",
"expiryDate": "2023-12-25",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"noteIds": [],
"sourceNoteId": "<string>",
"reviewedByProviderId": "<string>",
"reviewedDate": "2023-11-07T05:31:56Z",
"reviewComment": "<string>",
"sharedWithPatient": false,
"sharedDate": "2023-11-07T05:31:56Z",
"sharedByProviderId": "<string>",
"patientMessage": "<string>",
"sourceAnsweredFormId": "<string>",
"sourceFormId": "<string>",
"sourceFormName": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Response
Successful Response
Result of link-patient / unlink-patient: the updated fax plus the
chart document the action created, moved, or archived.
Returning both lets the client patch the fax detail cache and the patient's
chart document list straight from the response — no refetch — the same way
send-fax and the fax-contact mutations update their caches. affected_document
is null only on the idempotent unlink-when-nothing-was-filed path, where no
document changed.
