# Lettr — how to use (mcp.ai)

Connect your Lettr account and use 60 tools for transactional email straight from your AI agent. Connect with your own API key. Lettr is an email and messaging platform for transactional delivery, templates, audiences, campaigns, domains, and webhooks.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_lettr?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `lettr_attach_contacts_to_lists`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/lettr`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/lettr/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/lettr/attach/contacts/to/lists` — Attach every combination of 1-1000 contacts and 1-50 audience lists, processing up to 50,000 contact-list pairs and reporting new and existing memberships.
  - body: { list_ids: string[], contact_ids: string[] }
- `POST https://api.mcp.ai/api/lettr/bulk/create/audience/contacts` — Create or recognize up to 1000 normalized, deduplicated contacts. Shared properties affect only newly created contacts; list_id applies to all contacts, including those that already exist.
  - body: { emails: string[], list_id?: string, properties?: object }
- `POST https://api.mcp.ai/api/lettr/cancel/scheduled/email` — Cancel a scheduled email before its delivery time; cancellation is unavailable once processing has begun.
  - body: { transmission_id: string }
- `POST https://api.mcp.ai/api/lettr/create/audience/contact` — Create one audience contact with optional properties and list membership.
  - body: { email: string, list_id?: string, properties?: object }
- `POST https://api.mcp.ai/api/lettr/create/audience/contact/with/double/opt/in` — Create an unverified audience contact and irreversibly send an external confirmation email; the contact becomes subscribed only after confirming.
  - body: { email: string, list_id?: string, properties?: object, double_opt_in: object }
- `POST https://api.mcp.ai/api/lettr/create/audience/list` — Create a uniquely named audience list for grouping contacts.
  - body: { name: string }
- `POST https://api.mcp.ai/api/lettr/create/audience/property` — Define a custom contact property with an immutable name and value type. Changing either later requires deleting and recreating the property.
  - body: { name: string, property_type: string, fallback_value?: string }
- `POST https://api.mcp.ai/api/lettr/create/audience/segment` — Create a dynamic audience segment whose condition groups are ANDed while conditions inside each group are ORed.
  - body: { name: string, list_id?: string, conditions: object }
- `POST https://api.mcp.ai/api/lettr/create/audience/topic` — Create a public or private subscription topic with an immutable opt-in or opt-out default.
  - body: { name: string, visibility?: string, description?: string, default_subscription?: string }
- `POST https://api.mcp.ai/api/lettr/create/domain` — Register a sending domain and return the DNS configuration needed to verify it.
  - body: { domain: string }
- `POST https://api.mcp.ai/api/lettr/create/template` — Create and publish an email template from either custom HTML or Topol editor JSON, extracting its merge tags.
  - body: { html?: string, name: string, folder_id?: integer, project_id?: integer, editor_json?: string }
- `POST https://api.mcp.ai/api/lettr/create/webhook` — Create an active event webhook using no authentication, HTTP Basic credentials, or OAuth 2 client credentials.
  - body: { url: string, name: string, events?: string[], auth_type: string, events_mode: string, auth_password?: string, auth_username?: string, oauth_client_id?: string, oauth_token_url?: string, oauth_client_secret?: string }
- `POST https://api.mcp.ai/api/lettr/delete/audience/contact` — Permanently delete one audience contact and its associated memberships.
  - body: { contact_id: string }
- `POST https://api.mcp.ai/api/lettr/delete/audience/lists` — Permanently delete between 1 and 50 audience lists in one request.
  - body: { list_ids: string[] }
- `POST https://api.mcp.ai/api/lettr/delete/audience/property` — Permanently delete a custom contact-property definition.
  - body: { property_id: string }
- `POST https://api.mcp.ai/api/lettr/delete/audience/segment` — Permanently delete one dynamic audience segment.
  - body: { segment_id: string }
- `POST https://api.mcp.ai/api/lettr/delete/audience/topic` — Permanently delete one audience subscription topic.
  - body: { topic_id: string }
- `POST https://api.mcp.ai/api/lettr/delete/domain` — Permanently remove a sending domain from Lettr and SparkPost so it can no longer send email.
  - body: { domain: string }
- `POST https://api.mcp.ai/api/lettr/delete/template` — Permanently delete an email template and all of its versions.
  - body: { project_id?: integer, template_slug: string }
- `POST https://api.mcp.ai/api/lettr/delete/webhook` — Permanently remove a webhook so Lettr stops delivering events to it.
  - body: { webhook_id: string }
- `POST https://api.mcp.ai/api/lettr/detach/contacts/from/lists` — Detach every combination of 1-1000 contacts and 1-50 audience lists, reporting removed and absent memberships.
  - body: { list_ids: string[], contact_ids: string[] }
