Set Email Inbox
    • Dark
      Light
    • PDF

    Set Email Inbox

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/email-inbox

    Sets the email inbox for your server.

    Permissions required:- manage-email-inbox

    Changelog

    VersionDescription
    3.11.0-rc.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "name": "new email",
      "email": "[email protected]",
      "active": false,
      "description": "This email has been set",
      "senderInfo": "email sender",
      "department": "awesome department",
      "smtp": {
        "password": "10fae4dc374fb87d",
        "port": 25,
        "secure": true,
        "server": "smtp.mailtrap.io",
        "username": "b5ef5safd6cb806c"
      },
      "imap": {
        "password": "10fae4374sdfb87d",
        "port": 993,
        "secure": true,
        "server": "imap.mailtrap.io",
        "username": "b5ef5aafd6cb806c"
      }
    }
    Expand All
    object
    _id
    string

    Email Id

    name
    string Required

    The name you wish to set for your email.

    email
    string Required

    The email to be used

    active
    boolean Required

    Set whether or not the email is active.

    description
    string

    The description for this entry.

    senderInfo
    string

    Sender info to be attached on outgoing emails.

    department
    string

    The department to which the email will be available.

    smtp
    objectRequired

    An object with your SMTP credentials to be used for outgoing emails.

    password
    string
    port
    integer
    secure
    boolean
    server
    string
    username
    string
    imap
    objectRequired

    An object having your IMAP credentials to be used for incomming emails.

    password
    string
    port
    integer
    secure
    boolean
    server
    string
    username
    string
    Responses
    200

    OK

    object
    _id
    string
    success
    boolean
    400

    Bad Request

    Duplicate
    {
      "success": false,
      "error": "E11000 duplicate key error index: rocketchat.rocketchat_email_inbox.$email_1 dup key: { : \"[email protected]\" }"
    }
    Invalid Inbox
    {
      "success": false,
      "error": "error-invalid-email-inbox"
    }
    object
    success
    boolean
    error
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string
    403

    Forbidden

    Permission Error
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    object
    success
    boolean
    error
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.