Reference

Emailaccount

The emailaccount object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this emailaccount
Active: bool optional
BusinessId: Id required
DeleteMessageSettings: Nexudus.Coworking.Core.Enums.eMessageDeletionPolicy optional
DisplayName: string required
EmailAddress: string required
IncomingServer: string required
IncomingServerPassword: string optional
IncomingServerPort: int required
IncomingServerSSL: bool optional
IncomingServerType: Nexudus.Coworking.Core.Enums.eEmailServerType optional
IncomingServerUsername: string required
NotificationEmailAddress: string optional
OutgoingServer: string required
OutgoingServerPassword: string optional
OutgoingServerPort: int required
OutgoingServerSSL: bool optional
OutgoingServerUsername: string required
ReplyToEmail: string optional
SendNotificationOnNewMessages: bool optional
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this emailaccount
SystemId: string optional api-only
User defined data about this emailaccount. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "Active": false,
  "BusinessId": 12345678,
  "DeleteMessageSettings": 1,
  "DisplayName": "Joe",
  "EmailAddress": "joe@example.com",
  "IncomingServer": "mail.example.com",
  "IncomingServerPassword": "password",
  "IncomingServerPort": ,
  "IncomingServerSSL": false,
  "IncomingServerType": 1,
  "IncomingServerUsername": "username",
  "NotificationEmailAddress": "joe@example.com",
  "OutgoingServer": "mail.example.com",
  "OutgoingServerPassword": "password",
  "OutgoingServerPort": ,
  "OutgoingServerSSL": false,
  "OutgoingServerUsername": "username",
  "ReplyToEmail": "mail.example.com",
  "SendNotificationOnNewMessages": false,
  "UniqueId": "495a1a04-9e06-4ec3-a6de-c7eea83aa8cb",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a EmailAccount

This endpoint allows you to GET a list of emailaccounts based on one or more filter querystring parameters.

GET https://spaces.nexudus.com/api/crm/emailaccounts?...

πŸ”’ Requires role "EmailAccount-List"

Pagination querystring parameters
Lets control how many records to return at a time and their order.
page integer optional
?page=1
size integer optional default=25
Sets the maximum number of records to return each page of results.
?size=25
orderby string optional default=Id
Sets the property to use when ordering the results of the search.
?orderby=Id
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records.
?sort=ascending

Search querystring parameters
Lets you search emailaccount records based on their different properties.
Id number
?Id=12345678
EmailAccount_Active bool
?EmailAccount_Active=...
EmailAccount_Business Business
?EmailAccount_Business=...
EmailAccount_DeleteMessageSettings Nexudus.Coworking.Core.Enums.eMessageDeletionPolicy
?EmailAccount_DeleteMessageSettings=...
EmailAccount_DisplayName string
?EmailAccount_DisplayName=...
EmailAccount_EmailAddress string
?EmailAccount_EmailAddress=...
EmailAccount_IncomingServer string
?EmailAccount_IncomingServer=...
EmailAccount_IncomingServerPassword string
?EmailAccount_IncomingServerPassword=...
EmailAccount_IncomingServerPort int
?EmailAccount_IncomingServerPort=...
EmailAccount_IncomingServerSSL bool
?EmailAccount_IncomingServerSSL=...
EmailAccount_IncomingServerType Nexudus.Coworking.Core.Enums.eEmailServerType
?EmailAccount_IncomingServerType=...
EmailAccount_IncomingServerUsername string
?EmailAccount_IncomingServerUsername=...
EmailAccount_NotificationEmailAddress string
?EmailAccount_NotificationEmailAddress=...
EmailAccount_OutgoingServer string
?EmailAccount_OutgoingServer=...
EmailAccount_OutgoingServerPassword string
?EmailAccount_OutgoingServerPassword=...
EmailAccount_OutgoingServerPort int
?EmailAccount_OutgoingServerPort=...
EmailAccount_OutgoingServerSSL bool
?EmailAccount_OutgoingServerSSL=...
EmailAccount_OutgoingServerUsername string
?EmailAccount_OutgoingServerUsername=...
EmailAccount_ReplyToEmail string
?EmailAccount_ReplyToEmail=...
EmailAccount_SendNotificationOnNewMessages bool
?EmailAccount_SendNotificationOnNewMessages=...

Range search querystring parameters
Lets you search emailaccount records based on a range of date or numeric values.
To_EmailAccount_CreatedOn date
?To_EmailAccount_CreatedOn=2010-01-01T20:32
From_EmailAccount_CreatedOn date
?From_EmailAccount_CreatedOn=2010-01-01T20:32
To_EmailAccount_UpdatedOn date
?To_EmailAccount_UpdatedOn=2010-01-01T20:32
From_EmailAccount_UpdatedOn date
?From_EmailAccount_UpdatedOn=2010-01-01T20:32
To_EmailAccount_IncomingServerPort number
?To_EmailAccount_IncomingServerPort=0
From_EmailAccount_IncomingServerPort number
?From_EmailAccount_IncomingServerPort=10
To_EmailAccount_OutgoingServerPort number
?To_EmailAccount_OutgoingServerPort=0
From_EmailAccount_OutgoingServerPort number
?From_EmailAccount_OutgoingServerPort=10