- `POST https://api.mcp.ai/api/lettr/get/audience/contact` — Retrieve one contact's email, status, custom properties, list memberships, and topic subscriptions by ID.
  - body: { contact_id: string }
- `POST https://api.mcp.ai/api/lettr/get/audience/list` — Retrieve one audience list and its current contact count by ID.
  - body: { list_id: string }
- `POST https://api.mcp.ai/api/lettr/get/audience/property` — Retrieve one custom contact-property definition and its fallback value.
  - body: { property_id: string }
- `POST https://api.mcp.ai/api/lettr/get/audience/segment` — Retrieve one dynamic segment's list restriction, complete AND-of-OR condition definition, and cached contact count.
  - body: { segment_id: string }
- `POST https://api.mcp.ai/api/lettr/get/audience/topic` — Retrieve one subscription topic's defaults, visibility, and current contact count.
  - body: { topic_id: string }
- `POST https://api.mcp.ai/api/lettr/get/campaign` — Retrieve one campaign's name, subject, sender and reply-to configuration, schedule, rendered HTML, lifecycle state, recipient counts, and engagement statistics. The campaign's audience definition is n
  - body: { campaign_id: string }
- `POST https://api.mcp.ai/api/lettr/get/domain` — Retrieve one sending domain's send readiness, DNS records, provider detection, and verification status.
  - body: { domain: string }
- `POST https://api.mcp.ai/api/lettr/get/email` — Retrieve a sent email's delivery state, recipients, schedule metadata, and events by request ID. The configurable event date range defaults to the last 10 days, not the email's complete event history.
  - body: { to_date?: string, from_date?: string, request_id: string }
- `POST https://api.mcp.ai/api/lettr/get/scheduled/email` — Retrieve a scheduled email's current state and events by transmission ID, including after it has been processed.
  - body: { transmission_id: string }
- `POST https://api.mcp.ai/api/lettr/get/template` — Retrieve an email template's metadata, active HTML or editor JSON content, and version counts by slug.
  - body: { project_id?: integer, template_slug: string }
- `POST https://api.mcp.ai/api/lettr/get/template/merge/tags` — Return required and optional merge tags for a template's active or specified version before sending with substitution data.
  - body: { version?: integer, project_id?: integer, template_slug: string }
- `POST https://api.mcp.ai/api/lettr/get/webhook` — Retrieve one webhook's target, enabled state, event selection, authentication mode, and latest delivery status.
  - body: { webhook_id: string }
- `POST https://api.mcp.ai/api/lettr/list/audience/contacts` — Return one cursor-controlled page of contacts, optionally filtered by search text, status, list, or segment.
  - body: { cursor?: string, search?: string, status?: string, list_id?: string, per_page?: integer, segment_id?: string }
