# Enable or disable secure redirects This function enables or disables secure redirects (HTTPS) for the cPanel account's domains that you specify. To call this function, one of the following conditions exist: * AutoSSL exist on the domains for which you enable secure redirects. * A valid SSL certificate exist for each domain for which you wish to enable secure redirects. * You own the domains for which you wish to enable secure redirects. Endpoint: GET /SSL/toggle_ssl_redirect_for_domains Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domains` (string, required) A comma-separated list of the cPanel account's domains for which to enable or disable secure redirects. To enable or disable redirects for addon domains, you pass the addon domain its subdomain. Example: "main.example,addon.example,addon.main.example" - `state` (integer, required) Whether to enable or disable redirects for the specified domains. * — Enable. * — Disable. Enum: 0, 1 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "toggle_ssl_redirect_for_domains" - `module` (string) The name of the module called. Example: "SSL" - `result` (object) - `result.data` (array) The domains for which the function enabled or disabled secure redirects. Example: ["main.example","addon.example","addon.main.example"] - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) - - Success - - Failed: Check the errors field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.