App Mail Records

Get an email record

Returns the metadata of a logged email: the entity it is linked to, subject, sender, To/Cc/Bcc recipients, plain-text body, attachments (as document references) and the sizes of the stored EML and HTML files. Use the EML and HTML download-link operations to get the full message.

The record is looked up within the caller's tenant, and the caller must also be allowed to access the entity the email is linked to (employer, customer, lead, workflow or meeting, checked in that order); otherwise that entity's access check rejects the request.

Errors: 400 if id is missing or not a UUID; 404 if the record does not exist in the caller's tenant.

get/appmail/{id}

Request

  • Base URL
    https://api.surense.com/api/v1
  • URL
    https://api.surense.com/api/v1/appmail/{id}
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://api.surense.com/oauth/token

Path parameters

idstring uuid required

Email record ID (UUID).

Response

The email record.

tenantIdstring uuid
createdDatestring date-time
createdBystring uuid
creatorNamestring
lastModifiedDatestring date-time
lastModifiedBystring uuid
versioninteger
idstring uuid

Email record ID.

employerIdstring uuid

Employer the email is linked to, if any.

customerIdstring uuid

Customer the email is linked to, if any.

leadIdstring uuid

Lead the email is linked to, if any.

workflowIdstring uuid

Workflow the email is linked to, if any.

meetingIdstring uuid

Meeting the email is linked to, if any.

plainContentstring

Plain-text body of the email.

subjectstring

Email subject.

fromPersonalstring

Display name of the sender.

fromAddressstring

Email address of the sender.

emlSizeinteger

Size of the stored EML file, in bytes.

htmlSizeinteger

Size of the stored HTML file, in bytes.

providerstring

Provider of the connected mailbox the email was sent from through Direct Send; null for any other email.

providerMessageIdstring

The provider's own ID of the sent email, when the provider named one.

providerWebLinkstring

Link opening the sent email in the provider's web client (Outlook only).

Example response

{
  "id": "9b1d4e72-5c3a-4f8b-a6e2-7d0c1b9f3e45",
  "employerId": "0d7e3a92-1f4b-4c8e-b6a5-9e2c7f1d4b38",
  "customerId": "3f2b8c1e-6d4a-4b7e-9a51-2c8e7f0d1a93",
  "leadId": "7c5a1e3b-9d2f-4a68-8b0e-4f6d2a9c1e57",
  "workflowId": "e2b9f4d6-3a1c-4e75-9f08-6b4d1c7a3e92",
  "meetingId": "4a8c2e6f-0b3d-4f19-a7c5-2e9b6d0f4a31",
  "plainContent": "Hello, attached is the renewal offer for your car insurance policy.",
  "subject": "Car insurance renewal offer",
  "fromPersonal": "Dana Levi",
  "fromAddress": "dana@example-agency.co.il",
  "emlSize": 48213,
  "htmlSize": 15872,
  "provider": "gmail"
}

Changes

No recorded changes to this operation across all 1 revision of this API.