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
activeset totruein 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
trueas boolean and not as string. -
R ramiroro deleted this topic on
-
G girish restored this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login