Example request

GET https://spaces.nexudus.com/api/crm/emailaccounts?EmailAccount_DisplayName=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "DisplayName": "Joe",
        "EmailAddress": "joe@example.com",
        "Active": false,
        "SendNotificationOnNewMessages": false,
        "NotificationEmailAddress": "joe@example.com",
        "IncomingServer": "mail.example.com",
        "IncomingServerType": 1,
        "IncomingServerPort": ,
        "IncomingServerSSL": false,
        "IncomingServerUsername": "username",
        "IncomingServerPassword": "password",
        "DeleteMessageSettings": 1,
        "OutgoingServer": "mail.example.com",
        "OutgoingServerPort": ,
        "OutgoingServerSSL": false,
        "OutgoingServerUsername": "username",
        "OutgoingServerPassword": "password",
        "ReplyToEmail": "mail.example.com",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "8b319c16-508d-4f37-86aa-c5d97ca78490",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 25,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 60,
    "TotalPages": 3
}


Find EmailAccounts by IDs

Gets one or more emailaccount records based on their Id.
GET https://spaces.nexudus.com/api/crm/emailaccounts?EmailAccount_Id=[:id1,:id2,...]

πŸ”’ Requires role "EmailAccount-List"

Querystring parameters
EmailAccount_Id: array requried
?EmailAccount_Id=[12345678,87654651]

Example request

GET https://spaces.nexudus.com/api/crm/emailaccounts?EmailAccount_Id=[1234567,9876541]
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "DisplayName": "Joe",
        "EmailAddress": "joe@example.com",
        "Active": false,
        "SendNotificationOnNewMessages": false,
        "NotificationEmailAddress": "joe@example.com",
        "IncomingServer": "mail.example.com",
        "IncomingServerType": 1,
        "IncomingServerPort": ,
        "IncomingServerSSL": false,
        "IncomingServerUsername": "username",
        "IncomingServerPassword": "password",
        "DeleteMessageSettings": 1,
        "OutgoingServer": "mail.example.com",
        "OutgoingServerPort": ,
        "OutgoingServerSSL": false,
        "OutgoingServerUsername": "username",
        "OutgoingServerPassword": "password",
        "ReplyToEmail": "mail.example.com",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "66231011-33ad-45fc-8b04-a579102bb47c",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single EmailAccount by Id

Gets one emailaccount record by its Id.
GET https://spaces.nexudus.com/api/crm/emailaccounts/:Id

πŸ”’ Requires role "EmailAccount-Read"

URL parameters
Id: number requried

Example request

GET https://spaces.nexudus.com/api/crm/emailaccounts/1234567
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
  "Id": 1234567,
  "Active": false,
  "BusinessId": 12345678,
  "DeleteMessageSettings": 1,
  "DisplayName": "Joe",
  "EmailAddress": "joe@example.com",
  "IncomingServer": "mail.example.com",
  "IncomingServerPassword": "password",
  "IncomingServerPort": ,
  "IncomingServerSSL": false,
  "IncomingServerType": 1,
  "IncomingServerUsername": "username",
  "NotificationEmailAddress": "joe@example.com",
  "OutgoingServer": "mail.example.com",
  "OutgoingServerPassword": "password",
  "OutgoingServerPort": ,
  "OutgoingServerSSL": false,
  "OutgoingServerUsername": "username",
  "ReplyToEmail": "mail.example.com",
  "SendNotificationOnNewMessages": false,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "083bc6d8-9f05-4092-b11d-27c086e2de40",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new EmailAccount

Creates a new emailaccount.
POST https://spaces.nexudus.com/api/crm/emailaccounts

πŸ”’ Requires role "EmailAccount-Create"

Body parameters
BusinessId: number required
DisplayName: string required
EmailAddress: string required
Active: bool optional
SendNotificationOnNewMessages: bool optional
NotificationEmailAddress: string optional
IncomingServer: string required
IncomingServerType: Nexudus.Coworking.Core.Enums.eEmailServerType optional
IncomingServerPort: int required
IncomingServerSSL: bool optional
IncomingServerUsername: string required
IncomingServerPassword: string optional
DeleteMessageSettings: Nexudus.Coworking.Core.Enums.eMessageDeletionPolicy optional
OutgoingServer: string required
OutgoingServerPort: int required
OutgoingServerSSL: bool optional
OutgoingServerUsername: string required
OutgoingServerPassword: string optional
ReplyToEmail: string optional

Example request

POST https://spaces.nexudus.com/api/crm/emailaccounts
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "BusinessId": 12345678,
    "DisplayName": "Joe",
    "EmailAddress": "joe@example.com",
    "Active": false,
    "SendNotificationOnNewMessages": false,
    "NotificationEmailAddress": "joe@example.com",
    "IncomingServer": "mail.example.com",
    "IncomingServerType": 1, //(check Enumerated values section below)
    "IncomingServerPort": ,
    "IncomingServerSSL": false,
    "IncomingServerUsername": "username",
    "IncomingServerPassword": "password",
    "DeleteMessageSettings": 1, //(check Enumerated values section below)
    "OutgoingServer": "mail.example.com",
    "OutgoingServerPort": ,
    "OutgoingServerSSL": false,
    "OutgoingServerUsername": "username",
    "OutgoingServerPassword": "password",
    "ReplyToEmail": "mail.example.com",
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully created.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Update EmailAccount

