Dashboard
How it Works Documentation Quick Start PAPI — Pages & Assets MAPI — Dynamic Data Integrations SAPI — Sessions & Forms MCP Server OpenClaw Skill Tools Deploy Dashboard

Email Archive

⚡ Built-in — Platform Built-in

Autonomous, searchable email archives. Create archives and link mailboxes (local or external) to them as context sources, then search across the archived mail.

⚡ Built-in — No Setup Required This integration is built into the WebsitePublisher platform. All endpoints are available immediately — no API key needed.

Endpoints (21)

POST create-archive

Create a new autonomous email archive owned by an email address.

Field Type Required Description
name string ✓ Yes Human-friendly archive name (e.g. "M25 mail").
owner_email string ✓ Yes Owner email address.
description string No Optional description of what this archive holds.
GET list-archives

List archives with their source counts. Optionally filter by owner email.

Field Type Required Description
owner_email string No Filter archives by owner email.
POST deactivate-archive

Deactivate an archive. Stops syncing into it; archived messages are preserved.

Field Type Required Description
archive_id integer ✓ Yes Archive ID to deactivate.
POST register-external-source

Register an external mail source (Gmail, Outlook, custom IMAP) for archiving. Credentials are stored encrypted. Link it to an archive separately with link-source.

Field Type Required Description
email string ✓ Yes Mailbox email address.
imap_host string ✓ Yes IMAP server hostname (e.g. "imap.gmail.com").
imap_port integer No IMAP port (default 993 for SSL).
encryption string No none, ssl, or starttls (default ssl).
auth_method string No password or oauth (default password).
credential string ✓ Yes Password or OAuth token — stored encrypted.
folders array No Folders to sync. Leave empty to auto-discover all folders via IMAP LIST.
GET list-sources

List all archive sources (mailboxes), or the sources linked to a specific archive. Never returns credentials.

Field Type Required Description
archive_id integer No If given, list only sources linked to this archive.
GET get-message

Fetch one archived message in full (incl. body) by its archive doc id or message_id. Scoped to the given archive.

Field Type Required Description
archive_id integer ✓ Yes Archive the message belongs to (tenant scope).
id integer No Archive doc id (from a search result). Either id or message_id is required.
message_id string No RFC Message-ID. Either id or message_id is required.
GET get-thread

Fetch all messages in a thread (by thread_id) within one archive, ordered chronologically. Metadata only — use get-message for a body.

Field Type Required Description
archive_id integer ✓ Yes Archive the thread belongs to (tenant scope).
thread_id string ✓ Yes Thread identifier (from a search/message result).
GET get-stats

Aggregate statistics for one archive: message count, total size, attachment count, indexed count, date range, and per-folder counts.

Field Type Required Description
archive_id integer ✓ Yes Archive to report on (tenant scope).
GET context-feed

LLM-ready feed for one context: rolling summary plus pinned and recent raw messages within the token cap.

Field Type Required Description
archive_id integer ✓ Yes Archive the context belongs to (tenant scope).
context_id integer ✓ Yes Context to feed.
POST context-compress

Fold the oldest non-pinned messages of a context into its rolling summary. Normally triggered automatically when the context exceeds its compression threshold.

Field Type Required Description
archive_id integer ✓ Yes Archive the context belongs to (tenant scope).
context_id integer ✓ Yes Context to compress.
force integer No 1 = compress even below the threshold.
POST context-create

Create a context in an archive (find-or-create on name). Seeds members by keyword match. Pass keywords as an array or CSV string (required, handler-validated). Optional: filters object.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
name string ✓ Yes Context name (max 190).
query string No Original search query (informational).
parent_id integer No Parent context for sub-contexts.
GET context-list

List all contexts of an archive with member counts and staleness.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
GET context-get

Fetch one context incl. rolling summary and resolved config (context → archive → platform cascade).

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
context_id integer ✓ Yes Context id.
POST context-update

Update context fields (name, query, parent_id, token_cap, compress_threshold, auto_pull, embed_strategy). keywords (array/CSV) triggers a re-seed; filters object replaces filters. Handler-validated.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
context_id integer ✓ Yes Context id.
name string No New name (max 190).
query string No New query.
parent_id integer No New parent (null to detach).
token_cap integer No Override token cap (null = inherit).
compress_threshold integer No Override threshold %% (null = inherit).
auto_pull integer No 1/0 override (null = inherit).
embed_strategy string No lazy or eager (null = inherit).
POST context-delete

Delete a context (members removed, messages preserved). Fails 409 if it has sub-contexts.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
context_id integer ✓ Yes Context id.
GET context-match

Match a search query against existing contexts of an archive (lexical scoring). Use before context-create for find-or-create flows.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
query string ✓ Yes Search query to match.
GET context-members

List context members (pinned first, relevance-ordered).

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
context_id integer ✓ Yes Context id.
limit integer No Default 50.
offset integer No Default 0.
include_excluded integer No 1 = include excluded members.
POST context-member-update

Manage one membership: add, remove, pin, unpin, exclude (stay out despite matches), include.

Field Type Required Description
archive_id integer ✓ Yes Archive (tenant scope).
context_id integer ✓ Yes Context id.
message_id integer ✓ Yes Message row id.
action string ✓ Yes add | remove | pin | unpin | exclude | include.

MCP Tool Names

When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:

EndpointMCP Tool Name
create-archive email_archive_create_archive
list-archives email_archive_list_archives
deactivate-archive email_archive_deactivate_archive
register-external-source email_archive_register_external_source
list-sources email_archive_list_sources
link-source email_archive_link_source
unlink-source email_archive_unlink_source
search email_archive_search
get-message email_archive_get_message
get-thread email_archive_get_thread
get-stats email_archive_get_stats
context-feed email_archive_context_feed
context-compress email_archive_context_compress
context-create email_archive_context_create
context-list email_archive_context_list
context-get email_archive_context_get
context-update email_archive_context_update
context-delete email_archive_context_delete
context-match email_archive_context_match
context-members email_archive_context_members
context-member-update email_archive_context_member_update
← Back to all integrations