Skip to main content
PUT
/
api
/
crm
/
emailaccounts
Update EmailAccount
curl --request PUT \
  --url https://spaces.nexudus.com/api/crm/emailaccounts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": 123,
  "BusinessId": 123,
  "DisplayName": "<string>",
  "EmailAddress": "<string>",
  "IncomingServer": "<string>",
  "IncomingServerType": 123,
  "IncomingServerPort": 123,
  "IncomingServerUsername": "<string>",
  "DeleteMessageSettings": 123,
  "OutgoingServer": "<string>",
  "OutgoingServerPort": 123,
  "OutgoingServerUsername": "<string>",
  "LastMessageId": 123,
  "ErrorCount": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
Updates an existing EmailAccount record. You must include the Id of the record to update along with all required fields.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the EmailAccount-Edit role.

Enums

ValueName
1Imap
ValueName
1DontDelete
2DeleteOnReceive
3DeleteWhenDeleting

Request Body

Required Fields

Id
integer
required
The Id of the EmailAccount record to update.
BusinessId
integer
required
ID of the business linked to this record.
DisplayName
string
required
The display name value for this email account.
EmailAddress
string
required
The email address value for this email account.
IncomingServer
string
required
The incoming server value for this email account.
IncomingServerType
integer
required
The incoming server type value for this email account.
IncomingServerPort
integer
required
The incoming server port value for this email account.
IncomingServerUsername
string
required
The incoming server username value for this email account.
DeleteMessageSettings
integer
required
The delete message settings value for this email account.
OutgoingServer
string
required
The outgoing server value for this email account.
OutgoingServerPort
integer
required
The outgoing server port value for this email account.
OutgoingServerUsername
string
required
The outgoing server username value for this email account.
LastMessageId
integer
required
ID of the last message associated with this record.
ErrorCount
integer
required
The error count value for this email account.

Optional Fields

Active
boolean
Whether this email account is currently active.
SendNotificationOnNewMessages
boolean
Whether send notification on new messages is enabled.
NotificationEmailAddress
string
The notification email address value for this email account.
IncomingServerSSL
boolean
Whether incoming server ssl is enabled.
OutgoingServerSSL
boolean
Whether outgoing server ssl is enabled.
ReplyToEmail
string
The reply to email value for this email account.
LastCheckTime
string
Date/time value for last check time.
GoogleAccessToken
string
The google access token value for this email account.
Office365AccessToken
string
The office365 access token value for this email account.

Code Examples

curl -X PUT \
  "https://spaces.nexudus.com/api/crm/emailaccounts" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "DisplayName": "",
    "EmailAddress": "",
    "IncomingServer": "",
    "IncomingServerType": 0,
    "IncomingServerPort": 0,
    "IncomingServerUsername": "",
    "DeleteMessageSettings": 0,
    "OutgoingServer": "",
    "OutgoingServerPort": 0,
    "OutgoingServerUsername": "",
    "LastMessageId": 0,
    "ErrorCount": 0,
    "Id": 87654321
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the update.
Value
object
Contains the Id of the updated record.
WasSuccessful
boolean
true if the emailaccount was updated successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "EmailAccount was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "DisplayName: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "DisplayName"
    }
  ],
  "WasSuccessful": false
}