Good one. And probably others like this exist. So an API of some kind would be useful for you, but also likely don't need overnight/expedited delivery and would want to have much closer to regular letter postage costs.
Not knocking the idea, just hoping to help narrow the question of "who needs this?"