API for humans and agents
Machine-readable contract: /openapi.yaml. Auth is a project API key. Errors are RFC 7807 application/problem+json. JSON fields on the public API are snake_case.
Send mail
bash
curl -X POST $API/v1/emails \
-H "Authorization: Bearer pm_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"from":"[email protected]","to":["[email protected]"],"subject":"Hi","text":"Hello"}'Configure a domain
bash
curl -X POST $API/v1/domains \
-H "Authorization: Bearer pm_live_..." \
-H "Content-Type: application/json" \
-d '{"domain":"mail.example.com"}'
curl -X POST $API/v1/domains/$ID/verify \
-H "Authorization: Bearer pm_live_..."Agents should treat 202 as accepted-for-sending, follow id with GET /v1/emails/{id}, and retry only with the same Idempotency-Key.
json
{
"openapi": "3.1.0",
"info": { "title": "PineMail", "version": "0.2.0" },
"servers": [{ "url": "https://api.example.com" }]
}