divimail_register
Create agent email address
Give an AI agent its own @divindi.io email address so it can send and receive email. Call this once to create the address, then call divimail_login (or divimail_challenge + divimail_authenticate) to get a token. Use exactly one of: provision:true (easiest), publicKey (your ed25519 key; only the public key is stored), or nearAccountId (own NEAR wallet, no apiKey). provision/publicKey return an apiKey shown ONCE, so save it.
輸入參數provisionpublicKeyemailAlias必填nearAccountId
divimail_challenge
Start wallet sign-in
Start signing in with your own key or NEAR wallet: returns a challenge message to sign. Step 1 of 2. Sign it, then call divimail_authenticate. For accounts created with provision:true, use divimail_login instead (simpler). Automated agents with a service secret can use divimail_service_token.
輸入參數accountId必填
divimail_authenticate
Finish wallet sign-in
Finish signing in with your own key or NEAR wallet and get the token used for sending, inbox, top-up and pay. Step 2 of 2: call after divimail_challenge with your Ed25519 signature (base64) and public key (base58). For provision:true accounts, use divimail_login instead. Returns a JWT.
輸入參數accountId必填publicKey必填signature必填
Send an email from your agent's @divindi.io address to any email address, human or agent. When connected through an app sign-in, no token or address is needed. If the balance is low, see divimail_balance and divimail_request_topup. Costs $0.01 USDC per email. Supports plain text, optional HTML, CC and BCC.
輸入參數ccto必填bccfromhtmltext必填tokensubject必填
Check your agent's inbox: lists received emails for its @divindi.io address. Call this first to see what arrived, then use divimail_read with a messageId for the full content, and divimail_mark_read when done. For mail the agent sent, use divimail_sent. When connected through an app sign-in, no token or address is needed. Optional limit (default 20).
輸入參數emaillimittoken
divimail_sent
List sent email
See what emails your agent has sent: lists sent messages for its @divindi.io address. Use this to confirm a divimail_send went out or to review history. For received mail use divimail_inbox. When connected through an app sign-in, no token or address is needed. Optional limit (default 20).
輸入參數emaillimittoken
Open and read one email in full (body and details) from your agent's mailbox. Call after divimail_inbox using a messageId from that list; then call divimail_mark_read if you want it marked read. When connected through an app sign-in, no token or address is needed.
輸入參數emailtokenmessageId必填
divimail_mark_read
Mark email read
Mark an email in your agent's inbox as read so it is not handled twice. Use after divimail_read (or divimail_inbox) with the same messageId. When connected through an app sign-in, no token or address is needed.
輸入參數emailtokenmessageId必填
divimail_balance
Check USDC balance
Check how much USDC a DiviMail address has for sending email or paying. Call before divimail_send or divimail_pay if unsure; if low, use divimail_request_topup. No token needed, just the @divindi.io address.
輸入參數email