SKILL·63AADA

managing-contacts

mailtrap
更新于 8 days ago
7
1
7
在 GitHub 上查看
aiapidesign

关于

This skill assists developers when working with the Mailtrap Contacts API to manage marketing contacts and audiences. It enables actions like adding, updating, listing, segmenting contacts, and handling custom fields or events. Use it for syncing contacts from external systems or building target audiences for email campaigns.

快速安装

Claude Code

推荐
主要方式
npx skills add mailtrap/mailtrap-skills -a claude-code
插件命令备选方式
/plugin add https://github.com/mailtrap/mailtrap-skills
Git 克隆备选方式
git clone https://github.com/mailtrap/mailtrap-skills.git ~/.claude/skills/managing-contacts

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

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)

ActionMethodURLReference
Create / get / update / delete contactvarioushttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contactsContacts
Bulk import (async job)POSThttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/importsBulk import
Contact listsvarioushttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/listsContact lists
Custom fieldsvarioushttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/fieldsContact fields
Custom eventsPOSThttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/{contact_identifier}/eventsContact events
Export contactsvarioushttps://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/contacts/exportsExport 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": "[email protected]",
      "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": "[email protected]", "fields": {"first_name": "John"}, "list_ids_included": [1, 2]},
      {"email": "[email protected]", "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 eventsPOST .../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

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

GitHub 仓库

mailtrap/mailtrap-skills
路径: skills/managing-contacts
0
FAQ

常见问题

什么是 managing-contacts Skill?

managing-contacts 是一个 Claude Skill,作者为 mailtrap。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 managing-contacts 相关的任务。

如何安装 managing-contacts?

使用本页的安装命令:将 managing-contacts 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。

managing-contacts 属于哪个分类?

managing-contacts 属于元分类。

managing-contacts 可以免费使用吗?

可以。managing-contacts 已收录在 AIMCP,可免费安装。

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能
polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能
creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能
sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能