Sent Faxes

List Sent Faxes

GET /sent_faxes — Returns a paginated list of sent faxes for your account.

Query params: page, page_size, from_number, to_number, patient_name, patient_dob, sender_name, recipient_name, date_start, date_end, is_test, sort, sort_dir.

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

curl -s -H "Authorization: Bearer $API_KEY" \
  "$API_BASE/sent_faxes?page=1&page_size=10&date_start=2024-10-01&date_end=2024-10-31" | jq
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -H "Authorization: Bearer $API_KEY" \
  "$API_BASE/sent_faxes?page=1&page_size=10&date_start=2024-10-01&date_end=2024-10-31" | jq

Response

JSON
{
  "sent_faxes": [
    {
      "from_number": "+15550100001",
      "to_number": "+15550100002",
      "recipient_name": "Dr. Example",
      "record_status": "activated",
      "patient_name": "John Doe",
      "patient_dob": "1990-01-15",
      "send_token": "f5cfd99304f9",
      "sender_name": "Example Provider",
      "expiry": "2025-02-15T14:30:00.000Z",
      "view_count": 0,
      "note": "Referral documents",
      "sent_at": "2025-01-15T14:30:00.000Z",
      "completed_at": "2025-01-15T14:32:00.000Z",
      "sent_status": "success",
      "document_type": "both",
      "error_details": null,
      "num_pages": 3,
      "is_test": false
    }
  ],
  "meta": {
    "total_count": 42,
    "total_pages": 5,
    "per_page": 10,
    "page": 1
  }
}
{
  "sent_faxes": [
    {
      "from_number": "+15550100001",
      "to_number": "+15550100002",
      "recipient_name": "Dr. Example",
      "record_status": "activated",
      "patient_name": "John Doe",
      "patient_dob": "1990-01-15",
      "send_token": "f5cfd99304f9",
      "sender_name": "Example Provider",
      "expiry": "2025-02-15T14:30:00.000Z",
      "view_count": 0,
      "note": "Referral documents",
      "sent_at": "2025-01-15T14:30:00.000Z",
      "completed_at": "2025-01-15T14:32:00.000Z",
      "sent_status": "success",
      "document_type": "both",
      "error_details": null,
      "num_pages": 3,
      "is_test": false
    }
  ],
  "meta": {
    "total_count": 42,
    "total_pages": 5,
    "per_page": 10,
    "page": 1
  }
}

Response Fields

FieldDescription
send_tokenUnique identifier for this fax (use this to retrieve status)
from_numberThe Medsender fax number that sent this fax
to_numberThe destination fax number
sent_statusFax delivery status: "queued", "inprogress", "success", or "failure"
sent_atWhen the fax was queued for sending (ISO 8601)
completed_atWhen the fax finished sending (ISO 8601, null if still in progress)
num_pagesNumber of pages in the fax
error_detailsError information if sent_status is "failure", otherwise null
is_testWhether this was sent using test credentials
patient_namePatient name if provided when sending
patient_dobPatient date of birth if provided
sender_nameSender name if provided
recipient_nameRecipient name if provided
noteInternal note if provided (for your reference only)
record_statusRecord status: "activated", "archived", or "revoked"
document_typeDocument type: "both", "document_only", or "access_code_sheet_only"
expiryWhen the secure link expires (30 days from creation)
view_countNumber of times the fax has been viewed via secure link

Get Sent Fax

GET /sent_faxes/:id — Retrieves details for a specific sent fax.

The :id parameter is the fax's sendToken.

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

Response

JSON
{
  "from_number": "+15550100001",
  "to_number": "+15550100002",
  "recipient_name": "Dr. Example",
  "record_status": "activated",
  "patient_name": "John Doe",
  "patient_dob": "1990-01-15",
  "send_token": "f5cfd99304f9",
  "sender_name": "Example Provider",
  "expiry": "2025-02-15T14:30:00.000Z",
  "view_count": 2,
  "note": "Referral documents",
  "sent_at": "2025-01-15T14:30:00.000Z",
  "completed_at": "2025-01-15T14:32:00.000Z",
  "sent_status": "success",
  "document_type": "both",
  "error_details": null,
  "num_pages": 3,
  "is_test": false
}
{
  "from_number": "+15550100001",
  "to_number": "+15550100002",
  "recipient_name": "Dr. Example",
  "record_status": "activated",
  "patient_name": "John Doe",
  "patient_dob": "1990-01-15",
  "send_token": "f5cfd99304f9",
  "sender_name": "Example Provider",
  "expiry": "2025-02-15T14:30:00.000Z",
  "view_count": 2,
  "note": "Referral documents",
  "sent_at": "2025-01-15T14:30:00.000Z",
  "completed_at": "2025-01-15T14:32:00.000Z",
  "sent_status": "success",
  "document_type": "both",
  "error_details": null,
  "num_pages": 3,
  "is_test": false
}

Send Fax

POST /sent_faxes — Sends a fax using multipart form data.

Request Parameters

ParameterRequiredDescription
fileYesPDF or TIFF file to send
from_numberYesYour Medsender fax number (E.164 format, e.g. +15550100001)
to_numberYesDestination fax number (E.164 format)
callback_urlNoURL to receive status callback when fax completes
patient_nameNoPatient name for record keeping
patient_dobNoPatient date of birth (YYYY-MM-DD)
sender_nameNoName of the person/org sending the fax
recipient_nameNoName of the intended recipient
noteNoInternal note for your reference (not sent in fax)
document_typeNoType of document: "both" (default), "document_only", or "access_code_sheet_only"
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 "from_number=+14155550100" \
  -F "to_number=+13125550123" \
  "$API_BASE/sent_faxes"
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 "from_number=+14155550100" \
  -F "to_number=+13125550123" \
  "$API_BASE/sent_faxes"

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"
}