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": [
    {
      "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Example Clinic",
      "faxNumbers": [
        {
          "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
          "number": "+15550100001",
          "callbackUrl": null,
          "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
        }
      ]
    }
  ]
}
{
  "clients": [
    {
      "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Example Clinic",
      "faxNumbers": [
        {
          "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
          "number": "+15550100001",
          "callbackUrl": null,
          "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
        }
      ]
    }
  ]
}

Response Fields

FieldDescription
clientIdUnique identifier (UUID) for this client
nameClient display name
faxNumbersArray 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": {
    "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Example Clinic",
    "faxNumbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001",
        "callbackUrl": null,
        "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
      }
    ]
  }
}
{
  "client": {
    "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Example Clinic",
    "faxNumbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001",
        "callbackUrl": null,
        "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
      }
    ]
  }
}

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": {
    "clientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Clinics West",
    "faxNumbers": []
  }
}
{
  "client": {
    "clientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Clinics West",
    "faxNumbers": []
  }
}

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": {
    "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Clinics West — Updated",
    "faxNumbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001",
        "callbackUrl": null,
        "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
      }
    ]
  }
}
{
  "client": {
    "clientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Clinics West — Updated",
    "faxNumbers": [
      {
        "id": "8ec64100-b049-42d0-955b-6fc97ec53361",
        "number": "+15550100001",
        "callbackUrl": null,
        "uri": "https://api.medsender.com/api/v2/fax_numbers/8ec64100-b049-42d0-955b-6fc97ec53361"
      }
    ]
  }
}