---
title: "Get an email record"
method: GET
path: "/appmail/{id}"
tags: ["App Mail Records"]
---

# Get an email record

`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`

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.

## Path parameters

- `id` string, uuid, required

## Response `200`

The email record.

- AppMailValue: An email logged as an activity on exactly one parent entity (employer, customer, lead, workflow or meeting).
  - `tenantId` string, uuid
  - `createdDate` string, date-time
  - `createdBy` string, uuid
  - `creatorName` string
  - `lastModifiedDate` string, date-time
  - `lastModifiedBy` string, uuid
  - `version` integer
  - `id` string, uuid: Email record ID.
  - `employerId` string, uuid: Employer the email is linked to, if any.
  - `customerId` string, uuid: Customer the email is linked to, if any.
  - `leadId` string, uuid: Lead the email is linked to, if any.
  - `workflowId` string, uuid: Workflow the email is linked to, if any.
  - `meetingId` string, uuid: Meeting the email is linked to, if any.
  - `plainContent` string: Plain-text body of the email.
  - `subject` string: Email subject.
  - `fromPersonal` string: Display name of the sender.
  - `fromAddress` string: Email address of the sender.
  - `to` InternetAddress[]: To recipients.
    - `personal` string
    - `address` string
    - `fullAddress` string
  - `cc` InternetAddress[]: Cc recipients.
    - `personal` string
    - `address` string
    - `fullAddress` string
  - `bcc` InternetAddress[]: Bcc recipients.
    - `personal` string
    - `address` string
    - `fullAddress` string
  - `attachments` AppMailAttachment[]: Attachments, each stored as a document.
    - `documentId` string, uuid
    - `documentName` string
  - `emlSize` integer: Size of the stored EML file, in bytes.
  - `htmlSize` integer: Size of the stored HTML file, in bytes.
  - `provider` string: Provider of the connected mailbox the email was sent from through Direct Send; null for any other email.
  - `providerMessageId` string: The provider's own ID of the sent email, when the provider named one.
  - `providerWebLink` string: Link opening the sent email in the provider's web client (Outlook only).
  - `reactions` AppMailReaction[]: Reactions of users on the email, oldest first.
    - `id` string, uuid
    - `userId` string, uuid
    - `userName` string
    - `reaction` string
    - `reactedAt` string, date-time
  - `replies` AppMailReply[]: Replies of users on the email, oldest first.
    - `id` string, uuid
    - `userId` string, uuid
    - `userName` string
    - `jsonContent` JsonNode: Reply JSON content
      - `empty` boolean
      - `array` boolean
      - `null` boolean
      - `object` boolean
      - `float` boolean
      - `container` boolean
      - `string` boolean
      - `pojo` boolean
      - `floatingPointNumber` boolean
      - `short` boolean
      - `int` boolean
      - `long` boolean
      - `valueNode` boolean
      - `missingNode` boolean
      - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
      - `integralNumber` boolean
      - `double` boolean
      - `bigDecimal` boolean
      - `bigInteger` boolean
      - `textual` boolean
      - `boolean` boolean
      - `binary` boolean
      - `number` boolean
      - `embeddedValue` boolean
    - `htmlContent` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `mentions` AppMailMention[]
      - `type` string
      - `entityId` string, uuid
      - `label` string
      - `order` integer
    - `reactions` AppMailReaction[]
      - `id` string, uuid
      - `userId` string, uuid
      - `userName` string
      - `reaction` string
      - `reactedAt` string, date-time

## Other responses

- `400`: The `id` path variable is missing or not a UUID.
- `404`: Email record not found.

---

[API](https://skmtc.dev/surense/apis/appmail-api.md) - [All operations](https://skmtc.dev/surense/apis/appmail-api/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/appmail-api/revisions/dd959778fa2e?raw)
