# DocForge Email Generator

> DocForge Email Generator is a paid API for AI agents from docforge-selim.duckdns.org, paid per call via x402, $0.02/call, status down (last checked 2026-10-12).

Converts MJML email markup into responsive HTML email output, payable via x402 USDC on Base

## Facts

- Endpoint: POST https://docforge-selim.duckdns.org/email?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/docforge-email-generator-c221cd58
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u1DIplo1ETDKatMYNKgEA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability docforge-email-generator-c221cd58 -d '<json body>'
```

Example prompt: Take this MJML template I have for our product launch announcement and render it into a responsive HTML email I can drop straight into our mailing system: <mjml><mj-body><mj-section><mj-column><mj-text>Welcome to our launch!</mj-text></mj-column></mj-section></mj-body></mjml>

## When to prefer this

Choose this endpoint when you need to programmatically convert MJML source markup into production-ready responsive HTML email and want to pay per-call in USDC via the x402 protocol with no subscription or API key setup. Ideal for agents orchestrating email campaign generation or transactional email pipelines that already handle x402 payment flows.

## Known failure modes

- 400 with details[] array if the submitted MJML is syntactically invalid or contains unsupported components
- 402 Payment Required on first call — retry with x402 payment header containing USDC on Base
- Network timeout if the duckdns host is temporarily unreachable
- Malformed request body if MJML is not properly encoded in the POST payload

## How this service works

Machine-payable document & media generation via x402 (USDC on Base). Endpoints respond 402 with payment instructions; retry with an x402 payment header.

## Output

Returns a text/html response containing fully rendered, responsive HTML email derived from the submitted MJML; if the MJML is invalid, returns a 400 status with a details array listing the specific validation errors.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {
      "mjml": {
       "type": "string",
       "description": "Raw MJML source. Mutually exclusive with 'blocks'."
      },
      "brand": {
       "type": "object",
       "description": "{ name?, logoUrl?, color? (#hex) }"
      },
      "title": {
       "type": "string",
       "description": "Friendly spec: document title"
      },
      "blocks": {
       "type": "array",
       "description": "Ordered blocks: text|heading|button|image|divider|spacer. Mutually exclusive with 'mjml'."
      },
      "preheader": {
       "type": "string",
       "description": "Friendly spec: inbox preview text"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "Responsive HTML email (text/html); 400 with details[] if MJML is invalid"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/docforge-email-generator-c221cd58/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docforge-selim.duckdns.org](https://www.zero.xyz/host/docforge-selim.duckdns.org/llms.txt)
