# CT # Alerting ## Get CT Alerting Subscription `zones.ct.alerting.get(AlertingGetParams**kwargs) -> AlertingGetResponse` **get** `/zones/{zone_id}/ct/alerting` Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and, for Business and Enterprise zones, the list of email addresses that receive alerts. ### Parameters - `zone_id: str` Identifier. ### Returns - `class AlertingGetResponse: …` Certificate Transparency alerting subscription settings for a zone. - `enabled: bool` Whether CT alerting is enabled for the zone. - `emails: Optional[List[str]]` Email addresses that receive CT alert notifications. Only present and configurable for Business and Enterprise zones. Maximum of 10 addresses. For Free and Pro zones, notifications are sent to all users with SSL permissions on the zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) alerting = client.zones.ct.alerting.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(alerting.enabled) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "enabled": true, "emails": [ "security@example.com", "admin@example.com" ] } } ``` ## Update CT Alerting Subscription `zones.ct.alerting.edit(AlertingEditParams**kwargs) -> AlertingEditResponse` **patch** `/zones/{zone_id}/ct/alerting` Create or update the Certificate Transparency alerting subscription for a zone. Enables or disables email notifications when certificates are issued for the zone's domains. For Free and Pro zones, the subscription is toggled on or off using the enabled field. Notification emails are sent to all users with SSL permissions on the zone. For Business and Enterprise zones, the emails field is required and controls which addresses receive alerts. Setting emails to an empty list disables the subscription regardless of the enabled field. A maximum of 10 email addresses may be configured. ### Parameters - `zone_id: str` Identifier. - `enabled: bool` Whether CT alerting is enabled for the zone. - `emails: Optional[Sequence[str]]` Email addresses that receive CT alert notifications. Only present and configurable for Business and Enterprise zones. Maximum of 10 addresses. For Free and Pro zones, notifications are sent to all users with SSL permissions on the zone. ### Returns - `class AlertingEditResponse: …` Certificate Transparency alerting subscription settings for a zone. - `enabled: bool` Whether CT alerting is enabled for the zone. - `emails: Optional[List[str]]` Email addresses that receive CT alert notifications. Only present and configurable for Business and Enterprise zones. Maximum of 10 addresses. For Free and Pro zones, notifications are sent to all users with SSL permissions on the zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.zones.ct.alerting.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) print(response.enabled) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "enabled": true, "emails": [ "security@example.com", "admin@example.com" ] } } ``` ## Domain Types ### Alerting Get Response - `class AlertingGetResponse: …` Certificate Transparency alerting subscription settings for a zone. - `enabled: bool` Whether CT alerting is enabled for the zone. - `emails: Optional[List[str]]` Email addresses that receive CT alert notifications. Only present and configurable for Business and Enterprise zones. Maximum of 10 addresses. For Free and Pro zones, notifications are sent to all users with SSL permissions on the zone. ### Alerting Edit Response - `class AlertingEditResponse: …` Certificate Transparency alerting subscription settings for a zone. - `enabled: bool` Whether CT alerting is enabled for the zone. - `emails: Optional[List[str]]` Email addresses that receive CT alert notifications. Only present and configurable for Business and Enterprise zones. Maximum of 10 addresses. For Free and Pro zones, notifications are sent to all users with SSL permissions on the zone.