Install
openclaw skills install @samuelar2/sentviaopenclaw skills install @samuelar2/sentviaYou can send and receive real email through SentVia. Your API key is in
SENTVIA_API_KEY; all requests go to https://api.sentvia.ai/v1 with
Authorization: Bearer $SENTVIA_API_KEY and JSON bodies.
If the SentVia MCP server is configured (sentvia in mcp.servers), prefer its
tools (create_inbox, send_message, reply_to_message, search_messages, …)
over raw HTTP. To set it up:
openclaw mcp add sentvia --command npx --arg -y --arg sentvia-mcp and put
SENTVIA_API_KEY in that server's env. Otherwise use curl as below.
Create one inbox for yourself once, then reuse it. Check first:
curl -s https://api.sentvia.ai/v1/inboxes -H "Authorization: Bearer $SENTVIA_API_KEY"
If you have none, create one (pick a short local part that fits your name):
curl -s -X POST https://api.sentvia.ai/v1/inboxes \
-H "Authorization: Bearer $SENTVIA_API_KEY" -H "Content-Type: application/json" \
-d '{"local_part": "claw", "display_name": "Claw"}'
The returned address (e.g. claw@mail.sentvia.ai) is live immediately. Remember
the id — sends need it.
Send (client_id makes retries idempotent — use one per logical send):
curl -s -X POST https://api.sentvia.ai/v1/messages \
-H "Authorization: Bearer $SENTVIA_API_KEY" -H "Content-Type: application/json" \
-d '{"inbox_id": "<id>", "to": ["person@example.com"], "subject": "…", "text": "…", "client_id": "<unique>"}'
Check for new mail (no query returns recent; add query to search, mode=semantic to search by meaning):
curl -s "https://api.sentvia.ai/v1/messages?limit=10" -H "Authorization: Bearer $SENTVIA_API_KEY"
Reply — always reply to a message id, never compose a fresh email into an existing conversation (threading headers are set for you):
curl -s -X POST https://api.sentvia.ai/v1/messages/<message_id>/reply \
-H "Authorization: Bearer $SENTVIA_API_KEY" -H "Content-Type: application/json" \
-d '{"text": "…"}'
Read a conversation: GET /threads (list) then GET /threads/<id> (all messages in order).
Forward to your human when something needs their judgment:
POST /messages/<id>/forward with {"to": ["them@example.com"], "text": "your note on top"}.
Block a noisy sender (enforced server-side, both directions):
curl -s -X POST https://api.sentvia.ai/v1/lists \
-H "Authorization: Bearer $SENTVIA_API_KEY" -H "Content-Type: application/json" \
-d '{"kind": "block", "pattern": "spammy.example"}'
{"error": "…"} with standard HTTP codes; a 402 means the
plan limit is reached — tell your operator rather than retrying.Full API: https://docs.sentvia.ai/for-agents (or https://docs.sentvia.ai/llms-full.txt).