Skip to main content
POST
Create a mail filter or automation

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The caller must have a connected mailbox and the match must name at least one address, domain or subject word.

space_id
string
required
folder
string
required

The folder or its parent must exist

kind
enum<string>
default:filter
Available options:
filter,
automation
name
string

Required for an automation

Maximum string length: 120
run_on_import
boolean
addresses
string[]
domains
string[]
subjects
string[]
attachments
boolean
then
object

An automation's action, run once per message it files.

backfill_since
string

Start a history import from this date. At most 90 days back.

backfill_expected
integer

The matching count the preview showed, for progress

Response

Created

A mail filter or an automation. Matching messages from the owner's mailbox are saved into folder as .eml files, and an automation then runs its action on each.

id
string
kind
enum<string>

A record with no kind is a filter

Available options:
filter,
automation
name
string

Automations only

space_id
string
folder
string

Space-relative dot path the files land in

entity_type
string
entity_folder
string

Contact or organisation folder the filter was set up from

addresses
string[]
domains
string[]
subjects
string[]

Subject words to match

attachments
boolean

Also save attachments beside the copy

then
object

An automation's action, run once per message it files.

run_on_import
boolean

Whether the action also runs for imported history. Off by default.

mailbox_user_id
string
mailbox_display_name
string
created_by
string
state
enum<string>
Available options:
active,
paused,
removed
stopped
object

Why a filter paused by itself

backfill
object

History import progress

last_filed_at
string<date-time>
filed_count
integer
created_at
string<date-time>
updated_at
string<date-time>