API Gateway Serverless Active

Mail Gateway & IMAP API

Đường dẫn API trực tiếp: Gọi thẳng endpoint không cần tiền tố /api

🚀 Danh Sách Endpoints Trực Tiếp

POST /create-mail Tạo mail Atomic PoW (gán note: "chưa tạo")
POST /readmail Đọc thư Atomic/Muse/Gmail & bóc tách OTP 6 số
GET /accounts Lấy danh sách tài khoản & thống kê note
POST /accounts Miu gửi dữ liệu sau run (Idempotency key)
PATCH /accounts Cập nhật ghi chú (chưa tạo / chưa giao / đã giao)
DELETE /accounts Xóa tài khoản theo run
GET /status Kiểm tra kết nối MongoDB Atlas & uptime
POST /getemail Quét thư Gmail qua giao thức IMAP
GET /getemaillist Lấy danh sách Gmail đã lưu
POST /addaccount Thêm tài khoản Gmail IMAP
DELETE /account Xóa tài khoản Gmail
💡 Mẹo: Hệ thống hỗ trợ cả 2 dạng: gọi trực tiếp /create-mail hoặc dùng dạng cũ /api/create-mail đều hoạt động như nhau.

⚡ Gọi Mẫu: Tạo Mail Atomic Trực Tiếp

curl -X POST https://<your-domain>/create-mail \
  -H "Content-Type: application/json" \
  -d '{"username": "myuser123"}'

📬 Gọi Mẫu: Đọc Thư Trực Tiếp

curl -X POST https://<your-domain>/readmail \
  -H "Content-Type: application/json" \
  -d '{"email": "myuser123@atomicmail.ai", "limit": 5}'