Less Annoying CRM logo Less Annoying CRM LACRM
Core API Functions

Emails

Emails can be stored in the CRM via the Email Logging feature, which associates them with contacts in your CRM.

Create an email

This function creates a single email.

How to call this function
Function name
CreateEmail
Parameters
ContactIds Array of Uids Required

Ids of contacts to log email on.

UserIsSender Bool Default: false

Whether the email was sent by the user (as opposed to sent to the user). If this is false, the email will save as being sent by the contact where it was logged.

From Object Required

Object containing sender's email address and name.

To Array of objects Required

Array of recipients containing their email address and name.

Each item in the array should be an object with the following fields:
Address Text Required

Recipient's email address.

Name Text

Recipient's email display name.

Array of Cc'd recipients containing their email address and name.

Each item in the array should be an object with the following fields:
Address Text Required

Cc'd recipient's email address.

Name Text

Cc'd recipient's email display name.

Subject Text

Subject of the email.

Body Text Required

Body of the email.

Date DateTime Required

Id of the email to get.

Response
{
"EmailId": "4000135510430352165956921653463"
}

Get email

This function gets a single email.

How to call this function
Function name
GetEmail
Parameters
EmailId Uid Required

The Id for the email you want to get.

Response
{
"EmailId": "4000135510432658008966135785614",
"ContactIds": [
"4000135510432658008966136838544",
"4000135510432658008966135152987",
"4000135510432658008966135092230"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-12-21T03:57:24-08:00",
"UserId": "4000135510434963851975349022552"
}

List emails

This function gets a list of all emails logged in your CRM. This list can be filtered down using the parameters provided. If you're just looking for a specific contact's emails, check out GetEmailsAttachedToContact.

How to call this function
Function name
GetEmails
Parameters
SortDirection Enum Default: Descending
Valid options: Ascending, Descending

The list of emails will be sorted by date - you can specify this parameter to set ascending or descending sorting.

DateFilterStart DateTime Default: NULL

If specified, will only return emails created after the given date & time. Must be used in combination with DateFilterEnd.

DateFilterEnd DateTime Default: NULL

If specified, will only return emails created before the given date & time. Must be used in combination with DateFilterStart.

UserFilter Array of Uids Default: []

Filters list based on given UserIds.

ContactId Uid

Filters list by the given ContactId - only emails attached to that contact will be shown, if specified.

GetContactsAtCompanyEmails Bool Default: false

If ContactId is set and is a company, specifying this parameter will also return emails from contacts that work at this company.

MaxNumberOfResults Number Default: 500

How many results should be returned from a single API call? The max value is 10,000. If you need to return more results, call this API function again, but increment the Page parameter.

Page Number Default: 1

If there are more results than MaxNumberOfResults, you can call this function again with an incremented Page value to get the next page of results. For example, if there are 700 results, but you're only requesting 500 at a time, you could call this function with Page=2 to get the remaining 200 results.

Response
{
"HasMoreResults": false,
"Results": [
{
"EmailId": "4000135510437269694984564123364",
"ContactIds": [
"4000135510437269694984563086534",
"4000135510437269694984563064346",
"4000135510439575537993777282040"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-12-21T03:57:24-08:00",
"UserId": "4000135510439575537993776680800"
},
{...},
{...}
]
}

Get contact emails

Returns all emails attached to a contact.

How to call this function
Function name
GetEmailsAttachedToContact
Parameters
ContactId Uid Required

The contact to get emails for.

MaxNumberOfResults Number Default: 500

How many results should be returned from a single API call? The max value is 10,000. If you need to return more results, call this API function again, but increment the Page parameter.

Page Number Default: 1

If there are more results than MaxNumberOfResults, you can call this function again with an incremented Page value to get the next page of results. For example, if there are 700 results, but you're only requesting 500 at a time, you could call this function with Page=2 to get the remaining 200 results.

Response
{
"HasMoreResults": false,
"Results": [
{
"EmailId": "4000135510441881381002990237703",
"ContactIds": [
"4000135510441881381002990109513",
"4000135510441881381002991099477",
"4000135510441881381002991869307"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-12-21T03:57:24-08:00",
"UserId": "4000135510444187224012203759798"
},
{...},
{...}
]
}

Delete email

This function deletes an email from a contact's profile.

How to call this function
Function name
DeleteEmail
Parameters
EmailId Uid Required

The Id for the email you want to delete.

Response
This function doesn't return anything. If there's no error message returned, that means the call was completed successfully.