Emailchef MCP by usefulapi
Read lists, contacts, campaign stats; add contacts; draft, schedule and send campaigns and SMS.
我该使用它吗
质量与安全性
发现(12)
- HIGH
- MEDIUM在 emailchef_import_contacts 中
- MEDIUM在 emailchef_list_predefined_fields 中
- MEDIUM在 emailchef_list_custom_fields 中
- MEDIUM在 emailchef_create_campaign 中
- LOW在 emailchef_get_list_contact_counts 中
- LOW在 emailchef_list_predefined_fields 中
- LOW在 emailchef_list_campaign_engagement 中
- INFO在 emailchef_import_contacts 中
- INFO在 emailchef_list_predefined_fields 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"emailchef": {
"url": "https://emailchef.usefulapi.io/mcp"
}
}
}远程端点
https://emailchef.usefulapi.io/mcpstreamable-http它能做什么
工具清单
工具(43)
🟢emailchef_get_account
The Emailchef account this API key belongs to: id, email, language, status, subscriber total, bounces and complaints. GET /accounts/current.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_subscription
The account's current Emailchef plan: plan name, plan expiry, contact and send limits, credits left, active/expired flags. Check this before a big send. GET /subscriptions/current.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_senders
List the sender identities (name, email, verification status, postal address). Campaigns and emails need a verified sender id. GET /senders.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_timezones
List Emailchef's timezones (id, name, fixed UTC offset). The id is required to schedule a campaign. GET /meta/timezones.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_lists(order_by, order, limit, offset)
List the contact lists with id, name, and counts of active, unsubscribed and bounced contacts and segments. Newest first by default. GET /lists.
输入模式
{
"type": "object",
"properties": {
"order_by": {
"description": "Sort by creation date (default) or name.",
"type": "string",
"enum": [
"created",
"name"
]
},
"order": {
"description": "Sort direction (default desc).",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_list(list_id)
One contact list: name, description, default sender, creation date. GET /lists/{list_id}.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_list_stats(list_id, start_date, end_date)
Daily growth of a list over a date range: total contacts per day and the daily delta. Omit the dates for the whole history. GET /lists/{list_id}/stats.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"start_date": {
"description": "First day, yyyy-mm-dd.",
"type": "string"
},
"end_date": {
"description": "Last day, yyyy-mm-dd.",
"type": "string"
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_list_contact_counts(list_id)
How many contacts a list has by state: active, unsubscribed, bounced, reported. GET /lists/{list_id}/stats/count.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡emailchef_create_list(name, description)
WRITE: create a new, empty contact list. Returns the new list id. POST /lists.
输入模式
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "List name."
},
"description": {
"description": "List description.",
"type": "string",
"maxLength": 1000
}
},
"required": [
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_update_list(list_id, name, description)
WRITE: rename a contact list and/or change its description. Only the fields you pass change. PUT /lists/{list_id}.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"name": {
"description": "New list name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"description": "New description.",
"type": "string",
"maxLength": 1000
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_contacts(list_id, status, order_by, order, limit, ...)
List the contacts of one list (id, email, name, added by, subscription date), optionally by state. GET /contacts?list_id=...
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"status": {
"description": "Only contacts in this state (default: all).",
"type": "string",
"enum": [
"ACTIVE",
"UNSUBSCRIBED",
"BOUNCED",
"REPORTED"
]
},
"order_by": {
"description": "Sort field (default subscription date).",
"type": "string",
"enum": [
"email",
"name",
"added_by",
"subscribed",
"status"
]
},
"order": {
"description": "Sort direction (default desc).",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_contact(list_id, contact_id)
One contact in one list: status, email, name, IP, how it was added, when, and its custom field values. GET /contacts/{contact_id}?list_id=...
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"contact_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id",
"contact_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡emailchef_create_contact(list_id, email, first_name, last_name, status, ...)
WRITE: add a contact (email, name, custom fields) to a list. Only add people who agreed to receive email: an ACTIVE contact will receive the account's campaigns and automations. Returns the contact id and status. POST /contacts.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"first_name": {
"type": "string",
"maxLength": 200
},
"last_name": {
"type": "string",
"maxLength": 200
},
"status": {
"description": "Initial state (default: the account's default, normally ACTIVE).",
"type": "string",
"enum": [
"ACTIVE",
"UNSUBSCRIBED",
"BOUNCED",
"REPORTED"
]
},
"custom_fields": {
"description": "Custom field values keyed by the field's place_holder (see emailchef_list_custom_fields): a string, or true/false for boolean fields.",
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "boolean"
}
]
}
}
},
"required": [
"list_id",
"email"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_update_contact(list_id, contact_id, first_name, last_name, status, ...)
WRITE: change a contact's name, state or custom fields in one list. Only the fields you pass change. Setting the status to ACTIVE re-subscribes someone: only do so with their consent. PUT /contacts/{contact_id}.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"contact_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"first_name": {
"type": "string",
"maxLength": 200
},
"last_name": {
"type": "string",
"maxLength": 200
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"UNSUBSCRIBED",
"BOUNCED",
"REPORTED"
]
},
"custom_fields": {
"description": "Custom field values keyed by the field's place_holder (see emailchef_list_custom_fields): a string, or true/false for boolean fields.",
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "boolean"
}
]
}
}
},
"required": [
"list_id",
"contact_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_unsubscribe_contact(list_id, contact_id)
WRITE: unsubscribe one contact from one list (it stops receiving that list's email). POST /lists/{list_id}/unsubscribe?contact_id=...
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"contact_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id",
"contact_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_import_contacts(list_id, contacts)
WRITE: bulk-add or update up to 500 contacts in a list in one call (an existing email is updated). Each contact is an object keyed by field placeholder, e.g. {"email":"[email protected]","firstname":"Ada"}: get the placeholders from emailchef_list_predefined_fields and emailchef_list_custom_fields. Import only people who agreed to receive email. Runs in the background: poll emailchef_get_import_task with the returned id. POST /lists/{list_id}/import.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"contacts": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 2000
}
},
"description": "Contacts to import, each keyed by placeholder."
}
},
"required": [
"list_id",
"contacts"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_import_tasks
List contact import tasks: list, status (DISPATCHED, COMPLETE, FAILED), progress, imported/updated/failed counts. GET /importtasks.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_import_task(task_id)
One import task: status, progress, imported/updated/failed counts and any error message. GET /importtasks/{task_id}.
输入模式
{
"type": "object",
"properties": {
"task_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"task_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_predefined_fields
The built-in contact fields (email, first name, ...) with their placeholders. GET /predefinedfields.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_custom_fields(list_id)
The custom contact fields of a list: name, data type, placeholder (the key used when writing contacts), options. GET /lists/{list_id}/customfields.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_segments(list_id, limit, offset)
List the saved segments of a list with how many contacts match each. GET /lists/{list_id}/segments.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_segment(list_id, segment_id)
One segment with its logic and condition groups. GET /lists/{list_id}/segments/{segment_id}.
输入模式
{
"type": "object",
"properties": {
"list_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"segment_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"list_id",
"segment_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_blocked(search, limit, offset)
List the account's blocklist (emails that never receive email): address and reason (MANUAL, UNSUBSCRIBED, COMPLAINT). GET /blockings.
输入模式
{
"type": "object",
"properties": {
"search": {
"description": "Only addresses containing this text.",
"type": "string",
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_block_emails(emails)
WRITE: add up to 100 addresses to the account blocklist so they never receive email from any list. Reversible with emailchef_unblock_email. POST /blockings?type=MANUAL.
输入模式
{
"type": "object",
"properties": {
"emails": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"description": "Addresses to block."
}
},
"required": [
"emails"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_unblock_email(email)
WRITE: remove one address from the account blocklist so it can receive email again. Only do this for an address whose owner asked for it. DELETE /blockings/{email}.
输入模式
{
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
}
},
"required": [
"email"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_campaign_counts
How many campaigns the account has by state: drafts, sent, scheduled, archived, failed. GET /campaigns/count.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_campaigns(status, search, order_by, order, limit, ...)
List email campaigns with state, recipients, delivered, unique opens and unique clicks. Without a status filter Emailchef returns only SENT and ARCHIVED campaigns; pass a status to see DRAFT, SCHEDULED, SENDING or FAILED ones. GET /campaigns.
输入模式
{
"type": "object",
"properties": {
"status": {
"description": "Only campaigns in this state (default: SENT and ARCHIVED).",
"type": "string",
"enum": [
"DRAFT",
"SCHEDULED",
"SENDING",
"SENT",
"ARCHIVED",
"FAILED"
]
},
"search": {
"description": "Only campaigns whose name contains this text.",
"type": "string",
"maxLength": 200
},
"order_by": {
"description": "Sort by date (default) or name.",
"type": "string",
"enum": [
"time",
"name"
]
},
"order": {
"description": "Sort direction (default desc).",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_campaign(campaign_id)
One campaign: name, subject, HTML and text body, sender, reply-to, state, schedule, recipient lists/segments and cached sent/open/click counts. GET /campaigns/{id}.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_campaign_links(campaign_id)
The links contained in a campaign (id, name, URL). GET /newsletters/{id}/links.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_list_campaign_engagement(campaign_id, event, search, limit, offset)
Per-contact engagement for a sent campaign: who opened, clicked, was delivered, did not open, unsubscribed, complained, or was sent to, with counts and first/last event time. Pick exactly one event. GET /newsletters/{id}/contacts.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"event": {
"type": "string",
"enum": [
"open",
"click",
"deliver",
"unopen",
"unsubscribe",
"report",
"sent",
"scheduled"
],
"description": "Which engagement slice to list."
},
"search": {
"description": "Only contacts whose email or name contains this text.",
"type": "string",
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
},
"offset": {
"description": "Rows to skip (default 0). Pass the previous reply's next_offset.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"campaign_id",
"event"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡emailchef_create_campaign(name, subject, sender_id, list_ids, segment_id, ...)
WRITE: create a new campaign as a DRAFT (nothing is sent). Needs a verified sender (emailchef_list_senders) and at least one list. To be sendable the HTML body must contain the CAN-SPAM placeholders [[account:business]], [[account:address_1]], [[account:city]], [[account:postal_code]], [[account:country]] and an unsubscribe link <a href="[[unsubscribe_link]]">, otherwise the send ends FAILED. Schedule or send it afterwards. POST /newsletters.
输入模式
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Campaign name (must be unique in the account)."
},
"subject": {
"type": "string",
"minLength": 1,
"maxLength": 998,
"description": "Email subject."
},
"sender_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "A verified sender id from emailchef_list_senders."
},
"list_ids": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"description": "Lists to send to."
},
"segment_id": {
"description": "Optional segment of the FIRST list to narrow the audience.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"html_body": {
"description": "HTML body (include the CAN-SPAM placeholders and unsubscribe link).",
"type": "string",
"maxLength": 2000000
},
"text_body": {
"description": "Plain-text body.",
"type": "string",
"maxLength": 500000
},
"reply_to_id": {
"description": "Sender id used for replies.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
}
},
"required": [
"name",
"subject",
"sender_id",
"list_ids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡emailchef_clone_campaign(campaign_id)
WRITE: copy an existing campaign into a new DRAFT (nothing is sent). A SENT campaign cannot be cloned (Emailchef answers HTTP 500). Returns the new campaign id. POST /newsletters?clone=1.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "The campaign to copy."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_update_campaign(campaign_id, name, subject, html_body, text_body, ...)
WRITE: change a DRAFT campaign's name, subject, body, sender, reply-to or recipient lists. Only the fields you pass change: the tool reads the campaign first and sends the complete record back, because Emailchef blanks any omitted field. Refuses a campaign that is not a DRAFT. PUT /newsletters/{id}.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subject": {
"type": "string",
"minLength": 1,
"maxLength": 998
},
"html_body": {
"type": "string",
"maxLength": 2000000
},
"text_body": {
"type": "string",
"maxLength": 500000
},
"sender_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"reply_to_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"list_ids": {
"description": "Replace the recipient lists (any segment is dropped unless segment_id is also passed).",
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"segment_id": {
"description": "Segment of the first list (only with list_ids).",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡emailchef_send_test_campaign(campaign_id, email)
WRITE: email ONE test copy of a campaign to a single address. The campaign state does not change. The sender must be verified. PUT /campaigns/{id}/sendtest.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Where to send the test copy."
}
},
"required": [
"campaign_id",
"email"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_schedule_campaign(campaign_id, scheduled_time, timezone_id)
WRITE, SENDS EMAIL TO CUSTOMERS LATER: schedule a DRAFT campaign to go out to all its recipients at a date and time. Emailchef timezones are fixed offsets without daylight saving: pick the id (emailchef_list_timezones) whose offset matches the send date. Undo before it starts with emailchef_unschedule_campaign. PUT /campaigns/{id}/schedule.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"scheduled_time": {
"type": "string",
"description": "Local send time in the chosen timezone, YYYY-MM-DD HH:MM:SS (no UTC offset or Z)."
},
"timezone_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Timezone id from emailchef_list_timezones."
}
},
"required": [
"campaign_id",
"scheduled_time",
"timezone_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_unschedule_campaign(campaign_id)
WRITE: cancel the schedule of a SCHEDULED campaign and bring it back to DRAFT. PUT /campaigns/{id}/unschedule.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_send_campaign(campaign_id, confirm)
WRITE, SENDS EMAIL TO CUSTOMERS NOW AND CANNOT BE UNDONE: start sending a DRAFT (or FAILED) campaign immediately to ALL its recipients and use up plan sends. Check the recipients (emailchef_get_campaign), the sender and the subscription first, ideally after emailchef_send_test_campaign, and send only with the user's explicit go-ahead (confirm must be true). Queued asynchronously: poll emailchef_get_campaign for the final state. PUT /campaigns/{id}/send.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true: the user explicitly approved sending this campaign now."
}
},
"required": [
"campaign_id",
"confirm"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_archive_campaign(campaign_id)
WRITE: archive a campaign (hidden from the default list; statistics are kept). Reversible with emailchef_unarchive_campaign. PUT /campaigns/{id}/archivecampaign.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_unarchive_campaign(campaign_id)
WRITE: restore an archived campaign. PUT /campaigns/{id}/unarchivecampaign.
输入模式
{
"type": "object",
"properties": {
"campaign_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "Numeric id (as returned by the list tools)."
}
},
"required": [
"campaign_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_send_email(sender_id, to_email, to_name, subject, text_body, ...)
WRITE, SENDS AN EMAIL NOW AND CANNOT BE UNDONE: send a single email to one recipient from a verified sender and use up plan sends. Pass text_body and/or html_body. The recipient does not need to be a contact. Send only with the user's explicit go-ahead (confirm must be true). POST /sendmail.
输入模式
{
"type": "object",
"properties": {
"sender_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,18}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
],
"description": "A verified sender id from emailchef_list_senders."
},
"to_email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"to_name": {
"type": "string",
"maxLength": 200
},
"subject": {
"type": "string",
"minLength": 1,
"maxLength": 998
},
"text_body": {
"type": "string",
"maxLength": 500000
},
"html_body": {
"type": "string",
"maxLength": 2000000
},
"reply_to": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true: the user explicitly approved sending this email now."
}
},
"required": [
"sender_id",
"to_email",
"subject",
"confirm"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_sms_balance
The account's SMS credit balance and currency. GET /sms/balance.
输入模式
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢emailchef_get_sms_status(message_id)
Delivery status of one sent SMS by message id: recipient, text, sent/done time, parts, price, state and error. GET /sms/status/{messageId}.
输入模式
{
"type": "object",
"properties": {
"message_id": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Message id returned by emailchef_send_sms."
}
},
"required": [
"message_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴emailchef_send_sms(to, text, from, confirm)
WRITE, SENDS TEXT MESSAGES NOW, COSTS SMS CREDIT AND CANNOT BE UNDONE: send an SMS to 1-50 phone numbers in international format (e.g. +393331234567). Check emailchef_get_sms_balance first and send only with the user's explicit go-ahead (confirm must be true). Returns a message id per recipient and the remaining balance. POST /sms/send.
输入模式
{
"type": "object",
"properties": {
"to": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\+?[0-9]{6,15}$"
},
"description": "Recipient phone numbers."
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 1600,
"description": "The message text."
},
"from": {
"description": "Sender name or number (default: the account's).",
"type": "string",
"minLength": 1,
"maxLength": 15
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true: the user explicitly approved sending these SMS now."
}
},
"required": [
"to",
"text",
"confirm"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社区
证据