Fumagally, well this is possible (via a few methods).
The params for passwdpop are as follows:
my ( $email, $passwd, $quota, $domain, $quiet ) = @_;
So, if you wanted to change a user's password (for email@example.com) via the API you would do the following:
or via the xml-api class:
$xmlapi = new xmlapi($ip);
$xmlapi->api1_query($account, "Email", "passwdpop", array("testemail", $newpass, 0, "cptest.com"));
There are other ways to do this.. but this is the only one that has a guarantee of always working. I should also note that in the api1_query I pass a quota of zero. If this is called via the webmail interface, this will not change the quota (this is enforced in the email module).