# DLP # Datasets ## Fetch all datasets **get** `/accounts/{account_id}/dlp/datasets` Lists all DLP datasets configured for the account, including custom word lists and EDM datasets. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional DatasetArray` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } ] } ``` ## Fetch a specific dataset **get** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Fetch a specific dataset ### Path Parameters - `account_id: string` - `dataset_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Create a new dataset **post** `/accounts/{account_id}/dlp/datasets` Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations. ### Path Parameters - `account_id: string` ### Body Parameters - `name: string` - `case_sensitive: optional boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if `secret` is true or undefined - `description: optional string` The description of the dataset. - `encoding_version: optional number` Dataset encoding version Non-secret custom word lists with no header are always version 1. Secret EDM lists with no header are version 1. Multicolumn CSV with headers are version 2. Omitting this field provides the default value 0, which is interpreted the same as 1. - `secret: optional boolean` Generate a secret dataset. If true, the response will include a secret to use with the EDM encoder. If false, the response has no secret and the dataset is uploaded in plaintext. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional DatasetCreation` - `dataset: Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. - `encoding_version: number` Encoding version to use for dataset. - `max_cells: number` - `version: number` The version to use when uploading the dataset. - `secret: optional string` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "name": "name" }' ``` #### 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": { "dataset": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" }, "encoding_version": 0, "max_cells": 0, "version": 0, "secret": "secret" } } ``` ## Update details about a dataset **put** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings. ### Path Parameters - `account_id: string` - `dataset_id: string` ### Body Parameters - `case_sensitive: optional boolean` Determines if the words should be matched in a case-sensitive manner. Only required for custom word lists. - `description: optional string` The description of the dataset. - `name: optional string` The name of the dataset, must be unique. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{}' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Delete a dataset **delete** `/accounts/{account_id}/dlp/datasets/{dataset_id}` This deletes all versions of the dataset. ### Path Parameters - `account_id: string` - `dataset_id: string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` ## Domain Types ### Dataset - `Dataset { id, columns, created_at, 9 more }` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Dataset Array - `DatasetArray = array of Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Dataset Creation - `DatasetCreation { dataset, encoding_version, max_cells, 2 more }` - `dataset: Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. - `encoding_version: number` Encoding version to use for dataset. - `max_cells: number` - `version: number` The version to use when uploading the dataset. - `secret: optional string` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. # Upload ## Prepare to upload a new version of a dataset **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload` Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists. ### Path Parameters - `account_id: string` - `dataset_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional NewVersion` - `encoding_version: number` - `max_cells: number` - `version: number` - `case_sensitive: optional boolean` - `columns: optional array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID/upload \ -X POST \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "encoding_version": 0, "max_cells": 0, "version": 0, "case_sensitive": true, "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "secret": "secret" } } ``` ## Upload a new version of a dataset **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}` This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched. ### Path Parameters - `account_id: string` - `dataset_id: string` - `version: number` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Dataset` - `id: string` - `columns: array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: array of { num_cells, status, version }` - `num_cells: number` - `status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive: optional boolean` - `description: optional string` The description of the dataset. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID/upload/$VERSION \ -H 'Content-Type: application/octet-stream' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -F 'dataset=@/path/to/dataset' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Domain Types ### New Version - `NewVersion { encoding_version, max_cells, version, 3 more }` - `encoding_version: number` - `max_cells: number` - `version: number` - `case_sensitive: optional boolean` - `columns: optional array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret: optional string` # Versions ## Sets the column information for a multi-column upload **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. The columns in the response appear in the same order as in the request. ### Path Parameters - `account_id: string` - `dataset_id: string` - `version: number` ### Body Parameters - `body: array of { entry_id, header_name, num_cells } or { entry_name, header_name, num_cells }` - `ExistingColumn { entry_id, header_name, num_cells }` - `entry_id: string` - `header_name: optional string` - `num_cells: optional number` - `NewColumn { entry_name, header_name, num_cells }` - `entry_name: string` - `header_name: optional string` - `num_cells: optional number` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID/versions/$VERSION \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '[ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0 } ]' ``` #### 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": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ] } ``` ## Domain Types ### Version Create Response - `VersionCreateResponse { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Entries ## Upload a new version of a multi-column dataset **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}/entries/{entry_id}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. ### Path Parameters - `account_id: string` - `dataset_id: string` - `version: number` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/datasets/$DATASET_ID/versions/$VERSION/entries/$ENTRY_ID \ -H 'Content-Type: application/octet-stream' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -F 'dataset_version_entry=@/path/to/dataset_version_entry' ``` #### 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": { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } } ``` ## Domain Types ### Entry Create Response - `EntryCreateResponse { entry_id, header_name, num_cells, upload_status }` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Patterns ## Validate a DLP regex pattern **post** `/accounts/{account_id}/dlp/patterns/validate` Validates whether this pattern is a valid regular expression. Rejects it if the regular expression is too complex or can match an unbounded-length string. The regex will be rejected if it uses `*` or `+`. Bound the maximum number of characters that can be matched using a range, e.g. `{1,100}`. ### Path Parameters - `account_id: string` ### Body Parameters - `regex: string` - `max_match_bytes: optional number` Maximum number of bytes that the regular expression can match. If this is `null` then there is no limit on the length. Patterns can use `*` and `+`. Otherwise repeats should use a range `{m,n}` to restrict patterns to the length. If this field is missing, then a default length limit is used. Note that the length is specified in bytes. Since regular expressions use UTF-8 the pattern `.` can match up to 4 bytes. Hence `.{1,256}` has a maximum length of 1024 bytes. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { valid }` - `valid: boolean` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/patterns/validate \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "regex": "regex" }' ``` #### 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": { "valid": true } } ``` ## Domain Types ### Pattern Validate Response - `PatternValidateResponse { valid }` - `valid: boolean` # Payload Logs ## Get payload log settings **get** `/accounts/{account_id}/dlp/payload_log` Gets the current payload logging configuration for DLP, showing whether matched content is being logged. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { updated_at, masking_level, public_key }` - `updated_at: string` - `masking_level: optional "full" or "partial" or "clear" or "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: optional string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/payload_log \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Set payload log settings **put** `/accounts/{account_id}/dlp/payload_log` Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review. ### Path Parameters - `account_id: string` ### Body Parameters - `masking_level: optional "full" or "partial" or "clear" or "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: optional string` Base64-encoded public key for encrypting payload logs. - Set to null or empty string to disable payload logging. - Set to a non-empty base64 string to enable payload logging with the given key. For customers with configurable payload masking feature rolled out: - If the field is missing, the existing setting will be kept. Note that this is different from setting to null or empty string. For all other customers: - If the field is missing, the existing setting will be cleared. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { updated_at, masking_level, public_key }` - `updated_at: string` - `masking_level: optional "full" or "partial" or "clear" or "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: optional string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/payload_log \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{}' ``` #### 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": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Domain Types ### Payload Log Get Response - `PayloadLogGetResponse { updated_at, masking_level, public_key }` - `updated_at: string` - `masking_level: optional "full" or "partial" or "clear" or "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: optional string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Payload Log Update Response - `PayloadLogUpdateResponse { updated_at, masking_level, public_key }` - `updated_at: string` - `masking_level: optional "full" or "partial" or "clear" or "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: optional string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. # Email # Account Mapping ## Get mapping **get** `/accounts/{account_id}/dlp/email/account_mapping` Retrieves the email provider mapping configuration for DLP email scanning. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { addin_identifier_token, auth_requirements }` - `addin_identifier_token: string` - `auth_requirements: { allowed_microsoft_organizations, type } or { type }` - `{ allowed_microsoft_organizations, type }` - `allowed_microsoft_organizations: array of string` - `type: "Org"` - `"Org"` - `Type { type }` - `type: "NoAuth"` - `"NoAuth"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/account_mapping \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Create mapping **post** `/accounts/{account_id}/dlp/email/account_mapping` Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration. ### Path Parameters - `account_id: string` ### Body Parameters - `auth_requirements: { allowed_microsoft_organizations, type } or { type }` - `{ allowed_microsoft_organizations, type }` - `allowed_microsoft_organizations: array of string` - `type: "Org"` - `"Org"` - `Type { type }` - `type: "NoAuth"` - `"NoAuth"` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { addin_identifier_token, auth_requirements }` - `addin_identifier_token: string` - `auth_requirements: { allowed_microsoft_organizations, type } or { type }` - `{ allowed_microsoft_organizations, type }` - `allowed_microsoft_organizations: array of string` - `type: "Org"` - `"Org"` - `Type { type }` - `type: "NoAuth"` - `"NoAuth"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/account_mapping \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } }' ``` #### 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": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Domain Types ### Account Mapping Get Response - `AccountMappingGetResponse { addin_identifier_token, auth_requirements }` - `addin_identifier_token: string` - `auth_requirements: { allowed_microsoft_organizations, type } or { type }` - `{ allowed_microsoft_organizations, type }` - `allowed_microsoft_organizations: array of string` - `type: "Org"` - `"Org"` - `Type { type }` - `type: "NoAuth"` - `"NoAuth"` ### Account Mapping Create Response - `AccountMappingCreateResponse { addin_identifier_token, auth_requirements }` - `addin_identifier_token: string` - `auth_requirements: { allowed_microsoft_organizations, type } or { type }` - `{ allowed_microsoft_organizations, type }` - `allowed_microsoft_organizations: array of string` - `type: "Org"` - `"Org"` - `Type { type }` - `type: "NoAuth"` - `"NoAuth"` # Rules ## List all email scanner rules **get** `/accounts/{account_id}/dlp/email/rules` Lists all email scanner rules for an account. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Get an email scanner rule **get** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions. ### Path Parameters - `account_id: string` - `rule_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules/$RULE_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Create email scanner rule **post** `/accounts/{account_id}/dlp/email/rules` Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take. ### Path Parameters - `account_id: string` ### Body Parameters - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `enabled: boolean` - `name: string` - `description: optional string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "action": { "action": "Block" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "enabled": true, "name": "name" }' ``` #### 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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule **put** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Update email scanner rule ### Path Parameters - `account_id: string` - `rule_id: string` ### Body Parameters - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `enabled: boolean` - `name: string` - `description: optional string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules/$RULE_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "action": { "action": "Block" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "enabled": true, "name": "name" }' ``` #### 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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete email scanner rule **delete** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Removes a DLP email scanning rule. The rule will no longer be applied to email messages. ### Path Parameters - `account_id: string` - `rule_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules/$RULE_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule priorities **patch** `/accounts/{account_id}/dlp/email/rules` Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first. ### Path Parameters - `account_id: string` ### Body Parameters - `new_priorities: map[number]` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/email/rules \ -X PATCH \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "new_priorities": { "foo": 0 } }' ``` #### 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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Domain Types ### Rule List Response - `RuleListResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Rule Get Response - `RuleGetResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Rule Create Response - `RuleCreateResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Rule Update Response - `RuleUpdateResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Rule Delete Response - `RuleDeleteResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` ### Rule Bulk Edit Response - `RuleBulkEditResponse { action, conditions, created_at, 6 more }` - `action: { action, message }` - `action: "Block"` - `"Block"` - `message: optional string` - `conditions: array of { operator, selector, value }` Triggered if all conditions match. - `operator: "InList" or "NotInList" or "MatchRegex" or "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" or "Sender" or "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: array of string or string` - `array of string` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description: optional string` # Profiles ## List all profiles **get** `/accounts/{account_id}/dlp/profiles` Lists all DLP profiles in an account. ### Path Parameters - `account_id: string` ### Query Parameters - `all: optional boolean` Return all profiles, including those that current account does not have access to. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of Profile` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ] } ``` ## Get DLP Profile **get** `/accounts/{account_id}/dlp/profiles/{profile_id}` Fetches a DLP profile by ID. ### Path Parameters - `account_id: string` - `profile_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Profile` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/$PROFILE_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Domain Types ### Context Awareness - `ContextAwareness { enabled, skip }` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. ### Profile - `Profile = { id, allowed_match_count, created_at, 13 more } or { id, allowed_match_count, entries, 7 more } or { id, created_at, entries, 5 more }` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Skip Configuration - `SkipConfiguration { files }` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. # Custom ## Get custom profile **get** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Fetches a custom DLP profile by id. ### Path Parameters - `account_id: string` - `profile_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Profile` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/custom/$PROFILE_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Create custom profile **post** `/accounts/{account_id}/dlp/profiles/custom` Creates a DLP custom profile. ### Path Parameters - `account_id: string` ### Body Parameters - `name: string` - `ai_context_enabled: optional boolean` - `allowed_match_count: optional number` Related DLP policies will trigger when the match count exceeds the number set. - `confidence_threshold: optional string` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data class IDs to associate with the profile. - `data_tags: optional array of string` Data tag IDs to associate with the profile. - `description: optional string` The description of the profile. - `entries: optional array of { enabled, name, pattern, description } or { enabled, name, words }` - `DLPNewCustomEntry { enabled, name, pattern, description }` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `description: optional string` - `DLPNewWordListEntry { enabled, name, words }` - `enabled: boolean` - `name: string` - `words: array of string` - `ocr_enabled: optional boolean` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels to associate with the profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { enabled, entry_id }` Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). - `enabled: boolean` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Profile` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/custom \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "name": "name", "allowed_match_count": 5 }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Update custom profile **put** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Updates a DLP custom profile. ### Path Parameters - `account_id: string` - `profile_id: string` ### Body Parameters - `name: string` - `ai_context_enabled: optional boolean` - `allowed_match_count: optional number` - `confidence_threshold: optional string` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data class IDs to associate with the profile. If omitted, existing associations are unchanged. - `data_tags: optional array of string` Data tag IDs to associate with the profile. If omitted, existing associations are unchanged. - `description: optional string` The description of the profile. - `entries: optional array of { enabled, entry_id, name, 2 more } or { enabled, name, pattern, description }` Custom entries from this profile. If this field is omitted, entries owned by this profile will not be changed. - `DLPNewCustomEntryWithID { enabled, entry_id, name, 2 more }` - `enabled: boolean` - `entry_id: string` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `description: optional string` - `DLPNewCustomEntry { enabled, name, pattern, description }` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `description: optional string` - `ocr_enabled: optional boolean` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { enabled, entry_id }` Other entries, e.g. predefined or integration. - `enabled: boolean` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional Profile` - `CustomProfile { id, allowed_match_count, created_at, 13 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `PredefinedProfile { id, allowed_match_count, entries, 7 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile { id, created_at, entries, 5 more }` - `id: string` - `created_at: string` - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` - `shared_entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `type: "integration"` - `"integration"` - `updated_at: string` - `description: optional string` The description of the profile. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/custom/$PROFILE_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "name": "name" }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Delete custom profile **delete** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Deletes a DLP custom profile. ### Path Parameters - `account_id: string` - `profile_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/custom/$PROFILE_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Domain Types ### Custom Profile - `CustomProfile { id, allowed_match_count, created_at, 12 more }` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled: optional boolean` - `confidence_threshold: optional "low" or "medium" or "high" or "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: optional ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes: optional array of string` Data classes associated with this profile. - `data_tags: optional array of string` Data tags associated with this profile. - `description: optional string` The description of the profile. - `entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `sensitivity_levels: optional array of { group_id, level_id }` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries: optional array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` ### Pattern - `Pattern { regex, validation }` - `regex: string` - `validation: optional "luhn"` - `"luhn"` ### Custom Delete Response - `CustomDeleteResponse = unknown` # Predefined ## Get predefined profile config **get** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `get_predefined` but only returns entries that are enabled. This is needed for our terraform API Fetches a predefined DLP profile by id. ### Path Parameters - `account_id: string` - `profile_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string` - `enabled_entries: array of string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` This field has been deprecated for `enabled_entries`. - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `ai_context_enabled: optional boolean` - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/predefined/$PROFILE_ID/config \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Update predefined profile config **put** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `update_predefined` but only returns entries that are enabled. This is needed for our terraform API Updates a DLP predefined profile. Only supports enabling/disabling entries. ### Path Parameters - `account_id: string` - `profile_id: string` ### Body Parameters - `ai_context_enabled: optional boolean` - `allowed_match_count: optional number` - `confidence_threshold: optional string` - `enabled_entries: optional array of string` - `entries: optional array of { id, enabled }` - `id: string` - `enabled: boolean` - `ocr_enabled: optional boolean` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string` - `enabled_entries: array of string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` This field has been deprecated for `enabled_entries`. - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `ai_context_enabled: optional boolean` - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/predefined/$PROFILE_ID/config \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "allowed_match_count": 5 }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Delete predefined profile **delete** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}` This is a no-op as predefined profiles can't be deleted but is needed for our generated terraform API. ### Path Parameters - `account_id: string` - `profile_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/profiles/predefined/$PROFILE_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Domain Types ### Predefined Profile - `PredefinedProfile { id, allowed_match_count, confidence_threshold, 6 more }` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string` - `enabled_entries: array of string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: array of { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` This field has been deprecated for `enabled_entries`. - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `name: string` The name of the predefined profile. - `ai_context_enabled: optional boolean` - `ocr_enabled: optional boolean` - `open_access: optional boolean` Whether this profile can be accessed by anyone. ### Predefined Delete Response - `PredefinedDeleteResponse = unknown` # Limits ## Fetch limits associated with DLP for account **get** `/accounts/{account_id}/dlp/limits` Retrieves current DLP usage limits and quotas for the account, including dataset limits and scan quotas. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { max_dataset_cells }` - `max_dataset_cells: number` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/limits \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "max_dataset_cells": 0 } } ``` ## Domain Types ### Limit List Response - `LimitListResponse { max_dataset_cells }` - `max_dataset_cells: number` # Entries ## List all entries **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Get DLP Entry **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## Create custom entry **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Path Parameters - `account_id: string` ### Body Parameters - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `description: optional string` - `profile_id: optional string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true, "name": "name", "pattern": { "regex": "regex" } }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update entry **put** `/accounts/{account_id}/dlp/entries/{entry_id}` Updates a DLP entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Body Parameters - `body: { name, pattern, type, 2 more } or { type, enabled } or { type, enabled }` - `Custom { name, pattern, type, 2 more }` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `description: optional string` - `enabled: optional boolean` - `Predefined { type, enabled }` - `type: "predefined"` - `"predefined"` - `enabled: optional boolean` - `Integration { type, enabled }` - `type: "integration"` - `"integration"` - `enabled: optional boolean` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "name": "name", "pattern": { "regex": "regex" }, "type": "custom" }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Domain Types ### Entry List Response - `EntryListResponse = { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Get Response - `EntryGetResponse = { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Create Response - `EntryCreateResponse { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Entry Update Response - `EntryUpdateResponse = { id, created_at, enabled, 6 more } or { id, confidence, enabled, 4 more } or { id, created_at, enabled, 4 more } or 3 more` - `CustomEntry { id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `PredefinedEntry { id, confidence, enabled, 4 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `IntegrationEntry { id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `ExactDataEntry { id, case_sensitive, created_at, 5 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` ### Entry Delete Response - `EntryDeleteResponse = unknown` # Custom ## Create custom entry **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Path Parameters - `account_id: string` ### Body Parameters - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `description: optional string` - `profile_id: optional string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true, "name": "name", "pattern": { "regex": "regex" } }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update custom entry **put** `/accounts/{account_id}/dlp/entries/custom/{entry_id}` Updates a DLP custom entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Body Parameters - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `description: optional string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/custom/$ENTRY_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true, "name": "name", "pattern": { "regex": "regex" } }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Get DLP Entry **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Custom Create Response - `CustomCreateResponse { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Custom Update Response - `CustomUpdateResponse { id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` ### Custom Delete Response - `CustomDeleteResponse = unknown` ### Custom Get Response - `CustomGetResponse = { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Custom List Response - `CustomListResponse = { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Predefined ## Create predefined entry **post** `/accounts/{account_id}/dlp/entries/predefined` Predefined entries can't be created, this will update an existing predefined entry. This is needed for our generated terraform API. ### Path Parameters - `account_id: string` ### Body Parameters - `enabled: boolean` - `entry_id: string` - `profile_id: optional string` This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, confidence, enabled, 3 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/predefined \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true, "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Update predefined entry **put** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` Updates a DLP entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Body Parameters - `enabled: boolean` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, confidence, enabled, 3 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/predefined/$ENTRY_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Delete predefined entry **delete** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` This is a no-op as predefined entires can't be deleted but is needed for our generated terraform API. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/predefined/$ENTRY_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Get DLP Entry **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Predefined Create Response - `PredefinedCreateResponse { id, confidence, enabled, 3 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` ### Predefined Update Response - `PredefinedUpdateResponse { id, confidence, enabled, 3 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id: optional string` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` ### Predefined Delete Response - `PredefinedDeleteResponse = unknown` ### Predefined Get Response - `PredefinedGetResponse = { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Predefined List Response - `PredefinedListResponse = { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Integration ## Create integration entry **post** `/accounts/{account_id}/dlp/entries/integration` Integration entries can't be created, this will update an existing integration entry. This is needed for our generated terraform API. ### Path Parameters - `account_id: string` ### Body Parameters - `enabled: boolean` - `entry_id: string` - `profile_id: optional string` This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/integration \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true, "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update integration entry **put** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` Updates a DLP entry. ### Path Parameters - `account_id: string` - `entry_id: string` ### Body Parameters - `enabled: boolean` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id: optional string` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/integration/$ENTRY_ID \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "enabled": true }' ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete integration entry **delete** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` This is a no-op as integration entires can't be deleted but is needed for our generated terraform API. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional unknown` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/integration/$ENTRY_ID \ -X DELETE \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": {} } ``` ## Get DLP Entry **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Path Parameters - `account_id: string` - `entry_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries/$ENTRY_ID \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Path Parameters - `account_id: string` ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/entries \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### 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": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Integration Create Response - `IntegrationCreateResponse { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id: optional string` ### Integration Update Response - `IntegrationUpdateResponse { id, created_at, enabled, 3 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id: optional string` ### Integration Delete Response - `IntegrationDeleteResponse = unknown` ### Integration Get Response - `IntegrationGetResponse = { id, created_at, enabled, 8 more } or { id, confidence, enabled, 6 more } or { id, created_at, enabled, 6 more } or 3 more` - `{ id, created_at, enabled, 8 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 6 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 7 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `profiles: optional array of { id, name }` - `id: string` - `name: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Integration List Response - `IntegrationListResponse = { id, created_at, enabled, 7 more } or { id, confidence, enabled, 5 more } or { id, created_at, enabled, 5 more } or 3 more` - `{ id, created_at, enabled, 7 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation: optional "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description: optional string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, confidence, enabled, 5 more }` - `id: string` - `confidence: { ai_context_available, available }` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: optional { topic_type, type, description }` - `topic_type: "Intent" or "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description: optional string` - `{ id, created_at, enabled, 5 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, case_sensitive, created_at, 6 more }` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 4 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `{ id, created_at, enabled, 6 more }` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id: optional string` - `upload_status: optional "empty" or "uploading" or "pending" or 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"`