Skip to main content

preview

Creates, updates, deletes, gets or lists a preview resource.

Overview

Namepreview
TypeResource
Idcloudflare.email_security.preview

Fields

The following fields are returned by SELECT queries:

Email preview

NameDatatypeDescription
screenshotstringA base64 encoded PNG image of the email.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_id, investigate_idReturns a preview of the message body as a base64 encoded PNG image for non-benign messages.
createinsertaccount_id, postfix_idGenerates a preview image for a message that was not flagged as a detection. Useful for investigating benign messages. Returns a base64-encoded PNG screenshot of the email body.

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

SELECT examples

Returns a preview of the message body as a base64 encoded PNG image for non-benign messages.

SELECT
screenshot
FROM cloudflare.email_security.preview
WHERE account_id = '{{ account_id }}' -- required
AND investigate_id = '{{ investigate_id }}' -- required
;

INSERT examples

Generates a preview image for a message that was not flagged as a detection. Useful for investigating benign messages. Returns a base64-encoded PNG screenshot of the email body.

INSERT INTO cloudflare.email_security.preview (
postfix_id,
account_id
)
SELECT
'{{ postfix_id }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;