Set Email Inbox

Prev Next
Post
/api/v1/email-inbox

Sets the email inbox for your server.

Permissions required:- manage-email-inbox

Changelog

Version Description
3.11.0-rc.0 Added
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
{
  "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
object Required

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

password
string
port
integer
secure
boolean
server
string
username
string
imap
object Required

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

Success
{
  "_id": "JdVkn_dkOlms_",
  "success": true
}
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