Clients

Create and manage logical clients to group fax numbers and organize inbound faxes.

List Clients

GET /clients — Returns all clients configured for your account.

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

Response

JSON
{
  "clients": [
    {
      "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Example Clinic",
      "fax_numbers": [
        {
          "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
          "number": "+15550100001"
        }
      ]
    }
  ]
}
{
  "clients": [
    {
      "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Example Clinic",
      "fax_numbers": [
        {
          "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
          "number": "+15550100001"
        }
      ]
    }
  ]
}

Response Fields

FieldDescription
client_idUnique identifier (UUID) for this client
nameClient display name
fax_numbersArray of fax numbers assigned to this client, each with id and number

Get Client

GET /clients/:client_id — Retrieves details for a specific client.

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

Response

JSON
{
  "client": {
    "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Example Clinic",
    "fax_numbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001"
      }
    ]
  }
}
{
  "client": {
    "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Example Clinic",
    "fax_numbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001"
      }
    ]
  }
}

Create Client

POST /clients — Creates a new client with the specified name.

Request Parameters (JSON body)

ParameterRequiredDescription
client.nameYesDisplay name for the client
client.fax_number_idNoID of a fax number to assign to this client
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 '{"client":{"name":"Clinics West","fax_number_id":null}}' \
  "$API_BASE/clients" | 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 '{"client":{"name":"Clinics West","fax_number_id":null}}' \
  "$API_BASE/clients" | jq

Response

JSON
{
  "client": {
    "client_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Clinics West",
    "fax_numbers": []
  }
}
{
  "client": {
    "client_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Clinics West",
    "fax_numbers": []
  }
}

Update Client

PATCH /clients/:client_id — Updates an existing client.

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

curl -s -X PATCH -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"client":{"name":"Clinics West — Updated"}}' \
  "$API_BASE/clients/REPLACE_CLIENT_ID" | jq
export API_BASE="https://api.medsender.com/api/v2"
export API_KEY="sk_test_..."

curl -s -X PATCH -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"client":{"name":"Clinics West — Updated"}}' \
  "$API_BASE/clients/REPLACE_CLIENT_ID" | jq

Response

JSON
{
  "client": {
    "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Clinics West — Updated",
    "fax_numbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001"
      }
    ]
  }
}
{
  "client": {
    "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Clinics West — Updated",
    "fax_numbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001"
      }
    ]
  }
}