Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Add Mailbox API Endpoint Bug, "active must be a boolean"

Add Mailbox API Endpoint Bug, "active must be a boolean"

Scheduled Pinned Locked Moved Solved Support
apimail
5 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      R Offline
      ramiroro
      wrote on last edited by girish
      #1

      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.

      girishG 1 Reply Last reply
      0
      • R ramiroro

        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.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @ramiroro the API docs are most likely a bit out of date with the recent changes. Just pass an additional field active set to true in the request. The flag indicates whether the mailbox is enabled or not.

        R 1 Reply Last reply
        0
        • girishG girish

          @ramiroro the API docs are most likely a bit out of date with the recent changes. Just pass an additional field active set to true in the request. The flag indicates whether the mailbox is enabled or not.

          R Offline
          R Offline
          ramiroro
          wrote on last edited by
          #3

          @girish That was the first thing I tried. The endpoint does not seem to accept the extra parameter no matter what I try.

          girishG 1 Reply Last reply
          0
          • R ramiroro

            @girish That was the first thing I tried. The endpoint does not seem to accept the extra parameter no matter what I try.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            @ramiroro Do you have the curl request ? Note that you have to pass true as boolean and not as string.

            R 1 Reply Last reply
            0
            • girishG girish

              @ramiroro Do you have the curl request ? Note that you have to pass true as boolean and not as string.

              R Offline
              R Offline
              ramiroro
              wrote on last edited by
              #5

              @girish ah alright, that sent me down the right path. needed to switch from encoded body to raw JSON and that cleared it up. thank you!

              1 Reply Last reply
              0
              • R ramiroro deleted this topic on
              • girishG girish restored this topic on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search