Fax Numbers

List Numbers

GET /fax_numbers — Returns all fax numbers provisioned for your account.

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

Response

JSON
{
  "fax_numbers": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "number": "+15550100001",
      "callback_url": "https://example.com/webhooks/fax",
      "created_at": "2025-01-15T10:30:00.000Z",
      "client": null,
      "uri": "https://api.medsender.com/api/v2/fax_numbers/f47ac10b-58cc-4372-a567-0e02b2c3d479"
    }
  ]
}
{
  "fax_numbers": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "number": "+15550100001",
      "callback_url": "https://example.com/webhooks/fax",
      "created_at": "2025-01-15T10:30:00.000Z",
      "client": null,
      "uri": "https://api.medsender.com/api/v2/fax_numbers/f47ac10b-58cc-4372-a567-0e02b2c3d479"
    }
  ]
}

Response Fields

FieldDescription
idUnique identifier (UUID) for this fax number
numberThe fax number in E.164 format (e.g. +15550100001)
callback_urlWebhook URL for incoming fax notifications
created_atWhen the number was provisioned (ISO 8601)
clientClient object if assigned, otherwise null
uriAPI endpoint URL for this fax number

Provision Number

POST /fax_numbers — Provisions a new fax number in the specified area code.

Request Parameters (JSON body)

ParameterRequiredDescription
fax_number.area_codeYes3-digit US area code (e.g. "415", "212")
fax_number.callback_urlNoWebhook URL for incoming fax notifications
fax_number.client_idNoClient ID to assign this number to
bash
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

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
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

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

Response

JSON
{
  "fax_number": {
    "id": "a1b2c3d4-e5f6-4890-abcd-ef1234567890",
    "number": "+15550100099",
    "callback_url": null,
    "created_at": "2025-01-15T10:35:00.000Z",
    "client": null,
    "uri": "https://api.medsender.com/api/v2/fax_numbers/a1b2c3d4-e5f6-4890-abcd-ef1234567890"
  }
}
{
  "fax_number": {
    "id": "a1b2c3d4-e5f6-4890-abcd-ef1234567890",
    "number": "+15550100099",
    "callback_url": null,
    "created_at": "2025-01-15T10:35:00.000Z",
    "client": null,
    "uri": "https://api.medsender.com/api/v2/fax_numbers/a1b2c3d4-e5f6-4890-abcd-ef1234567890"
  }
}

Update Callback URL

PATCH /fax_numbers/:id — Updates the webhook callback URL for a fax number.

The :id parameter is the fax number's unique identifier (UUID).

bash
curl -s -X PATCH -H "Authorization: Bearer sk_test_..." -H "Content-Type: application/json" -d '{"fax_number":{"callback_url":"https://example.com/webhooks/fax"}}' "https://api.medsender.com/api/v2/fax_numbers/YOUR_FAX_NUMBER_ID" | jq
curl -s -X PATCH -H "Authorization: Bearer sk_test_..." -H "Content-Type: application/json" -d '{"fax_number":{"callback_url":"https://example.com/webhooks/fax"}}' "https://api.medsender.com/api/v2/fax_numbers/YOUR_FAX_NUMBER_ID" | jq

Response

JSON
{
  "fax_number": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "number": "+15550100001",
    "callback_url": "https://example.com/webhooks/fax",
    "created_at": "2025-01-15T10:30:00.000Z",
    "client": null,
    "uri": "https://api.medsender.com/api/v2/fax_numbers/f47ac10b-58cc-4372-a567-0e02b2c3d479"
  }
}
{
  "fax_number": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "number": "+15550100001",
    "callback_url": "https://example.com/webhooks/fax",
    "created_at": "2025-01-15T10:30:00.000Z",
    "client": null,
    "uri": "https://api.medsender.com/api/v2/fax_numbers/f47ac10b-58cc-4372-a567-0e02b2c3d479"
  }
}