Received Faxes

List Received Faxes

GET /received_faxes — Returns a paginated list of received faxes for your account.

Query params: page, page_size, from_number, to_number, caller_name, date_start, date_end, fax_status, is_test, client, callback_status.

bash
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -H "Authorization: Bearer $API_KEY" "$API_BASE/received_faxes?page=1&page_size=10&fax_status=success" | jq
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -H "Authorization: Bearer $API_KEY" "$API_BASE/received_faxes?page=1&page_size=10&fax_status=success" | jq

Response

JSON
{
  "receivedFaxes": [
    {
      "fromNumber": "+15550100002",
      "toNumber": "+15550100001",
      "sendToken": "a3b4c5d6e7f8",
      "callerName": "EXAMPLE CLINIC",
      "sentAt": "2025-01-15T09:15:00.000Z",
      "completedAt": "2025-01-15T09:16:00.000Z",
      "numPages": 3,
      "isTest": false,
      "faxStatus": "success",
      "errorDetails": null,
      "client": "client_001",
      "patientName": "John Doe",
      "patientDob": "1990-01-15",
      "callbackStatus": "success",
      "documentClassification": "Referral",
      "secondaryCategory": null,
      "patientFirstName": "John",
      "patientMiddleName": null,
      "patientLastName": "Doe",
      "insuranceMemberId": "MEM000000001",
      "referenceNumber": "REF-2025-001",
      "authorizationNumber": null,
      "codes": "99213",
      "authDateRangeStart": null,
      "authDateRangeEnd": null,
      "denialReason": null
    }
  ],
  "meta": {
    "totalCount": 15,
    "totalPages": 2,
    "perPage": 10,
    "page": 1
  }
}
{
  "receivedFaxes": [
    {
      "fromNumber": "+15550100002",
      "toNumber": "+15550100001",
      "sendToken": "a3b4c5d6e7f8",
      "callerName": "EXAMPLE CLINIC",
      "sentAt": "2025-01-15T09:15:00.000Z",
      "completedAt": "2025-01-15T09:16:00.000Z",
      "numPages": 3,
      "isTest": false,
      "faxStatus": "success",
      "errorDetails": null,
      "client": "client_001",
      "patientName": "John Doe",
      "patientDob": "1990-01-15",
      "callbackStatus": "success",
      "documentClassification": "Referral",
      "secondaryCategory": null,
      "patientFirstName": "John",
      "patientMiddleName": null,
      "patientLastName": "Doe",
      "insuranceMemberId": "MEM000000001",
      "referenceNumber": "REF-2025-001",
      "authorizationNumber": null,
      "codes": "99213",
      "authDateRangeStart": null,
      "authDateRangeEnd": null,
      "denialReason": null
    }
  ],
  "meta": {
    "totalCount": 15,
    "totalPages": 2,
    "perPage": 10,
    "page": 1
  }
}

Response Fields

FieldDescription
sendTokenUnique identifier for this fax
fromNumberThe fax number that sent this fax
toNumberYour Medsender fax number that received it
callerNameCaller ID name from the sending fax machine
faxStatusReception status: "success" or "failure"
sentAtWhen the fax started transmitting (ISO 8601)
completedAtWhen the fax finished receiving (ISO 8601)
numPagesNumber of pages received
isTestWhether this was a test fax
errorDetailsError information if faxStatus is "failure"
callbackStatusStatus of webhook delivery: "success", "failed", "pending", or null
clientClient ID if the fax number is assigned to a client

AI Extraction Fields (populated when AI extraction is enabled for your account):

documentClassificationDocument type: "Referral", "Lab Result", "Prior Authorization", etc.
patientNameFull patient name extracted from document
patientFirstNamePatient first name
patientMiddleNamePatient middle name
patientLastNamePatient last name
patientDobPatient date of birth (YYYY-MM-DD)
insuranceMemberIdInsurance member ID
referenceNumberReference number from document
authorizationNumberPrior authorization number
codesMedical codes as stored text, or null; the text is not guaranteed to be JSON
authDateRangeStartAuthorization start date
authDateRangeEndAuthorization end date
denialReasonDenial reason if document is a denial

Get Received Fax

GET /received_faxes/:id — Retrieves details for a specific received fax.

The :id parameter is the fax's sendToken.

bash
curl -s -H "Authorization: Bearer sk_test_..." "https://api.medsender.com/api/v2/received_faxes/REPLACE_SEND_TOKEN" | jq
curl -s -H "Authorization: Bearer sk_test_..." "https://api.medsender.com/api/v2/received_faxes/REPLACE_SEND_TOKEN" | jq

