Headers
X-Medsender-Signature:HMAC-SHA256 signature for verifying authenticity
When operations complete (send fax, receive fax, direct message, email, AI document), Medsender POSTs to your callback_url. Use this to update your system.
X-Medsender-Signature: HMAC-SHA256 signature for verifying authenticityCallbacks are sent as form data with a JSON string in a named field. Parse the form field, then parse the JSON inside.
recordDetails field with JSON string (keys in camelCase)recordDetails field with JSON string + file field with PDF attachment (keys in camelCase)AiDocumentDetails field with JSON string (nested keys in snake_case)If your endpoint returns a non-2xx response, we retry with exponential backoff for a short period.
Parse the form-urlencoded body and extract the JSON from the appropriate field.
Triggered after a fax finishes sending. Form field: recordDetails
Payload Fields
| Field | Description |
|---|---|
| sendToken | Unique identifier for this fax |
| fromNumber | Your Medsender fax number that sent this fax |
| toNumber | Destination fax number |
| sentStatus | Delivery status: "success" or "failure" |
| sentAt | When the fax was queued (ISO 8601) |
| completedAt | When the fax finished sending (ISO 8601) |
| numPages | Number of pages sent |
| errorDetails | Error message if sentStatus is "failure" |
| isTest | Whether this was a test fax |
| secureLink | URL to download the fax PDF |
Triggered after a fax is received on your number. Form field: recordDetails + file (PDF attachment)
Payload Fields
| Field | Description |
|---|---|
| sendToken | Unique identifier for this fax |
| fromNumber | Sender's fax number |
| toNumber | Your Medsender fax number that received it |
| callerName | Caller ID name from sender |
| faxStatus | Reception status: "success" or "failure" |
| sentAt | When transmission started (ISO 8601) |
| completedAt | When reception completed (ISO 8601) |
| numPages | Number of pages received |
| isTest | Whether this was a test fax |
| client | Client ID if the number is assigned to a client |
| callbackStatus | Webhook delivery status |
AI Extraction Fields (when enabled for your account):
| documentClassification | Document type: "Referral", "Lab Result", etc. |
| patientName | Full patient name extracted |
| patientFirstName | Patient first name |
| patientLastName | Patient last name |
| patientDob | Patient date of birth |
| insuranceMemberId | Insurance member ID |
| codes | Array of medical codes (CPT, ICD, etc.) |
Triggered after AI processing completes. Form field: AiDocumentDetails
Note: Keys inside aiResult use snake_case (known inconsistency).
Payload Fields (inside aiResult)
| Field | Description |
|---|---|
| ai_token | Unique identifier for this AI document request |
| document_classification | Document type: "Referral", "Lab Result", etc. |
| document_summary | AI-generated summary of the document |
| patient_name | Full patient name extracted |
| patient_dob | Patient date of birth (YYYY-MM-DD) |
| patient_phone_number | Patient phone number |
| patient_gender | Patient gender |
| insurance_member_id | Insurance member ID |
| icd_codes_json | Array of ICD codes |
| cpt_codes_json | Array of CPT codes |
| completed_at | When processing completed (ISO 8601) |
| error_details | Error message if processing failed |