微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📧

智能邮件营销联系人管家

managing-contacts · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 S 级 作者 mailtrap 公开目录收录
111 下载 0 安装 390 收藏 1 浏览

简介

Mailtrap官方API技能,自动化管理营销联系人数据库,支持CRM同步、批量导入与自定义字段,助力精准营销 campaign 构建。

原始描述

Use when using Mailtrap Contacts API or UI to add, update, bulk import, list, segment marketing contacts, custom fields, or custom events. Use when syncing contacts from a CRM or warehouse, or building audiences for campaigns.

通过你的 Agent 添加

安装目录:managing-contacts/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/managing-contacts/
Codex CLI~/.codex/skills/managing-contacts/
DeepSeek Harness~/.agents/skills/managing-contacts/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

该技能提供完整的 Mailtrap Contacts API 操作能力,涵盖营销联系人的全生命周期管理。核心功能包括:单条/批量联系人增删改查、CSV 批量导入(单次最高5万条)、自定义字段与事件追踪、联系人列表与动态分组管理。通过标准化 RESTful 端点,支持从 CRM、数据仓库或第三方工具(Zapier、Make、n8n)进行双向数据同步,为邮件营销自动化提供数据基础。

显著优点

官方原生支持:技能文档直接关联 Mailtrap OpenAPI 规范,字段定义与端点行为实时同步,避免版本漂移。批量处理能力突出:异步导入机制配合状态轮询,可高效处理大规模数据迁移场景。生态集成友好:既支持程序化 API 调用,也覆盖无代码工具链,降低不同技术栈团队的接入门槛。营销与发送解耦清晰:明确区分联系人管理(营销侧)与退信/投诉拦截(发送侧 Suppressions),避免业务逻辑混淆。

潜在缺点与局限性

速率限制约束:标准端点限制 200 请求/60 秒,大规模实时同步需设计队列与退避策略。异步作业复杂度:批量导入需额外轮询 import_id 状态,增加实现复杂度与失败重试逻辑。功能边界限定:专注于营销联系人管理,不包含邮件模板设计、A/B 测试或发送排程功能,完整 campaign 需组合其他技能。依赖外部认证:需前置配置 MAILTRAP_API_TOKEN 与 account_id 解析,对多账户场景需额外封装。

适合的目标群体

邮件营销运营团队:需批量维护用户列表、构建精准受众分群的营销人员。SaaS 产品开发者:集成用户注册/行为数据到邮件营销系统的后端工程师。数据工程师:负责 CRM/CDP 与 Mailtrap 双向同步的 ETL 流程设计者。自动化集成专家:通过 Zapier/n8n 搭建无代码工作流的运营自动化从业者。

常规使用风险

性能风险:单条创建模式在大数据量下易触发速率限制,导致同步延迟或失败。数据一致性风险:异步批量作业存在部分失败可能,需实现完善的错误处理与重试机制。依赖项风险:技能运行时依赖 authorizing-api-requests 技能获取有效 token,认证链路故障将级联阻断所有联系人操作。误操作风险:混淆营销联系人删除与发送侧 Suppressions 管理,可能导致合规性或送达率问题。

技能正文


name: managing-contacts description: >- Use when using Mailtrap Contacts API or UI to add, update, bulk import, list, segment marketing contacts, custom fields, or custom events. Use when syncing contacts from a CRM or warehouse, or building audiences for campaigns.

Managing Mailtrap contacts

Overview

Before generating API request bodies: check the Contacts OpenAPI spec for current field names, required parameters, and nested structures.

Contacts are the marketing database: lists, segments, custom fields, and imports for campaign audiences and related workflows. The Contacts API automates create/update and can feed CRM or CDP sync (your code, or tools like Zapier, Make, n8n — see Import contacts).

Suppressions (hard bounces, spam complaints, unsubscribes on the sending side) live in the sending product and block delivery for those addresses on your streams. That is applied separately from marketing filters (segments, list membership, consent flags) that decide who is eligible for campaigns. For sending-side blocks, see Suppressions and skill sending-emails.

Related skills: authorizing-api-requests (tokens, env vars, account_id resolution), sending-emails (live send paths).

When to use

  • Programmatic contact management (create, update, bulk import)
  • Sync with CRMs or data warehouses
  • Contact list cleanup and CSV import
  • Updating contacts with custom fields or firing custom events for automations
  • Segments and custom fields for audience building

Authorization

All endpoints below need Authorization: Bearer $MAILTRAP_API_TOKEN and an $MAILTRAP_ACCOUNT_ID in the path. See skill authorizing-api-requests for token scope, storage, and the one-liner that resolves $MAILTRAP_ACCOUNT_ID from GET https://mailtrap.io/api/accounts.

Endpoints (replace placeholders)

Action Method URL Reference
Create / get / update / delete contact various https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts Contacts
Bulk import (async job) POST https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/imports Bulk import
Contact lists various https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/lists Contact lists
Custom fields various https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/fields Contact fields
Custom events POST https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/{contact_identifier}/events Contact events
Export contacts various https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/exports Export contacts
  • Rate limit (typical): 200 requests per 60 seconds per account — prefer bulk import for large loads.
  • Bulk import limit: up to 50,000 contacts per import request (async job); poll import status with GET .../contacts/imports/{import_id}. See Bulk import.

Examples (curl)

Single contact create (with custom fields)

curl -X POST "https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts" \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "contact": {
      "email": "john.smith@example.com",
      "fields": {"first_name": "John", "last_name": "Smith", "company": "Example Inc"},
      "list_ids": [1, 2, 3]
    }
  }'

Bulk import (array of contacts)

curl -X POST "https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/imports" \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "contacts": [
      {"email": "user1@example.com", "fields": {"first_name": "John"}, "list_ids_included": [1, 2]},
      {"email": "user2@example.com", "fields": {"first_name": "Jane"}, "list_ids_included": [1]}
    ]
  }'

Custom event (event name + payload)

curl -X POST "https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/{contact_identifier}/events" \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name": "UserLogin", "params": {"user_id": 101, "is_active": true}}'

Concepts

  • Lists — explicitly defined list of contacts.
  • Segments — dynamic groups; see Segments.
  • Custom fields — properties like first and last name or membership level; see Custom fields.
  • Custom events — POST .../events with an event name and params object for automations.

CRM and sync

Campaigns use case

Contacts power marketing campaigns: you maintain clean lists, consent, and attributes here; campaign authoring and scheduling are product features documented in Campaigns.

Common mistakes

Mistake Fix
Hitting rate limits with one-by-one creates Use /contacts/imports for bulk loads (respect 50k per request) and backoff
Treating marketing contacts as sending suppressions Use Suppressions for blocked recipients on send streams

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

apimarketingautomationcustomer-supportcrmdata-analyticsbackendoperations

同类 Skill