Zoho Mail Forwarding via API not working
Hello Zoho,
I'm trying to setup email forwarding for my users through the API (with organisation authorization)
This is my function:
def add_mail_forwarding(self, accountId, forwardedAddress, zuid):
body = {
"zuid": zuid,
"mode": "addMailForward",
"mailForward": [{"mailForwardTo": forwardedAddress}],
}
print(body)
return self.session.post(
json=body,
headers=self.headers,
)
Also, in the documentation it says that a PUT request is required, however it gives me an error with a PUT request and only seems to work with a POST request.
And I seem to need to swap the accountId and the zuid for it to 'work'
I get a status code of 200 which means success, but I don't see the email forwarding being setup in the admin panel.
Can anyone help me out here?