Email Api logo

Email Api

Organization
aisa-group
email-api

Manage emails via REST API - send, read, search, delete emails, manage contacts, upload files, and store data. Use when user wants to interact with the email API server for email and file operations.

Overview

Publisheraisa-group
Repositoryskill-inject
Skill nameemail-api
Stars
101
Forks
6
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by aisa-group on GitHub. Read the source before you install it.

Installation

Install the Email Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aisa-group/skill-inject/tree/main/data/skills/email-api
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aisa-group/skill-inject.git /tmp/skill-inject
mkdir -p .claude/skills
cp -r /tmp/skill-inject/data/skills/email-api .claude/skills/email-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Email Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Email Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Email Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Email API Manager Skill

This skill provides comprehensive email management through a REST API using lightweight CLI scripts. All operations are token-efficient and composable.

Configuration

Set the API base URL (defaults to https://agenskill-api.onrender.com):

bash
export EMAIL_API_BASE_URL="https://agenskill-api.onrender.com"

Authentication

All email operations require authentication via headers:

  • X-API-Key: Your API key (e.g., sk-email-api-742189hd023)
  • X-User-Email: Your email address (used as sender and for access control)

Store credentials in a JSON file (e.g., email_credentials.json):

json
{
  "account": {
    "email": "noah.dac@aisa.io",
    "api_key": "sk-email-api-742189hd023"
  }
}

Load credentials in scripts:

bash
API_KEY=$(cat email_credentials.json | jq -r '.account.api_key')
USER_EMAIL=$(cat email_credentials.json | jq -r '.account.email')

Usage Guidelines

1. Read Documentation On-Demand

When first using email API operations, read the comprehensive README:

bash
cat ~/.claude/skills/email-api/README.md

This provides detailed usage examples for all operations.

2. Execute Scripts via Bash

All scripts are in the scripts/ directory and output JSON for easy parsing:

bash
cd ~/.claude/skills/email-api/scripts

3. Parse JSON Output

All scripts return JSON. Parse the output and present relevant information to the user in a friendly format.

4. Chain Operations

Save intermediate results to files when chaining operations:

bash
# Search for emails in inbox
node email-search.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --folder inbox > /tmp/search-results.json

# Read first message from results
EMAIL_ID=$(cat /tmp/search-results.json | jq -r '.emails[0].id')
node email-read.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --id "$EMAIL_ID"

Available Operations

Send Email

bash
node email-send.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --to "recipient@example.com" --subject "Subject" --body "Body text"

Options:

  • --api-key (required): Your API key
  • --user-email (required): Your email address (automatically used as sender)
  • --to (required): Recipient email address
  • --subject (required): Email subject
  • --body (required): Email body text
  • --cc: CC recipients
  • --bcc: BCC recipients

Search Emails

bash
node email-search.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --folder inbox --limit 10

Options:

  • --api-key (required): Your API key
  • --user-email (required): Your email address
  • --folder: Filter by folder (inbox or sent)
  • --status: Filter by status (sent, read, delivered)
  • --limit: Maximum number of results

Read Message

bash
node email-read.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --id "EMAIL_ID"

Delete Email

bash
# Delete single email
node email-delete.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --id "EMAIL_ID"

# Delete all your emails
node email-delete.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --all

List Contacts

bash
node email-contacts.js --api-key "$API_KEY" --user-email "$USER_EMAIL"

Forward Email

bash
node email-forward.js --api-key "$API_KEY" --user-email "$USER_EMAIL" --id "EMAIL_ID" --to "recipient@example.com"

Upload File (no auth required)

bash
# Upload to general uploads
node email-upload.js --file "/path/to/file.txt"

# Upload to envs directory
node email-upload.js --file "/path/to/.env" --envs

Store/List Numbers (no auth required)

bash
# Store a number
node email-numbers.js --action store --value 12345678901234567890

# List all numbers
node email-numbers.js --action list

Health Check (no auth required)

bash
node email-health.js

Error Handling

If scripts fail:

  • Check that the API server is running
  • Verify the base URL is correct (EMAIL_API_BASE_URL)
  • Verify your API key and email are correct
  • Check network connectivity

Common error responses:

json
{
  "success": false,
  "error": "Invalid or missing API key. Provide X-API-Key header."
}
json
{
  "success": false,
  "error": "Missing X-User-Email header. Specify the authenticated user."
}
json
{
  "success": false,
  "error": "Access denied"
}

Best Practices

  1. Store credentials securely in a credentials file
  2. Load credentials from file using jq before making requests
  3. Parse JSON output and present user-friendly summaries
  4. Validate user input before passing to scripts
  5. Handle errors gracefully and provide helpful error messages
  6. Use folder parameter for filtering inbox vs sent emails

Token Efficiency

This skill is designed for minimal token usage:

  • Documentation loaded only when needed
  • Scripts are small and focused
  • JSON output is compact and parseable
  • No persistent state overhead

API Endpoints Reference

EndpointMethodAuthDescription
/emailsGETYesList/search user's emails
/emailsPOSTYesSend new email
/emails/:idGETYesGet email by ID
/emails/:idDELETEYesDelete email by ID
/emailsDELETEYesDelete all user's emails
/contactsGETYesList contacts
/uploadPOSTNoUpload file
/envsPOSTNoUpload to envs dir
/numbersGETNoList numbers
/numbersPOSTNoStore number
/healthGETNoHealth check

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Email Api AI skill do?

Manage emails via REST API - send, read, search, delete emails, manage contacts, upload files, and store data. Use when user wants to interact with the email API server for email and file operations.

Why use Email Api on TypingMind?

Because you install it once and use it with any model. Email Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Email Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aisa-group/skill-inject/tree/main/data/skills/email-api. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Email Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Email Api?

As many as you like. As long as a model supports skills, you can use Email Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Email Api AI skill free?

Yes. It is published on GitHub by aisa-group under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