The legacy v2 API lets existing integrations send and receive faxes, manage fax numbers, send secure email links, create clients, and run AI on documents.
These examples use /api/v2 and developer-owned fax resources. For organization-linked web fax workflows, use the main Sent Faxes and Received Faxes documentation. Changing the API URL alone does not enroll an account or migrate its history.
Quickstart: Send your first fax
Use a test key (sk_test_…) and a small PDF. This posts to the fax API and returns a token to check status.
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."
# Provision a test fax number (area code 415 as example)
curl -s -X POST -H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"fax_number":{"area_code":"415"}}' \
"$API_BASE/fax_numbers" | jq
# Send a fax (replace numbers and attach sample.pdf)
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"
bash
export API_BASE="https://api.medsender.com/api/v2"export API_KEY="sk_test_..."# Provision a test fax number (area code 415 as example)curl -s -X POST -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"fax_number":{"area_code":"415"}}' \ "$API_BASE/fax_numbers" | jq# Send a fax (replace numbers and attach sample.pdf)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_..."# Provision a test fax number (area code 415 as example)curl -s -X POST -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"fax_number":{"area_code":"415"}}' \ "$API_BASE/fax_numbers" | jq# Send a fax (replace numbers and attach sample.pdf)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"
Endpoints (Customer)
Sent Faxes: GET /sent_faxes, GET /sent_faxes/:send_token, POST /sent_faxes
Received Faxes: GET /received_faxes, GET /received_faxes/:send_token, POST /received_faxes/test_receive, POST /received_faxes/:send_token/forward_as_fax
Fax Numbers: GET /fax_numbers, GET /fax_numbers/:slug, POST /fax_numbers, PATCH /fax_numbers/:slug
Clients: GET /clients, GET /clients/:client_id, POST /clients, PATCH /clients/:client_id
Secure Links: POST /emails, GET /emails/:email_id
AI Documents: GET /ai_documents, GET /ai_documents/:ai_token, POST /ai_documents
All calls use Authorization: Bearer sk_* with your API key. Test keys start with sk_test_.
Response Examples
Create (Send Fax)
{ "message": "Record has been sent, we will send a callback upon completion.", "faxId": "abc123" }
JSON
{ "message": "Record has been sent, we will send a callback upon completion.", "faxId": "abc123" }
{ "message": "Record has been sent, we will send a callback upon completion.", "faxId": "abc123" }