PHP Client for Cloudflare API
Load Balancers

Monitors

Load balancer monitors owned by the authenticated user.

Load balancer monitors owned by the authenticated user.

List

List the user's configured load balancer monitors.

php
$response = $client->user()->loadBalancers()->monitors()->list();

Create

Create a new load balancer monitor for the user.

ParamTypeRequiredDefaultDescription
valuesarrayNo[]Values to set on the monitor, e.g. `type`, `method`, `path`, `expected_codes`.
php
$response = $client->user()->loadBalancers()->monitors()->create([]);

Get

Get a single configured load balancer monitor.

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
php
$response = $client->user()->loadBalancers()->monitors()->get('MONITOR_ID');

Update

Update an existing load balancer monitor, overwriting the full configuration.

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
valuesarrayYesValues to set on the monitor, e.g. `type`, `method`, `path`, `expected_codes`.
php
$response = $client->user()->loadBalancers()->monitors()->update('MONITOR_ID', []);

Edit

Apply changes to an existing monitor, overwriting only the supplied properties.

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
valuesarrayYesValues to patch on the monitor.
php
$response = $client->user()->loadBalancers()->monitors()->edit('MONITOR_ID', []);

Delete

Delete a load balancer monitor.

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
php
$response = $client->user()->loadBalancers()->monitors()->delete('MONITOR_ID');

Preview

Preview pools associated with a given monitor and show the effective response.

Answers with a preview identifier; read the result with $client->user()->loadBalancers()->preview().

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
valuesarrayNo[]The pools to run the preview on.
php
$response = $client->user()->loadBalancers()->monitors()->preview('MONITOR_ID', []);

References

List the load balancers and pools that reference a given monitor.

ParamTypeRequiredDefaultDescription
monitorIdstringYesMonitor Identifier.
php
$response = $client->user()->loadBalancers()->monitors()->references('MONITOR_ID');
Copyright © 2026