Email rental workflow
1. Choose a provider and service
Load providers and services & prices. Use live pcode and scode values.
2. Check availability
Refresh counts for the same provider. Omit pcode entirely for any provider; never send empty or null. A listed provider can have zero mailboxes. Counts may be cached up to 15 seconds and do not reserve stock.
3. Create the rental
Create with scode, dtype and dcount. day/week/month mean 1/7/30 days per unit. Discounts from 30 days use months_discount. A specified provider has no fallback. status=2 means no stock: refresh counts before trying again.
4. Save the order details
Keep data.id, email, pcode and expireDate. Active orders calls the address field address; expiry is a Unix timestamp in seconds.
5. Read messages
List messages using orderid, t (page size), s (offset), sq (encoded search). Empty data=[] is successful. Pass the returned message id as emailid to message body, together with its parent orderid. Treat message HTML as untrusted and sanitize it before rendering.
6. Use a Gmail alias
Gmail orders may expose aliases[].id. Buy access using this existing aliasid and parent orderid; the API does not document alias generation. Outlook does not support aliases. Alias messages still use the parent orderid. Use that order and the message id to read its body.
7. Extend or cancel
Extend when needed, then refresh active orders for expiry. Cancel does not guarantee a refund.
8. Restore an archived rental
For restoration, get the id from archive, check current cost, then restore. Cost lookup does not charge; restoration does. No custom restoration duration is accepted. Refresh active orders afterwards.
Paid requests can change account state even if their response is lost. Inspect orders and archive before repeating a timed-out purchase, alias purchase, extension or restoration.