Add Mailbox API Endpoint Bug, "active must be a boolean"
-
Hello there,
Not sure if I'm doing something wrong but I am trying to create a Cloudron User and Mailbox programatically through the API. I have managed to create a user but when hitting the /mail/{domain}/mailboxes POST method, and sending the required body params (name, ownerId, and ownerType), I am always met with the message:
"active must be a boolean"
This is confusing because in the API spec / swagger it doesn't mention the active parameter. Also I have tried to send the active parameter in many forms in the hopes that the endpoint accept it but no luck.
API Route POST: /api/v1/mail/{my domain}/mailboxes
Am currently testing using Postman and an Auth session token from the login endpoint.
Please advise.
-
Hello there,
Not sure if I'm doing something wrong but I am trying to create a Cloudron User and Mailbox programatically through the API. I have managed to create a user but when hitting the /mail/{domain}/mailboxes POST method, and sending the required body params (name, ownerId, and ownerType), I am always met with the message:
"active must be a boolean"
This is confusing because in the API spec / swagger it doesn't mention the active parameter. Also I have tried to send the active parameter in many forms in the hopes that the endpoint accept it but no luck.
API Route POST: /api/v1/mail/{my domain}/mailboxes
Am currently testing using Postman and an Auth session token from the login endpoint.
Please advise.
-
@ramiroro the API docs are most likely a bit out of date with the recent changes. Just pass an additional field
active
set totrue
in the request. The flag indicates whether the mailbox is enabled or not. -
@girish That was the first thing I tried. The endpoint does not seem to accept the extra parameter no matter what I try.
-
@ramiroro Do you have the curl request ? Note that you have to pass
true
as boolean and not as string. -
-
G girish restored this topic on