> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Message

> Get a single email message with full details.



## OpenAPI

````yaml get /email/messages/{message_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /email/messages/{message_id}:
    get:
      tags:
        - provider
        - email
      summary: Get Message
      description: Get a single email message with full details.
      operationId: get_message_email_messages__message_id__get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: message_id
          in: path
          required: true
          schema:
            type: string
            title: Message Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmailMessageResponse:
      properties:
        id:
          type: string
          title: Id
        threadId:
          type: string
          title: Threadid
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        bodyText:
          anyOf:
            - type: string
            - type: 'null'
          title: Bodytext
        bodyHtml:
          anyOf:
            - type: string
            - type: 'null'
          title: Bodyhtml
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        status:
          $ref: '#/components/schemas/EmailMessageStatus'
        direction:
          $ref: '#/components/schemas/EmailDirection'
        sentDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sentdate
        deliveredDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Delivereddate
        isRead:
          type: boolean
          title: Isread
        isStarred:
          type: boolean
          title: Isstarred
        isDraft:
          type: boolean
          title: Isdraft
        participants:
          items:
            $ref: '#/components/schemas/EmailParticipantResponse'
          type: array
          title: Participants
          default: []
        attachments:
          items:
            $ref: '#/components/schemas/EmailAttachmentResponse'
          type: array
          title: Attachments
          default: []
        openCount:
          type: integer
          title: Opencount
          default: 0
        uniqueOpenCount:
          type: integer
          title: Uniqueopencount
          default: 0
        clickCount:
          type: integer
          title: Clickcount
          default: 0
        uniqueClickCount:
          type: integer
          title: Uniqueclickcount
          default: 0
        firstOpenedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Firstopeneddate
        lastOpenedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastopeneddate
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
      type: object
      required:
        - id
        - threadId
        - subject
        - bodyText
        - bodyHtml
        - snippet
        - status
        - direction
        - sentDate
        - deliveredDate
        - isRead
        - isStarred
        - isDraft
        - createdDate
        - updatedDate
      title: EmailMessageResponse
      description: Email message in API responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailMessageStatus:
      type: string
      enum:
        - DRAFT
        - QUEUED
        - SENDING
        - SENT
        - DELIVERED
        - RECEIVED
        - FAILED
        - BOUNCED
        - COMPLAINED
      title: EmailMessageStatus
      description: Status of an email message through its lifecycle.
    EmailDirection:
      type: string
      enum:
        - INBOUND
        - OUTBOUND
      title: EmailDirection
      description: Direction of an email message.
    EmailParticipantResponse:
      properties:
        id:
          type: string
          title: Id
        role:
          $ref: '#/components/schemas/EmailParticipantRole'
        contact:
          $ref: '#/components/schemas/EmailContactResponse'
      type: object
      required:
        - id
        - role
        - contact
      title: EmailParticipantResponse
      description: Email participant in API responses.
    EmailAttachmentResponse:
      properties:
        id:
          type: string
          title: Id
        filename:
          type: string
          title: Filename
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
        sizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sizebytes
        isInline:
          type: boolean
          title: Isinline
          default: false
        contentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Contentid
      type: object
      required:
        - id
        - filename
        - mimeType
        - sizeBytes
      title: EmailAttachmentResponse
      description: Email attachment in API responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EmailParticipantRole:
      type: string
      enum:
        - FROM
        - TO
        - CC
        - BCC
      title: EmailParticipantRole
      description: Role of a participant in an email message.
    EmailContactResponse:
      properties:
        id:
          type: string
          title: Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        contactType:
          $ref: '#/components/schemas/EmailContactType'
          default: EXTERNAL
        patientIds:
          items:
            type: string
          type: array
          title: Patientids
          default: []
      type: object
      required:
        - id
        - email
        - displayName
      title: EmailContactResponse
      description: Email contact in API responses.
    EmailContactType:
      type: string
      enum:
        - INTERNAL
        - EXTERNAL
        - SYSTEM
      title: EmailContactType
      description: Type of email contact.

````