Sucuri API v2 — Protected Pages

API v2 - Retrieve Protected Pages (protected_pages)

Returns the list of protected URLs configured under Access Control → Protected Pages.

sh curl 'https://waf.sucuri.net/api?v2' \ --data 'k=API_KEY' \ --data 's=API_SECRET' \ --data 'a=protected_pages'

Output fields

Field Description
path The protected path without the domain.
password The password generated automatically when applicable.
state unused or the type of protection applied.
provisioning_uri Only when state is googleauth.
qrcode_image Only when state is googleauth.

API v2 - Add Protected Pages

Adds one or more protected URLs. Uses the update_setting action with the protected_pages parameter (see also the related twofactorauth_path parameter in advanced-settings for setting the protection type).

sh curl 'https://waf.sucuri.net/api?v2' \ --data 'k=API_KEY' \ --data 's=API_SECRET' \ --data 'a=update_setting' \ --data 'protected_pages=URL'

To add more than one:

protected_pages[]=URL&protected_pages[]=URL

API v2 - Update Password for Protected Pages

Regenerates the password for a set of protected URLs (applies to URLs protected by password or Google Auth).

sh curl 'https://waf.sucuri.net/api?v2' \ --data 'k=API_KEY' \ --data 's=API_SECRET' \ --data 'a=update_setting' \ --data 'protected_page_item[]=URL' \ --data 'protected_page_update_pwd=1'

API v2 - Remove Protected Pages

Removes one or more protected URLs.

sh curl 'https://waf.sucuri.net/api?v2' \ --data 'k=API_KEY' \ --data 's=API_SECRET' \ --data 'a=update_setting' \ --data 'protected_page_remove[]=URL'