← Back to Taskmill

For AI agents and developers

Taskmill Email Verification Service

Machine-readable discovery and integration notes for Service #001: pay-per-use email verification over HTTP or MCP. Discovery is free; verification is an x402 V2 paid operation.

Current status: the paid pipeline is implemented and tested against a mock facilitator, but no real transactions have occurred yet (0). Live use still requires the owner's Base receiving address and facilitator configuration.

Start here

Free discovery endpoints

GET /health

Returns liveness plus the service version, x402 version, network, test-mode flag, payment configuration status, and pending-ledger count.

GET /.well-known/x402.json

Returns machine-readable resources, HTTP and MCP surfaces, exact pricing, x402 version, and whether the deployment is in test mode or missing payment configuration.

Agents should treat the live discovery response as the source of truth for the resource URL, amount, asset, network, and receiving address.

HTTP API

Verify an email over REST

Send the verification request to the paid endpoint. The request body must include a non-empty email; the documented basic shape is {"email":"...","smtp_check":false}.

POST /api/v1/verify_email
Content-Type: application/json

{"email":"person@example.com","smtp_check":false}
400

Malformed JSON, missing email, or invalid fields.

402

No payment yet. Read the base64 V2 envelope in PAYMENT-REQUIRED.

200

Verification result after payment verifies, settles, and fulfills; read PAYMENT-RESPONSE for settlement details.

MCP

Use the streamable-HTTP server

MCP is served at POST /mcp. JSON-RPC initialize, tools/list, and ping are free. The verify_email tool is paid when called through tools/call.

POST /mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {}
}

Call tools/list to inspect the tool schema. An unpaidtools/call returns an error tool result with the base64 x402 V2 offer in _meta["x402/payment-required"].

POST /mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "verify_email",
    "arguments": { "email": "person@example.com" },
    "_meta": {
      "x402/payment": "<x402 V2 PaymentPayload>"
    }
  }
}

The payment value in params._meta["x402/payment"] is the x402 V2 PaymentPayload object. A successful call returns structured content and the settlement receipt in_meta["x402/payment-response"].

Payments

x402 V2 flow

  1. Discover the resource and offer through the well-known document, MCP tools/list, or an unpaid call.
  2. Make the initial request. The service responds with HTTP402 Payment Required and a base64 JSONPAYMENT-REQUIRED envelope.
  3. Sign a matching x402 V2 PaymentPayload (including the EIP-3009 authorization and EIP-712 signature), then retry with the base64 JSON in PAYMENT-SIGNATURE and the original request body.
  4. The configured facilitator verifies and settles the payment. Only after settlement does the service run email verification and return HTTP 200 with a base64 V2 SettlementResponse inPAYMENT-RESPONSE.

The exact offer includes scheme: exact, the CAIP-2 network, atomic amount, asset, receiving address, and timeout. Do not construct those values from this page; use the current service response.

Pricing and configuration

Default Base pricing

Price
PRICE_ATOMIC=10000 (10,000 atomic units)
$0.01 USDC at 6 decimals
Network
eip155:8453
Base
Default USDC asset
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
Scheme
exact
x402 V2

These are the service defaults. A deployment can expose configured values through its discovery response; agents must follow that offer.

Important

Test mode is not production

When PAY_TO_EVM is unset, the service emits an explicit test-mode envelope using the zero-address burn value andextensions.x402TestMode. Do not send real funds to that envelope. This is protocol testing only.

When the facilitator is not configured, a structurally valid signed retry returns honest HTTP 501 witherror.code: payment_not_configured. It does not fabricate a paid 200 result.

A live transaction requires the owner's Base receiving address (PAY_TO_EVM) plus facilitator base URL and credentials that can verify and settle on eip155:8453. No real transactions have been recorded yet (0).

Reliability

Replay-safety notes

  • The service keys payments by payer and EIP-3009 nonce and persists its ledger in .run/ledger.jsonl.
  • A served replay returns the cached result and is not settled again.
  • A pending settlement returns 409 x402_settlement_pending; do not pay again. Retry later with the same payment.
  • Reusing a nonce for a different payment returns409 x402_nonce_reused; create a fresh payment with a new nonce.