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
{
  "received_faxes": [
    {
      "from_number": "+15550100002",
      "to_number": "+15550100001",
      "send_token": "a3b4c5d6e7f8",
      "caller_name": "EXAMPLE CLINIC",
      "sent_at": "2025-01-15T09:15:00.000Z",
      "completed_at": "2025-01-15T09:16:00.000Z",
      "num_pages": 3,
      "is_test": false,
      "fax_status": "success",
      "error_details": null,
      "client": "client_001",
      "patient_name": "John Doe",
      "patient_dob": "1990-01-15",
      "callback_status": "success",
      "document_classification": "Referral",
      "secondary_category": null,
      "patient_first_name": "John",
      "patient_middle_name": null,
      "patient_last_name": "Doe",
      "insurance_member_id": "MEM000000001",
      "reference_number": "REF-2025-001",
      "authorization_number": null,
      "codes": [{"code": "99213"}],
      "auth_date_range_start": null,
      "auth_date_range_end": null,
      "denial_reason": null
    }
  ],
  "meta": {
    "total_count": 15,
    "total_pages": 2,
    "per_page": 10,
    "page": 1
  }
}
{
  "received_faxes": [
    {
      "from_number": "+15550100002",
      "to_number": "+15550100001",
      "send_token": "a3b4c5d6e7f8",
      "caller_name": "EXAMPLE CLINIC",
      "sent_at": "2025-01-15T09:15:00.000Z",
      "completed_at": "2025-01-15T09:16:00.000Z",
      "num_pages": 3,
      "is_test": false,
      "fax_status": "success",
      "error_details": null,
      "client": "client_001",
      "patient_name": "John Doe",
      "patient_dob": "1990-01-15",
      "callback_status": "success",
      "document_classification": "Referral",
      "secondary_category": null,
      "patient_first_name": "John",
      "patient_middle_name": null,
      "patient_last_name": "Doe",
      "insurance_member_id": "MEM000000001",
      "reference_number": "REF-2025-001",
      "authorization_number": null,
      "codes": [{"code": "99213"}],
      "auth_date_range_start": null,
      "auth_date_range_end": null,
      "denial_reason": null
    }
  ],
  "meta": {
    "total_count": 15,
    "total_pages": 2,
    "per_page": 10,
    "page": 1
  }
}

Response Fields

FieldDescription
send_tokenUnique identifier for this fax
from_numberThe fax number that sent this fax
to_numberYour Medsender fax number that received it
caller_nameCaller ID name from the sending fax machine
fax_statusReception status: "success" or "failure"
sent_atWhen the fax started transmitting (ISO 8601)
completed_atWhen the fax finished receiving (ISO 8601)
num_pagesNumber of pages received
is_testWhether this was a test fax
error_detailsError information if fax_status is "failure"
callback_statusStatus of webhook delivery: "success", "failure", or "pending"
clientClient ID if the fax number is assigned to a client

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

document_classificationDocument type: "Referral", "Lab Result", "Prior Authorization", etc.
patient_nameFull patient name extracted from document
patient_first_namePatient first name
patient_middle_namePatient middle name
patient_last_namePatient last name
patient_dobPatient date of birth (YYYY-MM-DD)
insurance_member_idInsurance member ID
reference_numberReference number from document
authorization_numberPrior authorization number
codesArray of medical codes (CPT, ICD, etc.)
auth_date_range_startAuthorization start date
auth_date_range_endAuthorization end date
denial_reasonDenial 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
{
  "from_number": "+15550100002",
  "to_number": "+15550100001",
  "send_token": "a3b4c5d6e7f8",
  "caller_name": "EXAMPLE CLINIC",
  "sent_at": "2025-01-15T09:15:00.000Z",
  "completed_at": "2025-01-15T09:16:00.000Z",
  "num_pages": 3,
  "is_test": false,
  "fax_status": "success",
  "error_details": null,
  "client": "client_001",
  "patient_name": "John Doe",
  "patient_dob": "1990-01-15",
  "callback_status": "success",
  "document_classification": "Referral",
  "secondary_category": null,
  "patient_first_name": "John",
  "patient_middle_name": null,
  "patient_last_name": "Doe",
  "insurance_member_id": "MEM000000001",
  "reference_number": "REF-2025-001",
  "authorization_number": null,
  "codes": [{"code": "99213"}],
  "auth_date_range_start": null,
  "auth_date_range_end": null,
  "denial_reason": null
}
{
  "from_number": "+15550100002",
  "to_number": "+15550100001",
  "send_token": "a3b4c5d6e7f8",
  "caller_name": "EXAMPLE CLINIC",
  "sent_at": "2025-01-15T09:15:00.000Z",
  "completed_at": "2025-01-15T09:16:00.000Z",
  "num_pages": 3,
  "is_test": false,
  "fax_status": "success",
  "error_details": null,
  "client": "client_001",
  "patient_name": "John Doe",
  "patient_dob": "1990-01-15",
  "callback_status": "success",
  "document_classification": "Referral",
  "secondary_category": null,
  "patient_first_name": "John",
  "patient_middle_name": null,
  "patient_last_name": "Doe",
  "insurance_member_id": "MEM000000001",
  "reference_number": "REF-2025-001",
  "authorization_number": null,
  "codes": [{"code": "99213"}],
  "auth_date_range_start": null,
  "auth_date_range_end": null,
  "denial_reason": 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.",
  "fax_id": "f5cfd99304f9"
}
{
  "message": "Record has been sent, we will send a callback upon completion.",
  "fax_id": "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.