Response

JSON
{
  "fromNumber": "+15550100002",
  "toNumber": "+15550100001",
  "sendToken": "a3b4c5d6e7f8",
  "callerName": "EXAMPLE CLINIC",
  "sentAt": "2025-01-15T09:15:00.000Z",
  "completedAt": "2025-01-15T09:16:00.000Z",
  "numPages": 3,
  "isTest": false,
  "faxStatus": "success",
  "errorDetails": null,
  "client": "client_001",
  "patientName": "John Doe",
  "patientDob": "1990-01-15",
  "callbackStatus": "success",
  "documentClassification": "Referral",
  "secondaryCategory": null,
  "patientFirstName": "John",
  "patientMiddleName": null,
  "patientLastName": "Doe",
  "insuranceMemberId": "MEM000000001",
  "referenceNumber": "REF-2025-001",
  "authorizationNumber": null,
  "codes": "99213",
  "authDateRangeStart": null,
  "authDateRangeEnd": null,
  "denialReason": null
}
{
  "fromNumber": "+15550100002",
  "toNumber": "+15550100001",
  "sendToken": "a3b4c5d6e7f8",
  "callerName": "EXAMPLE CLINIC",
  "sentAt": "2025-01-15T09:15:00.000Z",
  "completedAt": "2025-01-15T09:16:00.000Z",
  "numPages": 3,
  "isTest": false,
  "faxStatus": "success",
  "errorDetails": null,
  "client": "client_001",
  "patientName": "John Doe",
  "patientDob": "1990-01-15",
  "callbackStatus": "success",
  "documentClassification": "Referral",
  "secondaryCategory": null,
  "patientFirstName": "John",
  "patientMiddleName": null,
  "patientLastName": "Doe",
  "insuranceMemberId": "MEM000000001",
  "referenceNumber": "REF-2025-001",
  "authorizationNumber": null,
  "codes": "99213",
  "authDateRangeStart": null,
  "authDateRangeEnd": null,
  "denialReason": null
}

Test Receive (Sandbox)

POST /received_faxes/test_receive — Simulates receiving a fax for testing webhooks and integrations.

  • to_number must be a fax number that belongs to your Medsender account.
  • from_number can be any E.164 number (it is echoed in the callback payload and portal UI).
  • Attach a small PDF or TIFF file; it will be delivered to your portal and via webhook.
bash
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -X POST -H "Authorization: Bearer $API_KEY" -F "file=@./sample.pdf" -F "to_number=+1YOUR_TEST_NUMBER" -F "from_number=+13125550123" "$API_BASE/received_faxes/test_receive"
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -X POST -H "Authorization: Bearer $API_KEY" -F "file=@./sample.pdf" -F "to_number=+1YOUR_TEST_NUMBER" -F "from_number=+13125550123" "$API_BASE/received_faxes/test_receive"

Response

JSON
{
  "message": "Sent test fax to your fax number. Sending callback now..."
}
{
  "message": "Sent test fax to your fax number. Sending callback now..."
}

Forward a Received Fax

POST /received_faxes/:id/forward_as_fax — Forwards a received fax to another fax number.

The :id parameter is the fax's sendToken.

bash
curl -s -X POST -H "Authorization: Bearer sk_test_..." -F "to_number=+13125550123" "https://api.medsender.com/api/v2/received_faxes/REPLACE_SEND_TOKEN/forward_as_fax" | jq
curl -s -X POST -H "Authorization: Bearer sk_test_..." -F "to_number=+13125550123" "https://api.medsender.com/api/v2/received_faxes/REPLACE_SEND_TOKEN/forward_as_fax" | jq

Response

JSON
{
  "message": "Record has been sent, we will send a callback upon completion.",
  "faxId": "f5cfd99304f9"
}
{
  "message": "Record has been sent, we will send a callback upon completion.",
  "faxId": "f5cfd99304f9"
}

Automatic AI Extraction

By default, when you receive a fax, your callback fires immediately with the fax details.

To automatically extract patient information, document classification, and medical codes from every incoming fax, contact us at support@medsender.com to enable this feature for your account.

When enabled:

  • Incoming faxes are processed by AI before your callback fires
  • Processing may take up to a few minutes depending on document complexity
  • Your callback payload includes these additional fields when populated:
  • documentClassification, secondaryCategory
  • patientName, patientFirstName, patientMiddleName, patientLastName
  • patientDob, insuranceMemberId
  • referenceNumber, authorizationNumber, codes
  • authDateRangeStart, authDateRangeEnd, denialReason

You can always run AI manually on any document using the AI Documents endpoint.