Try for Free

To The Top

{ "openapi": "3.0.4", "info": { "title": "Elastic Email MCP Server", "description": "OpenAPI style documentation describing Elastic Email MCP tools", "version": "v1" }, "servers": [ { "url": "https://mcp.elasticemail.com" } ], "paths": { "/CreateCampaign": { "post": { "tags": [ "Campaign management" ], "description": "Creates and sends a new campaign. By default, the campaign status is set to active, and the campaign is sent immediately upon creation. To delay sending, set the status to Paused. You can also create a Draft campaign and finish the creation process later. Returns the created campaign.", "operationId": "create_campaign", "requestBody": { "content": { "application/json": { "schema": { "required": [ "campaignData" ], "type": "object", "properties": { "campaignData": { "type": "object", "description": "Campaign to create. Requires a name, at least one list or segment in recipients, and at least one content entry with from and subject." } } } } } }, "responses": { } } }, "/DeleteCampaign": { "post": { "tags": [ "Campaign management" ], "description": "Delete a campaign.", "operationId": "delete_campaign", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of the campaign to delete. Use ListCampaigns to look one up." } } } } } }, "responses": { } } }, "/ListCampaigns": { "post": { "tags": [ "Campaign management" ], "description": "List existing campaigns", "operationId": "list_campaigns", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/GetCampaign": { "post": { "tags": [ "Campaign management" ], "description": "Get existing campaign", "operationId": "get_campaign", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of an existing campaign. Use ListCampaigns to look one up." } } } } } }, "responses": { } } }, "/PauseCampaign": { "post": { "tags": [ "Campaign management" ], "description": "Pause a campaign that is currently sending. A Draft cannot be paused - the API cancels it instead, permanently, so this tool refuses that rather than doing it. Only Active or Sending campaigns can be paused.", "operationId": "pause_campaign", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of the campaign to pause." } } } } } }, "responses": { } } }, "/UpdateCampaign": { "post": { "tags": [ "Campaign management" ], "description": "Update an existing campaign. The campaign is identified by campaignData.name, so this cannot rename a campaign. A cancelled or completed campaign can no longer be updated. Returns the updated campaign.", "operationId": "update_campaign", "requestBody": { "content": { "application/json": { "schema": { "required": [ "campaignData" ], "type": "object", "properties": { "campaignData": { "type": "object", "description": "Full campaign to write. 'name' selects which campaign is updated and must match an existing one." } } } } } }, "responses": { } } }, "/GetCampaignStatistics": { "post": { "tags": [ "Statistics" ], "description": "Get campaign selected by name statistics", "operationId": "get_campaign_statistics", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of an existing campaign." } } } } } }, "responses": { } } }, "/GetAllCampaignStatistics": { "post": { "tags": [ "Statistics" ], "description": "Get all campaigns statistics", "operationId": "get_all_campaign_statistics", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/FetchContacts": { "post": { "tags": [ "Contacts management" ], "description": "Fetch existing contacts. By default get 20 contacts but number may be changed.", "operationId": "fetch_contacts", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "limit": { "type": "integer", "description": "How many contacts to return. Defaults to 20.", "format": "int32" } } } } } }, "responses": { } } }, "/FetchContactHistory": { "post": { "tags": [ "Statistics" ], "description": "Get contact history by email address", "operationId": "fetch_contact_history", "requestBody": { "content": { "application/json": { "schema": { "required": [ "email" ], "type": "object", "properties": { "email": { "type": "string", "description": "Email address to search by" } } } } } }, "responses": { } } }, "/FetchLists": { "post": { "tags": [ "Contacts management" ], "description": "Fetch existing lists", "operationId": "fetch_lists", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/FetchList": { "post": { "tags": [ "Contacts management" ], "description": "Get list by name", "operationId": "fetch_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Exact name of the list. Use FetchLists to look one up." } } } } } }, "responses": { } } }, "/FetchListContacts": { "post": { "tags": [ "Contacts management" ], "description": "Get contacts from list by list name", "operationId": "fetch_list_contacts", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Exact name of the list. Use FetchLists to look one up." } } } } } }, "responses": { } } }, "/AddContactsToList": { "post": { "tags": [ "Contacts management" ], "description": "Add contacts to existing list", "operationId": "add_contacts_to_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName", "emails" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Exact name of an existing list. Use FetchLists to look one up, or CreateList to make one." }, "emails": { "type": "object", "description": "Email addresses to add to the list." } } } } } }, "responses": { } } }, "/RemoveContactsFromList": { "post": { "tags": [ "Contacts management" ], "description": "Remove contacts from existing list. Provide exactly one of contacts or rule - never both, never neither.", "operationId": "remove_contacts_from_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Exact name of the list to remove contacts from. Use FetchLists to look one up." }, "contacts": { "type": "object", "description": "Email addresses to remove. Leave out when using rule." }, "rule": { "type": "string", "description": "SQL-like rule selecting the contacts to remove, or 'All' for every contact on the list. Leave out when using contacts." } } } } } }, "responses": { } } }, "/CreateList": { "post": { "tags": [ "Contacts management" ], "description": "Create new list with provided contacts", "operationId": "create_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName", "emails" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Name for the new list." }, "emails": { "type": "object", "description": "Email addresses of existing contacts to put on the list. Pass an empty array to create an empty list." } } } } } }, "responses": { } } }, "/DeleteList": { "post": { "tags": [ "Contacts management" ], "description": "Delete a list. The contacts on it are not deleted, only the list itself. Use DeleteContacts to remove contacts.", "operationId": "delete_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "listName" ], "type": "object", "properties": { "listName": { "type": "string", "description": "Exact name of the list to delete. Use FetchLists to look one up." } } } } } }, "responses": { } } }, "/AddContact": { "post": { "tags": [ "Contacts management" ], "description": "Add new simple contact. Returns the created contact.", "operationId": "add_contact", "requestBody": { "content": { "application/json": { "schema": { "required": [ "email" ], "type": "object", "properties": { "email": { "type": "string", "description": "Email address of the contact to add." }, "firstName": { "type": "string", "description": "Optional first name." }, "lastName": { "type": "string", "description": "Optional last name." } } } } } }, "responses": { } } }, "/DeleteContacts": { "post": { "tags": [ "Contacts management" ], "description": "Delete contacts from the Account. Provide exactly one of contacts or rule - never both, never neither.", "operationId": "delete_contacts", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "contacts": { "type": "object", "description": "Email addresses to delete. Leave out when using rule." }, "rule": { "type": "string", "description": "SQL-like rule selecting the contacts to delete, or 'All' for every contact. Leave out when using contacts." } } } } } }, "responses": { } } }, "/UploadContacts": { "post": { "tags": [ "Contacts management" ], "description": "Uploads/import contacts from a file. The list named by listName is created if it does not exist; leave listName out to import the contacts without adding them to any list.", "operationId": "upload_contacts", "requestBody": { "content": { "application/json": { "schema": { "required": [ "fileName", "base64Content" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name including its extension, e.g. contacts.csv. The extension selects the content type (.csv, .txt, .json, .zip)." }, "base64Content": { "type": "string", "description": "The file's bytes, base64 encoded. For CSV, the first row is a header - an 'Email' column is required." }, "listName": { "type": "string", "description": "List to import the contacts into, created if missing. Leave out to import without adding to a list." } } } } } }, "responses": { } } }, "/GetDomains": { "post": { "tags": [ "Domain management" ], "description": "List of all domains configured for this Account.", "operationId": "get_domains", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/GetDomain": { "post": { "tags": [ "Domain management" ], "description": "Retrieve a domain configured for this Account by name.", "operationId": "get_domain", "requestBody": { "content": { "application/json": { "schema": { "required": [ "domain" ], "type": "object", "properties": { "domain": { "type": "string", "description": "Name of the domain, e.g. yourdomain.com. Use GetDomains to list them." } } } } } }, "responses": { } } }, "/AddDomain": { "post": { "tags": [ "Domain management" ], "description": "Add new domain to Account. Returns the created domain record - the Spf/Dkim/MX/DMARC verification flags, the tracking Type, and DKIMRecord (HostName and RecordValue) when Elastic Email holds the DKIM key for this domain; DKIMRecord is null when it does not. The domain is not usable yet: the required DNS records have to be published in the domain's DNS zone first, and only then does VerifyDomain succeed.", "operationId": "add_domain", "requestBody": { "content": { "application/json": { "schema": { "required": [ "payload" ], "type": "object", "properties": { "payload": { "type": "object", "description": "The domain to add, and whether it should become the default sending domain." } } } } } }, "responses": { } } }, "/SetDomainAsDefault": { "post": { "tags": [ "Domain management" ], "description": "Set the Account's default sender address. This takes a full email address at a verified domain, for example sender@yourdomain.com - passing a bare domain name is rejected. Returns the updated domain record.", "operationId": "set_domain_as_default", "requestBody": { "content": { "application/json": { "schema": { "required": [ "email" ], "type": "object", "properties": { "email": { "type": "string", "description": "Email address to become the default sender, e.g. sender@yourdomain.com. Its domain must already be verified on this Account - use GetDomains to list them." } } } } } }, "responses": { } } }, "/DeleteDomain": { "post": { "tags": [ "Domain management" ], "description": "Deletes configured domain from Account.", "operationId": "delete_domain", "requestBody": { "content": { "application/json": { "schema": { "required": [ "domain" ], "type": "object", "properties": { "domain": { "type": "string", "description": "Name of the domain to delete, e.g. yourdomain.com. Use GetDomains to list them." } } } } } }, "responses": { } } }, "/VerifyDomain": { "post": { "tags": [ "Domain management" ], "description": "Verifies that required DNS records exist for specified domain. Run this only after the records returned by AddDomain have been published in the domain's DNS zone; until they resolve, verification keeps reporting the records as missing.", "operationId": "verify_domain", "requestBody": { "content": { "application/json": { "schema": { "required": [ "domain" ], "type": "object", "properties": { "domain": { "type": "string", "description": "Name of the domain to verify, e.g. yourdomain.com. Use GetDomains to list them." }, "trackingType": { "type": "object", "description": "Protocol to verify link tracking against. Http means unencrypted tracking links; the Https variants require a certificate." } } } } } }, "responses": { } } }, "/GetSentEmails": { "post": { "tags": [ "Emails sending" ], "description": "Get sent emails. The from/to range is interpreted in UTC.", "operationId": "get_sent_emails", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "from": { "type": "object", "description": "Start of the range, inclusive. Converted to UTC before the query is made." }, "to": { "type": "object", "description": "End of the range, inclusive. Converted to UTC before the query is made." } } } } } }, "responses": { } } }, "/ViewEmail": { "post": { "tags": [ "Emails sending" ], "description": "View email (including its body) by Msg ID", "operationId": "view_email", "requestBody": { "content": { "application/json": { "schema": { "required": [ "msgId" ], "type": "object", "properties": { "msgId": { "type": "string", "description": "Msg ID, as returned by SendTransactionalEmail or GetSentEmails." } } } } } }, "responses": { } } }, "/GetSentEmailsByTransactionID": { "post": { "tags": [ "Emails sending" ], "description": "Get sent emails by transaction ID", "operationId": "get_sent_emails_by_transaction_id", "requestBody": { "content": { "application/json": { "schema": { "required": [ "transactionId" ], "type": "object", "properties": { "transactionId": { "type": "string", "description": "Transaction ID that was returned when the email was sent." } } } } } }, "responses": { } } }, "/SendBulkEmails": { "post": { "tags": [ "Emails sending" ], "description": "Send bulk emails", "operationId": "send_bulk_emails", "requestBody": { "content": { "application/json": { "schema": { "required": [ "emailData" ], "type": "object", "properties": { "emailData": { "type": "object", "description": "Input email data: content, recipients list, subject. Use CC list only if user requires it." } } } } } }, "responses": { } } }, "/SendTransactionalEmail": { "post": { "tags": [ "Emails sending" ], "description": "Send transactional email.\n Avoid putting all contacts in To field, rather send them separately.\n Use template if you want to send email with dynamic content.\n With more than one recipient this asks whether to split the send into one email per recipient;\n if the client does not support elicitation it sends a single email addressed to all of them.", "operationId": "send_transactional_email", "requestBody": { "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "object", "description": "Input email data: content, recipients list, subject.\n Use CC field only if user requires it. Avoid putting all contacts in To or CC fields.\n Use template if you want to send email with dynamic content." } } } } } }, "responses": { } } }, "/IsReady": { "post": { "tags": [ "MCP Tools" ], "description": "Check readiness and connectivity with MCP server and API", "operationId": "is_ready", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/CreateSegment": { "post": { "tags": [ "Contacts management" ], "description": "Create new segment. The rule is an SQL-like expression over contact fields; see https://help.elasticemail.com/en/articles/5162182-segment-rules. Returns the created segment.", "operationId": "create_segment", "requestBody": { "content": { "application/json": { "schema": { "required": [ "segmentData" ], "type": "object", "properties": { "segmentData": { "type": "object", "description": "Segment to create: a name and an SQL-like rule selecting the contacts it contains." } } } } } }, "responses": { } } }, "/DeleteSegment": { "post": { "tags": [ "Contacts management" ], "description": "Delete a segment. The contacts it selected are not deleted, only the segment definition.", "operationId": "delete_segment", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Exact name of the segment to delete. Use GetSegments to look one up." } } } } } }, "responses": { } } }, "/GetSegments": { "post": { "tags": [ "Contacts management" ], "description": "Get existing segments", "operationId": "get_segments", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/GetSegment": { "post": { "tags": [ "Contacts management" ], "description": "Get existing segment by name", "operationId": "get_segment", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Exact name of the segment. Use GetSegments to list them." } } } } } }, "responses": { } } }, "/AddContactToSuppressionList": { "post": { "tags": [ "Suppressions management" ], "description": "Mark contacts as suppressed. Type must be one of: Bounced, Unsubscribed, Complained (spam).", "operationId": "add_contact_to_suppression_list", "requestBody": { "content": { "application/json": { "schema": { "required": [ "emails", "type" ], "type": "object", "properties": { "emails": { "type": "object", "description": "List of email addresses, maximum 1000" }, "type": { "type": "object", "description": "Suppression type: Bounced, Unsubscribed or Complained (spam)." } } } } } }, "responses": { } } }, "/DeleteSuppression": { "post": { "tags": [ "Suppressions management" ], "description": "Remove contact from suppression list.", "operationId": "delete_suppression", "requestBody": { "content": { "application/json": { "schema": { "required": [ "email" ], "type": "object", "properties": { "email": { "type": "string", "description": "Email address to remove from the suppression list." } } } } } }, "responses": { } } }, "/GetSuppressionList": { "post": { "tags": [ "Suppressions management" ], "description": "Get existing contact suppressions.", "operationId": "get_suppression_list", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { } } }, "/FetchTemplate": { "post": { "tags": [ "Emails sending" ], "description": "Get template by name. Reports an error when no template of that name exists.", "operationId": "fetch_template", "requestBody": { "content": { "application/json": { "schema": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Exact name of the template. Use FetchTemplates to list the names on this account." } } } } } }, "responses": { } } }, "/FetchTemplates": { "post": { "tags": [ "Emails sending" ], "description": "Get email templates list", "operationId": "fetch_templates", "requestBody": { "content": { "application/json": { "schema": { "required": [ "scopes" ], "type": "object", "properties": { "scopes": { "type": "object", "description": "Which template scopes to list. Personal covers this account's own templates, Global the shared ones." }, "templateTypes": { "type": "object", "description": "Optional filter on template type. Defaults to all three types." } } } } } }, "responses": { } } } }, "components": { } }