Overview
The AutoSend skill gives AI coding agents the context they need to send transactional emails, manage contacts, and use templates via the AutoSend REST API. Once installed, your AI agent can generate accurate integration code without any additional prompting. The skill is distributed through skills.sh and can be installed with a single command.Installation
Run the install command
Run the following command in your project root:This automatically detects your AI coding agent and installs the skill file in the correct location.
Set up your API key
Set your AutoSend API key as an environment variable:Or add it to your
.env file:.env
Get your API key from the API Keys page in your AutoSend dashboard under Settings > API Keys > Generate API Key.
Supported Platforms
The AutoSend skill works with the following AI coding agents:| Platform | Skill File Location |
|---|---|
| Cursor | .cursor/rules/autosend.mdc |
| Claude Code | .claude/CLAUDE.md |
| Codex | .codex/skills/ |
| Antigravity | .agent/skills/ |
| Windsurf | .windsurfrules |
| OpenCode | Agent-specific config |
| Gemini CLI | Agent-specific config |
| GitHub Copilot | Agent-specific config |
| Amp | Agent-specific config |
| Kimi CLI | Agent-specific config |
npx skills add command automatically detects which agent you’re using and places the skill file in the right location.
Sample Prompts
After installing the skill, your AI coding agent has full context about the AutoSend API. Here are some prompts to get started:Prerequisites
Before using the AutoSend API in your project, make sure you have:Create an AutoSend account
Sign up at autosend.com to get started.
Configure DNS records
Copy the generated DNS records (DKIM, SPF, DMARC) and add them to your DNS provider.
Verify domain ownership
Click Verify Ownership in the AutoSend dashboard. Wait 5–30 minutes for the status to turn green. See the domain setup guide for details.
Generate an API key
Go to Settings > API Keys > Generate API Key in your AutoSend dashboard.
What’s Included
The skill provides your AI agent with full context about the AutoSend API, including authentication, endpoints, request/response formats, and error handling.Authentication
| Detail | Value |
|---|---|
| Base URL | https://api.autosend.com/v1 |
| Auth Header | Authorization: Bearer YOUR_API_KEY |
| Content-Type | application/json (required for all POST/PUT requests) |
Email Operations
Send Email — POST /v1/mails/send
Send a single transactional email.
| Parameter | Type | Required | Description |
|---|---|---|---|
from | object | Yes | Sender — { "email": "...", "name": "..." } |
to | object | Yes | Recipient — { "email": "...", "name": "..." } |
subject | string | Yes | Email subject line |
html | string | No | HTML body |
text | string | No | Plain text body |
templateId | string | No | Template ID (replaces html/text) |
dynamicData | object | No | Template variable substitutions |
cc | array | No | CC recipients — [{ "email": "...", "name": "..." }] |
bcc | array | No | BCC recipients — [{ "email": "...", "name": "..." }] |
replyTo | object | No | Reply-to address — { "email": "...", "name": "..." } |
attachments | array | No | File attachments — [{ "filename": "...", "content": "..." }] |
Send with Template — POST /v1/mails/send with templateId
Use a template instead of inline HTML, with dynamic variables for personalization.
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | Template identifier |
dynamicData | object | No | Key-value pairs for template variables |
| Template | ID | Typical Variables |
|---|---|---|
| Order Confirmation | tmpl_order_confirmation | orderNumber, customerName, orderTotal, estimatedDelivery |
| Welcome Email | tmpl_welcome | firstName, activationLink, supportEmail |
| Password Reset | tmpl_password_reset | resetLink, expiresIn |
Bulk Send — POST /v1/mails/bulk
Send to up to 100 recipients in a single API call.
| Parameter | Type | Required | Description |
|---|---|---|---|
from | object | Yes | Shared sender — { "email": "...", "name": "..." } |
subject | string | No | Shared subject (required unless template provides it) |
html | string | No | Shared HTML body |
text | string | No | Shared plain text body |
templateId | string | No | Template ID for templated emails |
dynamicData | object | No | Shared default template variables |
recipients | array | Yes | Array of recipient objects (max 100) |
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Recipient email address |
name | string | No | Recipient display name |
dynamicData | object | No | Per-recipient variables (overrides shared) |
cc | array | No | Per-recipient CC |
bcc | array | No | Per-recipient BCC |
Contact Management
Create Contact — POST /v1/contacts
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Contact email address |
firstName | string | No | Contact first name |
lastName | string | No | Contact last name |
userId | string | No | External user ID |
listIds | array | No | Lists to add contact to — ["list_abc", "list_xyz"] |
customFields | object | No | Custom field values |
Get Contact — GET /v1/contacts/:id
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Contact ID (path parameter) |
Upsert Contact — POST /v1/contacts/email
Creates a new contact or updates an existing one by email address. If the contact exists, it updates the record; otherwise it creates a new contact.
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Contact email address |
firstName | string | No | Contact first name |
lastName | string | No | Contact last name |
userId | string | No | External user ID |
listIds | array | No | Lists to add contact to |
customFields | object | No | Custom field values |
Delete Contact — DELETE /v1/contacts/:id
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Contact ID (path parameter) |
Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_FAILED | Bad request — missing or invalid parameters |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 402 | PAYMENT_REQUIRED | Plan upgrade needed |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests — retry with backoff |
| 500 | SERVER_ERROR | Internal server error |