---
title: Detections
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Leaked Credential Checks](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Detections

##### [List the custom detection locations of a zone.](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks/subresources/detections/methods/list)

leaked\_credential\_checks.detections.list(DetectionListParams\*\*kwargs) -> SyncSinglePage\[[DetectionListResponse](<https://developers.cloudflare.com/api/python/resources/leaked_credential_checks#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_list_response%20%3E%20(schema)>)]

GET/zones/{zone\_id}/leaked-credential-checks/detections

##### [Create a custom detection location for a zone.](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks/subresources/detections/methods/create)

leaked\_credential\_checks.detections.create(DetectionCreateParams\*\*kwargs) -> [DetectionCreateResponse](<https://developers.cloudflare.com/api/python/resources/leaked_credential_checks#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_create_response%20%3E%20(schema)>)

POST/zones/{zone\_id}/leaked-credential-checks/detections

##### [Get a custom detection location of a zone.](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks/subresources/detections/methods/get)

leaked\_credential\_checks.detections.get(strdetection\_id, DetectionGetParams\*\*kwargs) -> [DetectionGetResponse](<https://developers.cloudflare.com/api/python/resources/leaked_credential_checks#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_get_response%20%3E%20(schema)>)

GET/zones/{zone\_id}/leaked-credential-checks/detections/{detection\_id}

##### [Update a custom detection location of a zone.](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks/subresources/detections/methods/update)

leaked\_credential\_checks.detections.update(strdetection\_id, DetectionUpdateParams\*\*kwargs) -> [DetectionUpdateResponse](<https://developers.cloudflare.com/api/python/resources/leaked_credential_checks#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_update_response%20%3E%20(schema)>)

PUT/zones/{zone\_id}/leaked-credential-checks/detections/{detection\_id}

##### [Delete a custom detection location from a zone.](https://developers.cloudflare.com/api/python/resources/leaked_credential_checks/subresources/detections/methods/delete)

leaked\_credential\_checks.detections.delete(strdetection\_id, DetectionDeleteParams\*\*kwargs) -> object

DELETE/zones/{zone\_id}/leaked-credential-checks/detections/{detection\_id}

##### ModelsExpand Collapse

<details>

<summary>

class DetectionListResponse: …

Defines a custom set of username/password expressions to match Leaked Credential Checks on.

</summary>

id: Optional\[str]

Defines the unique ID for this custom detection.

maxLength32

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

password: Optional\[str]

Defines ehe ruleset expression to use in matching the password in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_list_response%20%3E%20(schema)%20%3E%20(property)%20password">Link to this property</a>

username: Optional\[str]

Defines the ruleset expression to use in matching the username in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_list_response%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

[Link to this property](<#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_list_response%20%3E%20(schema)>)

<details>

<summary>

class DetectionCreateResponse: …

Defines a custom set of username/password expressions to match Leaked Credential Checks on.

</summary>

id: Optional\[str]

Defines the unique ID for this custom detection.

maxLength32

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_create_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

password: Optional\[str]

Defines ehe ruleset expression to use in matching the password in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_create_response%20%3E%20(schema)%20%3E%20(property)%20password">Link to this property</a>

username: Optional\[str]

Defines the ruleset expression to use in matching the username in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_create_response%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

[Link to this property](<#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_create_response%20%3E%20(schema)>)

<details>

<summary>

class DetectionGetResponse: …

Defines a custom set of username/password expressions to match Leaked Credential Checks on.

</summary>

id: Optional\[str]

Defines the unique ID for this custom detection.

maxLength32

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

password: Optional\[str]

Defines ehe ruleset expression to use in matching the password in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_get_response%20%3E%20(schema)%20%3E%20(property)%20password">Link to this property</a>

username: Optional\[str]

Defines the ruleset expression to use in matching the username in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_get_response%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

[Link to this property](<#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_get_response%20%3E%20(schema)>)

<details>

<summary>

class DetectionUpdateResponse: …

Defines a custom set of username/password expressions to match Leaked Credential Checks on.

</summary>

id: Optional\[str]

Defines the unique ID for this custom detection.

maxLength32

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_update_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

password: Optional\[str]

Defines ehe ruleset expression to use in matching the password in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_update_response%20%3E%20(schema)%20%3E%20(property)%20password">Link to this property</a>

username: Optional\[str]

Defines the ruleset expression to use in matching the username in a request.

<a href="#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_update_response%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

[Link to this property](<#(resource)%20leaked_credential_checks.detections%20%3E%20(model)%20detection_update_response%20%3E%20(schema)>)