---
title: "Retrieve an email"
method: GET
path: "/api/v1/emails/{email_id}"
tags: ["Emails"]
---

# Retrieve an email

`GET /api/v1/emails/{email_id}`

Retrieve the details of an email.

## Path parameters

- `email_id` string, required

## Query parameters

- `account_id` string
- `include_headers` boolean

## Response `200`

OK

- union — @todo Email
  - object
    - `object` 'Email', required
    - `id` string, required — A unique identifier.
    - `deprecated_id` string, required — A unique identifier.
    - `kind` '0_ref', required
    - `account_id` string, required — A unique identifier.
    - `type` union, required
      - 'MAIL'
      - 'GOOGLE'
      - 'ICLOUD'
      - 'OUTLOOK'
      - 'EXCHANGE'
      - 'GOOGLE_OAUTH'
    - `date` string, required — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
    - `role` union, required
      - 'inbox'
      - 'sent'
      - 'archive'
      - 'drafts'
      - 'trash'
      - 'spam'
      - 'all'
      - 'important'
      - 'starred'
      - 'unknown'
    - `folders` string[], required
    - `folderIds` string[], required
    - `read_date` union
      - string — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
      - unknown
    - `message_id` string, required
    - `provider_id` string, required
  - object
    - `object` 'Email', required
    - `id` string, required — A unique identifier.
    - `deprecated_id` string, required — A unique identifier.
    - `account_id` string, required — A unique identifier.
    - `type` union, required
      - 'MAIL'
      - 'GOOGLE'
      - 'ICLOUD'
      - 'OUTLOOK'
      - 'EXCHANGE'
      - 'GOOGLE_OAUTH'
    - `date` string, required — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
    - `role` union, required
      - 'inbox'
      - 'sent'
      - 'archive'
      - 'drafts'
      - 'trash'
      - 'spam'
      - 'all'
      - 'important'
      - 'starred'
      - 'unknown'
    - `folders` string[], required
    - `folderIds` string[], required
    - `read_date` union
      - string — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
      - unknown
    - `message_id` string, required
    - `provider_id` string, required
    - `kind` '1_meta', required
    - `body_plain` '', required
    - `body` '', required
    - `from_attendee` object, required
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `to_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `cc_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `bcc_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `reply_to_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `subject` string, required
    - `has_attachments` boolean, required
    - `origin` union, required
      - 'unipile'
      - 'external'
    - `in_reply_to` object
      - `message_id` string, required
      - `id` string, required — A unique identifier.
    - `tracking_id` string
    - `thread_id` string
    - `attachments` object[], required
      - `id` string, required
      - `name` string, required
      - `size` number, required
      - `extension` string, required
      - `mime` string, required
      - `cid` string
      - `inline` boolean
    - `provider_immutable_id` string — `Outlook only`.
    - `parent_mail` object
      - `id` string, required — A unique identifier.
      - `deprecated_id` string, required — A unique identifier.
      - `account_id` string, required — A unique identifier.
      - `type` union, required
        - 'MAIL'
        - 'GOOGLE'
        - 'ICLOUD'
        - 'OUTLOOK'
        - 'EXCHANGE'
        - 'GOOGLE_OAUTH'
      - `date` string, required — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
      - `role` union, required
        - 'inbox'
        - 'sent'
        - 'archive'
        - 'drafts'
        - 'trash'
        - 'spam'
        - 'all'
        - 'important'
        - 'starred'
        - 'unknown'
      - `folders` string[], required
      - `folderIds` string[], required
      - `read_date` union
        - string — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
        - unknown
      - `message_id` string, required
      - `provider_id` string, required
      - `kind` '1_meta', required
      - `body_plain` '', required
      - `body` '', required
      - `from_attendee` object, required
        - `display_name` string
        - `profile_picture` string
        - `identifier` string, required
        - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
      - `to_attendees` object[]
        - `display_name` string
        - `profile_picture` string
        - `identifier` string, required
        - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
      - `cc_attendees` object[]
        - `display_name` string
        - `profile_picture` string
        - `identifier` string, required
        - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
      - `bcc_attendees` object[]
        - `display_name` string
        - `profile_picture` string
        - `identifier` string, required
        - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
      - `reply_to_attendees` object[]
        - `display_name` string
        - `profile_picture` string
        - `identifier` string, required
        - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
      - `subject` string, required
      - `has_attachments` boolean, required
      - `origin` union, required
        - 'unipile'
        - 'external'
      - `in_reply_to` object
        - `message_id` string, required
        - `id` string, required — A unique identifier.
      - `tracking_id` string
      - `thread_id` string
      - `attachments` object[], required
        - `id` string, required
        - `name` string, required
        - `size` number, required
        - `extension` string, required
        - `mime` string, required
        - `cid` string
        - `inline` boolean
      - `provider_immutable_id` string — `Outlook only`.
  - object
    - `object` 'Email', required
    - `id` string, required — A unique identifier.
    - `deprecated_id` string, required — A unique identifier.
    - `account_id` string, required — A unique identifier.
    - `type` union, required
      - 'MAIL'
      - 'GOOGLE'
      - 'ICLOUD'
      - 'OUTLOOK'
      - 'EXCHANGE'
      - 'GOOGLE_OAUTH'
    - `date` string, required — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
    - `role` union, required
      - 'inbox'
      - 'sent'
      - 'archive'
      - 'drafts'
      - 'trash'
      - 'spam'
      - 'all'
      - 'important'
      - 'starred'
      - 'unknown'
    - `folders` string[], required
    - `folderIds` string[], required
    - `read_date` union
      - string — An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.
      - unknown
    - `message_id` string, required
    - `provider_id` string, required
    - `from_attendee` object, required
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `to_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `cc_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `bcc_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `reply_to_attendees` object[]
      - `display_name` string
      - `profile_picture` string
      - `identifier` string, required
      - `identifier_type` 'CHAT_ATTENDEE_ID' | 'PHONE_NUMBER' | 'EMAIL_ADDRESS' | 'MESSENGER_ID' | 'MESSENGER_THREAD_ID' | 'TIKTOK_ID' | 'TIKTOK_THREAD_ID' | 'TWITTER_ID' | 'TWITTER_THREAD_ID' | 'INSTAGRAM_ID' | 'INSTAGRAM_THREAD_ID' | 'LINKEDIN_ID' | 'LINKEDIN_THREAD_ID' | 'GROUP_THREAD', required
    - `subject` string, required
    - `has_attachments` boolean, required
    - `origin` union, required
      - 'unipile'
      - 'external'
    - `in_reply_to` object
      - `message_id` string, required
      - `id` string, required — A unique identifier.
    - `tracking_id` string
    - `thread_id` string
    - `attachments` object[], required
      - `id` string, required
      - `name` string, required
      - `size` number, required
      - `extension` string, required
      - `mime` string, required
      - `cid` string
      - `inline` boolean
    - `provider_immutable_id` string — `Outlook only`.
    - `kind` '2_full', required
    - `body_plain` string, required
    - `body` string, required
    - `headers` object[]
      - `name` string, required
      - `value` string, required
    - `categories` string[] — `Outlook only` Categories associated with the mail.

## Other responses

- `401` — ## Unauthorized ### Missing credentials - Type: "errors/missing_credentials" Some credentials are necessary to perform the request. ### Multiple sessions - Type: "errors/multiple_sessions" LinkedIn limits the use of multiple sessions on certain Recruiter accounts. This error restricts access to this route only, but causing a popup to appear in the user's browser, prompting them to choose a session, which can disconnect the current account. To avoid this error, use the cookie connection method. ### Wrong account - Type: "errors/wrong_account" The provided credentials do not match the correct account. ### Invalid credentials - Type: "errors/invalid_credentials" The provided credentials are invalid. ### Invalid proxy credentials - Type: "errors/invalid_proxy_credentials" The provided proxy credentials are invalid. ### Invalid IMAP configuration - Type: "errors/invalid_imap_configuration" The provided IMAP configuration is invalid. ### Invalid SMTP configuration - Type: "errors/invalid_smtp_configuration" The provided SMTP configuration is invalid. ### Invalid checkpoint solution - Type: "errors/invalid_checkpoint_solution" The checkpoint resolution did not pass successfully. Please retry. ### Checkpoint error - Type: "errors/checkpoint_error" The checkpoint does not appear to be resolvable. Please try again and contact support if the problem persists. ### Expired credentials - Type: "errors/expired_credentials" Invalid credentials. Please check your username and password and try again. ### Expired link - Type: "errors/expired_link" This link has expired. Please return to the application and generate a new one. ### Insufficient privileges - Type: "errors/insufficient_privileges" This resource seems to be out of your scopes. ### Disconnected account - Type: "errors/disconnected_account" The account appears to be disconnected from the provider service. ### Disconnected feature - Type: "errors/disconnected_feature" The service you're trying to reach appears to be disconnected.
- `403` — ## Forbidden ### Insufficient permissions - Type: "errors/insufficient_permissions" Valid authentication but insufficient permissions to perform the request. ### Account restricted - Type: "errors/account_restricted" Access to this account has been restricted by the provider. ### Account mismatch - Type: "errors/account_mismatch" This action cannot be done with your account. ### Unknown authentication context - Type: "errors/unknown_authentication_context" An additional step seems necessary to complete login. Please connect to provider with your browser to find out more, then retry authentication. ### Session mismatch - Type: "errors/session_mismatch" Token User id does not match client session id. ### Feature not subscribed - Type: "errors/feature_not_subscribed" The requested feature has either not been subscribed or not been authenticated properly. ### Subscription required - Type: "errors/subscription_required" The action you're trying to achieve requires a subscription to provider's services. ### Resource access restricted - Type: "errors/resource_access_restricted" You don't have access to this resource. ### Action required - Type: "errors/action_required" An additional step seems necessary. Complete authentication on the provider's native application and try again.
- `404` — ## Not Found ### Resource not found. The requested resource were not found. Email not found
- `500` — ## Internal Server Error ### Unexpected error - Type: "errors/unexpected_error" Something went wrong. {{moreDetails}} ### Provider error - Type: "errors/provider_error" The provider is experiencing operational problems. Please try again later. ### Authentication intent error - Type: "errors/authentication_intent_error" The current authentication intent was killed after failure. Please start the process again from the beginning.
- `503` — ## Service Unavailable ### No client session - Type: "errors/no_client_session" No client session is currently running. ### No channel - Type: "errors/no_channel" No channel to client session. ### Handler missing - Type: "errors/no_handler" Handler missing for that request. ### Network down - Type: "errors/network_down" Network is down on server side. Please wait a moment and retry. ### Service unavailable - Type: "errors/service_unavailable" Please try again later.
- `504` — ## Gateway Timeout ### Request timed out - Type: "errors/request_timeout" Request Timeout. Please try again, and if the issue persists, contact support.

---

[API](https://skmtc.net/unipile/apis/unipile-api-reference.md) · [All operations](https://skmtc.net/unipile/apis/unipile-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unipile/unipile-api-reference/revisions/3483a34061f6/schema)
