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.

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": "3952698457157257357676402043064",
"ContactIds": [
"3952698457157257357676400930011",
"3952698457159563200685613792439",
"3952698457159563200685614438226"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-04-27T02:21:41-07:00",
"UserId": "3952698457159563200685614485170"
}

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": "3952698457168786572722468762759",
"ContactIds": [
"3952698457168786572722469666438",
"3952698457168786572722469256991",
"3952698457168786572722470172546"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-04-27T02:21:41-07:00",
"UserId": "3952698457171092415731683394393"
},
{...},
{...}
]
}

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": "3952698457178009944759323687124",
"ContactIds": [
"3952698457178009944759325368514",
"3952698457178009944759323552871",
"3952698457180315787768538566279"
],
"ContactMetaData": [
{
"Name": "John Doe",
"AssignedTo": "123456"
},
{...},
{...}
]
"From": {
"Address": "",
"Name": ""
}
"To": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Cc": [
{
"Address": "",
"Name": ""
},
{...},
{...}
]
"Subject": "",
"Body": "",
"Date": "2024-04-27T02:21:41-07:00",
"UserId": "3952698457180315787768538614465"
},
{...},
{...}
]
}

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.