Updates an existing emailaccount.
PUT https://spaces.nexudus.com/api/crm/emailaccounts

PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.

πŸ”’ Requires role "EmailAccount-Edit"

Body parameters
Id: number required
The unique Id of the emailaccount to update.
BusinessId: number cleared if missing
DisplayName: string cleared if missing
EmailAddress: string cleared if missing
Active: bool cleared if missing
SendNotificationOnNewMessages: bool cleared if missing
NotificationEmailAddress: string cleared if missing
IncomingServer: string cleared if missing
IncomingServerType: Nexudus.Coworking.Core.Enums.eEmailServerType cleared if missing
IncomingServerPort: int cleared if missing
IncomingServerSSL: bool cleared if missing
IncomingServerUsername: string cleared if missing
IncomingServerPassword: string cleared if missing
DeleteMessageSettings: Nexudus.Coworking.Core.Enums.eMessageDeletionPolicy cleared if missing
OutgoingServer: string cleared if missing
OutgoingServerPort: int cleared if missing
OutgoingServerSSL: bool cleared if missing
OutgoingServerUsername: string cleared if missing
OutgoingServerPassword: string cleared if missing
ReplyToEmail: string cleared if missing

Example request

PUT https://spaces.nexudus.com/api/crm/emailaccounts
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "Id": 12345678,
    "BusinessId": 12345678,
    "DisplayName": "Joe",
    "EmailAddress": "joe@example.com",
    "Active": false,
    "SendNotificationOnNewMessages": false,
    "NotificationEmailAddress": "joe@example.com",
    "IncomingServer": "mail.example.com",
    "IncomingServerType": 1, //(check Enumerated values section below)
    "IncomingServerPort": ,
    "IncomingServerSSL": false,
    "IncomingServerUsername": "username",
    "IncomingServerPassword": "password",
    "DeleteMessageSettings": 1, //(check Enumerated values section below)
    "OutgoingServer": "mail.example.com",
    "OutgoingServerPort": ,
    "OutgoingServerSSL": false,
    "OutgoingServerUsername": "username",
    "OutgoingServerPassword": "password",
    "ReplyToEmail": "mail.example.com",
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully updated.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Delete EmailAccount

Deletes an existing emailaccount by its Id.
DELETE https://spaces.nexudus.com/api/crm/emailaccounts/:Id

πŸ”’ Requires role "EmailAccount-Delete"

URL parameters
Id: number required
The unique Id of the emailaccount to update.

Example request

DELETE https://spaces.nexudus.com/api/crm/emailaccounts/12345678
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record was deleted successfully.",
    "Value": null,
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}


Commands

Commands allow to perform actions against one or more emailaccount records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.

Get Commands

Get all commands available to run for emailaccount records.
GET https://spaces.nexudus.com/api/crm/emailaccounts/commands

Example request

GET https://spaces.nexudus.com/api/crm/emailaccounts/commands
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


[
	{
		"Key": "COMMAND_KEY_1",
		"Name": "Command 1 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": false,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": false,
		"NeedsEntitiesToRun": true,
		"Order": 2,
		"RequiresParameters": []
	},
	{
		"Key": "COMMAND_KEY_2",
		"Name": "Command 2 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": true,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": true,
		"NeedsEntitiesToRun": true,
		"Order": 10,
		"RequiresParameters": 
		[
			{
				"Name": "Parameter 1 description",
				"Type": "string",
			},
			{
				"Name": "Parameter 2 description",
				"Type": "Boolean",
			}
		]
	},
	...
]


Run Command

Runs a command based on its Key and one or more emailaccount record IDs.
POST https://spaces.nexudus.com/api/crm/emailaccounts/runacommand
πŸ”’ Requires role "EmailAccount-Edit"

Example request

POST https://spaces.nexudus.com/api/crm/emailaccounts/runcommand
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
	"Ids":[1329961649],
	"Parameters": 
	[
		{ 
			"Type": "string"
			"Value":987654321
		},
		{
			"Type": "Boolean",
			"Value":true
		},
		...
	],
	"Key":"COMMAND_KEY_2"
}


Example valid response


{
	"Errors": null
	"JavaScript": null
	"Message": "Result description"
	"OpenInDialog": false
	"OpenInWindow": false
	"RedirectURL": null
	"Status": 200
	"UpdatedBy": "email@example.net"
	"UpdatedOn: "2020-06-04T11:40:20Z"
	"Value: {Id: 12345678}
	"WasSuccessful: true
}


Enumerated values

IncomingServerType

GET /api/utils/enums?name=eEmailServerType

DeleteMessageSettings

GET /api/utils/enums?name=eMessageDeletionPolicy

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.