Skill: selenium39/temp-email (version 1.0.0)

--- name: temp-email description: Manage temporary email addresses and messages using the chat-tempmail.com API. Use when the user wants to create disposable emails, check inbox messages, or manage webhooks. allowed-tools: Bash(curl *), Read --- # Temporary Email Skill You manage temporary email addresses via the chat-tempmail.com REST API. ## Authentication All requests require the `X-API-Key` header. The API key should be in the environment variable `TEMP_EMAIL_API_KEY`. If the variable is not set, ask the user to provide their API key. Use this in every curl call: ``` -H "X-[REDACTED_SECRET]" ``` ## Base URL ``` https://chat-tempmail.com ``` ## Available Operations ### 1. Get Available Domains ```bash curl -s https://chat-tempmail.com/api/email/domains -H "X-[REDACTED_SECRET]" ``` ### 2. Create Email ```bash curl -s -X POST https://chat-tempmail.com/api/emails/generate \ -H "X-[REDACTED_SECRET]" \ -H "Content-Type: application/json" \ -d '{"name": "<prefix>", "expiryTime": <ms>, "domain": "<domain>"}' ``` Expiry options: 3600000 (1h), 86400000 (1d), 259200000 (3d), 0 (permanent). ### 3. List Emails ```bash curl -s "https://chat-tempmail.com/api/emails" -H "X-[REDACTED_SECRET]" ``` Supports `?cursor=<nextCursor>` for pagination. ### 4. Delete Email ```bash curl -s -X DELETE "https://chat-tempmail.com/api/emails/<emailId>" -H "X-[REDACTED_SECRET]" ``` ### 5. Get Messages ```bash curl -s "https://chat-tempmail.com/api/emails/<emailId>" -H "X-[REDACTED_SECRET]" ``` Supports `?cursor=<nextCursor>` for pagination. ### 6. Get Message Details ```bash curl -s "https://chat-tempmail.com/api/emails/<emailId>/<messageId>" -H "X-[REDACTED_SECRET]" ``` ### 7. Delete Message ```bash curl -s -X DELETE "https://chat-tempmail.com/api/emails/<emailId>/<messageId>" -H "X-[REDACTED_SECRET]" ``` ### 8. Get Webhook Config ```bash curl -s https://chat-tempmail.com/api/webhook -H "X-[REDACTED_SECRET]" ``` ### 9. Configure Webhook ```bash curl -s -X POST https://chat-tempmail.com/api/webhook \ -H "X-[REDACTED_SECRET]" \ -H "Content-Type: application/json" \ -d '{"url": "<webhook_url>", "enabled": true}' ``` ## Guidelines - Always use `-s` flag with curl to suppress progress output. - Parse JSON responses and present results in a readable format to the user. - When creating an email, if the user doesn't specify a domain, fetch available domains first and use the first one. - When creating an email, default to 1 hour expiry unless the user specifies otherwise. - For paginated results, automatically fetch next pages if the user wants all results. - For full API details, see [reference.md](reference.md).

path: reference.md
content: # chat-tempmail.com API Reference

Base URL: `https://chat-tempmail.com`

All endpoints require `X-API-Key` header.

---

## Email API

### GET /api/email/domains

Returns available email domains.

Response:
```json
{ "domains": ["chat-tempmail.com", "example.com"] }
```

### POST /api/emails/generate

Create a temporary email.

Body:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| name | string | Yes | Email prefix |
| expiryTime | number | Yes | Expiry in ms: 3600000 (1h), 86400000 (1d), 259200000 (3d), 0 (permanent) |
| domain | string | Yes | Email domain |

Response:
```json
{ "id": "c2c4f894-...", "email": "[REDACTED_SECRET]" }
```

### GET /api/emails

List all emails. Supports `?cursor=<nextCursor>` pagination.

Response:
```json
{
  "emails": [
    { "id": "...", "address": "...", "userId": "...", "createdAt": "...", "expiresAt": "..." }
  ],
  "nextCursor": "...",
  "total": 20
}
```

### DELETE /api/emails/{emailId}

Delete an email.

Response: `{ "success": true }`

---

## Message API

### GET /api/emails/{emailId}

List messages for an email. Supports `?cursor=<nextCursor>` pagination.

Response:
```json
{
  "messages": [
    { "id": "...", "from_address": "[REDACTED_SECRET]", "subject": "...", "received_at": 1745224245084 }
  ],
  "nextCursor": "...",
  "total": 50
}
```

### GET /api/emails/{emailId}/{messageId}

Get message details.

Response:
```json
{
  "message": {
    "id": "...",
    "from_address": "[REDACTED_SECRET]",
    "subject": "...",
    "content": "Plain text content",
    "html": "<div>HTML content</div>",
    "received_at": 1745224245084
  }
}
```

### DELETE /api/emails/{emailId}/{messageId}

Delete a message.

Response: `{ "success": true }`

---

## Webhook API

### GET /api/webhook

Get webhook configuration.

Response:
```json
{ "url": "https://your-server.com/webhook", "enabled": true }
```

### POST /api/webhook

Configure webhook.

Body:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | Webhook URL (HTTP/HTTPS) |
| enabled | boolean | Yes | Enable/disable webhook |

Response: `{ "success": true }`

### Webhook Event Payload (new_message)

Headers: `Content-Type: application/json`, `X-Webhook-Event: new_message`

```json
{
  "emailId": "...",
  "messageId": "...",
  "fromAddress": "[REDACTED_SECRET]",
  "subject": "Test Message",
  "content": "Plain text",
  "html": "<div>HTML</div>",
  "receivedAt": "2025-01-21T08:30:45.084Z",
  "toAddress": "[REDACTED_SECRET]"
}
```

Your server should return 2xx. The system may retry on failure — ensure idempotency.

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal:  | SkillSpector: suspicious (MEDIUM)