Skip to main content

investigate

Creates, updates, deletes, gets or lists an investigate resource.

Overview

Nameinvestigate
TypeResource
Idcloudflare.email_security.investigate

Fields

The following fields are returned by SELECT queries:

Email message details.

NameDatatypeDescription
idstringUnique identifier for a message retrieved from investigation (example: 4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678)
alert_idstring
message_idstring
postfix_idstringThe identifier of the message (example: 4Njp3P0STMz2c02Q)
from_namestring
to_namearray
action_logarrayDeprecated, use GET /investigate/{investigate_id}/action_log instead. End of life: November 1, 2026.
client_recipientsarray
delivery_modestring (DIRECT, BCC, JOURNAL, REVIEW_SUBMISSION, DMARC_UNVERIFIED, DMARC_FAILURE_REPORT, DMARC_AGGREGATE_REPORT, THREAT_INTEL_SUBMISSION, SIMULATION_SUBMISSION, API, RETRO_SCAN)
delivery_statusarray
detection_reasonsarray
edf_hashstring
envelope_fromstring
envelope_toarray
final_dispositionstring (MALICIOUS, MALICIOUS-BEC, SUSPICIOUS, SPOOF, SPAM, BULK, ENCRYPTED, EXTERNAL, UNKNOWN, NONE)
findingsarrayDeprecated, use the findings field from GET /investigate/{investigate_id}/detections instead. End of life: November 1, 2026. Detection findings for this message.
fromstring
htmltext_structure_hashstring
is_phish_submissionboolean
is_quarantinedboolean
post_delivery_operationsarrayPost-delivery operations performed on this message
postfix_id_outboundstring
propertiesobjectMessage processing properties
replytostring
scanned_atstring (date-time)When the message was scanned (UTC)
sent_atstring (date-time)When the message was sent (UTC)
sent_datestring
subjectstring
threat_categoriesarray
toarray
tsstringDeprecated, use scanned_at instead. End of life: November 1, 2026.
validationobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, investigate_idsubmissionRetrieves comprehensive details for a specific email message including headers, recipients, sender information, and current quarantine status. Use the investigate_id from search results to fetch detailed information.
listselectaccount_idstart, end, query, detections_only, action_log, final_disposition, metric, message_action, recipient, sender, alert_id, domain, message_id, subject, cursor, per_page, pageReturns information for each email that matches the search parameter(s).
releaseexecaccount_idReleases one or more quarantined messages, delivering them to the intended recipients. Use when a message was incorrectly quarantined. Returns delivery status for each recipient.
reclassifyexecaccount_id, investigate_id, expected_dispositionSubmits a request to reclassify an email's disposition. Use for reporting false positives or false negatives. Optionally provide the raw EML content for reanalysis. The reclassification is processed asynchronously.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
investigate_idstring
action_logbooleanWhether to include the message action log in the response.
alert_idstring
cursorstring
detections_onlybooleanWhether to include only detections in search results.
domainstringSender domains to filter by.
endstring (date-time)The end of the search date range. Defaults to now.
final_dispositionstringDispositions to filter by.
message_actionstringMessage actions to filter by.
message_idstring
metricstring
pageintegerDeprecated: Use cursor pagination instead. End of life: November 1, 2026.
per_pageintegerThe number of results per page. Maximum value is 1000.
querystringSpace-delimited search term. Case-insensitive.
recipientstring
senderstring
startstring (date-time)The beginning of the search date range. Defaults to now - 30 days.
subjectstring
submissionbooleanWhen true, search the submissions datastore only. When false or omitted, search the regular datastore only.

SELECT examples

Retrieves comprehensive details for a specific email message including headers, recipients, sender information, and current quarantine status. Use the investigate_id from search results to fetch detailed information.

SELECT
id,
alert_id,
message_id,
postfix_id,
from_name,
to_name,
action_log,
client_recipients,
delivery_mode,
delivery_status,
detection_reasons,
edf_hash,
envelope_from,
envelope_to,
final_disposition,
findings,
from,
htmltext_structure_hash,
is_phish_submission,
is_quarantined,
post_delivery_operations,
postfix_id_outbound,
properties,
replyto,
scanned_at,
sent_at,
sent_date,
subject,
threat_categories,
to,
ts,
validation
FROM cloudflare.email_security.investigate
WHERE account_id = '{{ account_id }}' -- required
AND investigate_id = '{{ investigate_id }}' -- required
AND submission = '{{ submission }}'
;

Lifecycle Methods

Releases one or more quarantined messages, delivering them to the intended recipients. Use when a message was incorrectly quarantined. Returns delivery status for each recipient.

EXEC cloudflare.email_security.investigate.release
@account_id='{{ account_id }}' --required
;