I understand you want to update the user app_metadata.credit_left attribute via the post request. The endpoint for updating the app_metadata requires the user_id. If the info is missing in the function, it will return the not found error.
Here is what the sample scripts look like:
var params = { id: USER_ID };
var metadata = {
foo: 'bar'
};
management.updateAppMetadata(params, metadata, function (err, user) {
if (err) {
// Handle error.
}
// Updated user.
console.log(user);
});