https://api.us.nylas.com/v3/grants/{grant_id}/messages/cleanClean messages
Removes extra information from structured messages.
Note: Nylas removes all extra information, such as HTML script and style tags, regardless
of the configuration.
You can use the cleaned text to train AI and machine learning models with email data, pass email content to a large language model (LLM), or trigger automations.
Nylas cleans messages when you make the request, and doesn't cache or store the cleaned text. Nylas doesn't use your messages or the cleaned text to train models.
Works with an API key, an access token (use /v3/grants/me/ in place of the grant ID), or an IAM API key with the messages.clean permission.
Path parameters
Query parameters
Specify fields that you want Nylas to return, as a comma-separated list (for example,
select=id,updated_at). This allows you to receive only the portion of object data that you're
interested in. You can use select to optimize response size and reduce latency by limiting queries
to only the information that you need.
images_as_markdownIf true, converts images in the message to
Markdown. Can't be false when html_as_markdown
is true.
For Agent Accounts, the default is false. Set images_as_markdown to true when you
set html_as_markdown to true for an Agent Account.
html_as_markdownThis property is in beta. If true, converts the message to
Markdown. Can't be true when
images_as_markdown is false.