- `POST https://api.mcp.ai/api/lettr/list/audience/lists` — Return one cursor-controlled page of audience lists with each list's contact count.
  - body: { cursor?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/audience/properties` — Return one cursor-controlled page of custom contact-property definitions and fallback values.
  - body: { cursor?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/audience/segments` — Return one cursor-controlled page of dynamic audience segments, including their complete AND-of-OR condition definitions, optionally filtered by list.
  - body: { cursor?: string, list_id?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/audience/topics` — Return one cursor-controlled page of subscription topics with defaults, visibility, and contact counts.
  - body: { cursor?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/campaign/events` — Return one cursor-controlled page of a campaign's delivery and engagement events, with event, recipient, and time filters. An empty items page can still have a next_cursor; continue until next_cursor 
  - body: { email?: string, limit?: integer, cursor?: string, end_date?: string, event_type?: string, start_date?: string, campaign_id: string }
- `POST https://api.mcp.ai/api/lettr/list/campaigns` — Return one cursor-controlled page of campaigns with complete delivery and engagement statistics, optionally filtered by lifecycle status.
  - body: { cursor?: string, status?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/domains` — Return all sending domains with approval, DNS verification, and send-readiness status.
- `POST https://api.mcp.ai/api/lettr/list/email/events` — Return one cursor-controlled page of delivery and engagement events across sent emails, with event, recipient, transmission, bounce, and date filters.
  - body: { cursor?: string, to_date?: string, per_page?: integer, from_date?: string, recipients?: string[], event_types?: string[], bounce_classes?: integer[], transmission_id?: string }
- `POST https://api.mcp.ai/api/lettr/list/emails` — Return one cursor-controlled page of sent emails, optionally filtered by recipient and date range.
  - body: { cursor?: string, to_date?: string, per_page?: integer, from_date?: string, recipient?: string }
- `POST https://api.mcp.ai/api/lettr/list/projects` — Return one cursor-controlled page of Lettr projects and their IDs for use with template operations.
  - body: { cursor?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/lettr/list/templates` — Return one cursor-controlled page of email templates for a project or the team's default project.
  - body: { cursor?: string, per_page?: integer, project_id?: integer }
- `POST https://api.mcp.ai/api/lettr/list/webhooks` — Return all event webhooks with target, enabled state, event selection, authentication mode, and latest delivery status.
- `POST https://api.mcp.ai/api/lettr/publish/template/version` — Create and activate a new version of an existing email template from exactly one of HTML or Topol editor JSON, optionally renaming the template atomically.
  - body: { html?: string, name?: string, project_id?: integer, editor_json?: string, template_slug: string }
- `POST https://api.mcp.ai/api/lettr/schedule/campaign` — Schedule a campaign for future delivery or reschedule it. The campaign dispatches automatically at that time unless it is unscheduled first.
  - body: { campaign_id: string, scheduled_at: string }
- `POST https://api.mcp.ai/api/lettr/schedule/email` — Create a transactional email scheduled 5 minutes to 3 days in the future; it remains cancellable until processed.
  - body: { cc?: string[], to: string[], bcc?: string[], tag?: string, html?: string, text?: string, headers?: object, options?: object, subject?: string, amp_html?: string, metadata?: object, reply_to?: string, from_name?: string, from_email: string, project_id?: integer, attachments?: object[], scheduled_at: string, reply_to_name?: string, template_slug?: string, template_version?: integer, substitution_data?: object }
- `POST https://api.mcp.ai/api/lettr/send/campaign` — Immediately and irreversibly start sending a sendable draft campaign to its resolved audience. Only call after confirming the campaign's audience, subject, sender email, and content. A successful 202 
  - body: { campaign_id: string }
- `POST https://api.mcp.ai/api/lettr/send/email` — Immediately queue a transactional email to up to 50 recipients using inline content or a Lettr template. This is an irreversible external send.
  - body: { cc?: string[], to: string[], bcc?: string[], tag?: string, html?: string, text?: string, headers?: object, options?: object, subject?: string, amp_html?: string, metadata?: object, reply_to?: string, from_name?: string, from_email: string, project_id?: integer, attachments?: object[], reply_to_name?: string, template_slug?: string, template_version?: integer, substitution_data?: object }
- `POST https://api.mcp.ai/api/lettr/unschedule/campaign` — Cancel a scheduled campaign send and return the campaign to draft. The campaign must still be scheduled; this cannot stop one already preparing or sending.
  - body: { campaign_id: string }
- `POST https://api.mcp.ai/api/lettr/update/audience/contact` — Change a contact's email, subscribed or unsubscribed status, or selected custom property values. Provide at least one of email, status, or properties; a null value inside properties removes that prope
  - body: { email?: string, status?: string, contact_id: string, properties?: object }
- `POST https://api.mcp.ai/api/lettr/update/audience/list` — Rename an audience list while preserving its contacts.
  - body: { name: string, list_id: string }
- `POST https://api.mcp.ai/api/lettr/update/audience/property` — Set or clear a custom contact property's fallback value. Its name and data type cannot be changed.
  - body: { property_id: string, fallback_value: string }
- `POST https://api.mcp.ai/api/lettr/update/audience/segment` — Change a dynamic segment's name, optional audience-list restriction, or complete AND-of-OR condition definition. Provide at least one of these mutable fields; setting list_id to null removes the list 
  - body: { name?: string, list_id?: string, conditions?: object, segment_id: string }
- `POST https://api.mcp.ai/api/lettr/update/audience/topic` — Change a subscription topic's name, description, or public/private visibility. Provide at least one of these mutable fields; setting description to null clears it. Its default subscription behavior ca
  - body: { name?: string, topic_id: string, visibility?: string, description?: string }
- `POST https://api.mcp.ai/api/lettr/update/template` — Rename an email template's metadata without publishing a new version.
  - body: { name: string, project_id?: integer, template_slug: string }
- `POST https://api.mcp.ai/api/lettr/update/webhook` — Partially update a webhook's name, callback URL, authentication, selected events, or active state. Provide at least one field to update.
  - body: { url?: string, name?: string, active?: boolean, events?: string[], auth_type?: string, webhook_id: string, auth_password?: string, auth_username?: string, oauth_client_id?: string, oauth_token_url?: string, oauth_client_secret?: string }
- `POST https://api.mcp.ai/api/lettr/verify/domain` — Run Lettr's DNS verification for a registered domain and return DKIM, CNAME, DMARC, SPF, and ownership results.
  - body: { domain: string }

## Example prompts
- "What can I do in Lettr?"
- "Show me a summary of my Lettr account"

## More
- Page: https://mcp.ai/lettr
- Agent spec (llms.txt): https://mcp.ai/lettr/llms.txt
- Postman collection: https://mcp.ai/lettr/postman.json
