openapi: 3.0.1
info:
  title: IMTC MA Message API
  version: v1
  description: |
    # Getting Started
    For more information on how to start using our APIs, please refer to the Getting Started guide. 
    #Revision History  
     | Version | Date       | Description |  
     | ------- | ---------- | ----------- |  
     | 1.0     | 08/12/2025 | Initial Version|  
    # Overview
    IMTC Managed Accounts Message Download API.
    ***
    # Servers
    SEI's API products have various environments available depending on your stage of integration. The server URL should correspond with the environment of your application. Please refer to the Getting Started guide for a list of all environments and URLs. 
    
    **Note** For all Client applications,  the Two-way TLS URL must be used. This is essential in order for the client server making API calls to establish a successful Two-Way SSL communication with SEI.
    ***
servers:
  - url: 'https://test.mtls.api.seic.com'
    description: Two-way SSL Test Server.
  - url: 'https://mtls.api.seic.com'
    description: Two-way SSL Production Server.
  - url: 'https://test.api.seic.com'
    description: Test Server with unmasked data.
  - url: 'https://api.seic.com'
    description: Production Server with unmasked data.
paths:
  /api/Message/retrieveMessages:
    post:
      description: "The endpoint fetches the list of all messages based on message filter criteria and marks the unread messages as read"
      tags:
      - Message
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          application/json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          text/json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
      responses:
        '200':
          description: OK- The request has succeeded and the response has been returned.
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
        '400':
          description: Bad request - The server cannot or will not process the request due to an inaccurate request submitted by the client application.  Please resubmit the request after making the required corrections indicated in the error response.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
        '401':
          description: Unauthorized - Invalid authentication details have been provided or user is not authorized the access the requested details.  
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
        '500':
          description: Internal Server Error - The server was unable to fulfill the request.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
  /api/Message/downloadAttachment:
    post:
      description: The endpoint fetches the details of the specific Message ID"
      tags:
      - Message
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          application/json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          text/json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
      responses:
        '200':
          description: OK- The request has succeeded and the response has been returned.
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
        '400':
          description: Bad request - The server cannot or will not process the request due to an inaccurate request submitted by the client application.  Please resubmit the request after making the required corrections indicated in the error response.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
        '401':
          description: Unauthorized - Invalid authentication details have been provided or user is not authorized the access the requested details.  
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
        '500':
          description: Internal Server Error - The server was unable to fulfill the request.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEntity'
components:
  schemas:
    ErrorResponseEntity:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    MessageDetailsResponseEntity:
      type: object
      properties:
        messageId:
          description: Message ID
          type: string
          nullable: true
        accountName:
          description: Account Name
          type: string
          nullable: true
        accountNumber:
          description: Account Number
          type: string
          nullable: true
        activityAmount:
          description: Activity Amount
          type: string
          nullable: true
        activityType:
          description: Activity Type
          type: string
          nullable: true
        postedDate:
          description: The value indicates the UTC Posted date for the messages in 24 hours format
          type: string
          nullable: true
        messageBody:
          description: Message Body
          type: string
          nullable: true
        strategyName:
          description: Strategy Name
          type: string
          nullable: true
        portfolioName:
          description: Portfolio Name
          type: string
          nullable: true
        fileName:
          description: Name of the file attached with message
          type: string
          nullable: true
        messageFile:
          description: Content of the attached file in byte stream format
          type: string
          format: byte
          nullable: true
        mContentType:
          description: Type of content in the attached file
          type: string
          nullable: true
        taxableIndicator:
          description: Taxable Indicator
          type: string
          nullable: true
        messageInitiatorName:
          description: The user ID of the Operational User who has created the message
          type: string
          nullable: true
        managerName:
          description: Manager Name
          type: string
          nullable: true
        portfolioId:
          description: Portfolio Id
          type: string
          nullable: true
        externalReferenceId:
          description: External Reference Id
          type: string
          nullable: true
      additionalProperties: false
    MessageDownloadFilterRequestEntity:
      type: object
      properties:
        messageId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    MessageFilter:
      type: object
      properties:
        messageStatusFlag:
          description: The value indicates the the message read status to be used to filter the message
          type: string
          nullable: true
        firmName:
          description: The value indicates the Organization name of the valid firms associated with the the user to be used to fetch the messages of the firm        
          type: string
          nullable: true
        activityName:
          description: The filter criteria to fetch messages for required Activity Type. 
          type: string
          nullable: true
        fromDate:
          description: The value indicates the UTC Message Posted from date in 24 hours format to be used to filter the messages 
          type: string
          nullable: true
        toDate:
          description: The value indicates the UTC Message Posted to date in 24 hours format to be used to filter the messages 
          type: string
          nullable: true
        searchKeyword:
          description: The value to indicates filter criteria to search the messages 
          type: string
          nullable: true
      additionalProperties: false
    MessageFilterRequestEntity:
      type: object
      properties:
        messageFilter:
          $ref: '#/components/schemas/MessageFilter'
        limit:
          description: The number of messages to be fetched by the API in each call 
          type: integer
          format: int32
          nullable: true
        cursorId:
          description: Unique Cursor ID to fetch the next set of messages. 
          type: string
          nullable: true
      additionalProperties: false
    MessageNotesEntity:
      type: object
      properties:
        noteCreateDate:
          type: string
          nullable: true
        notePostedBy:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
      additionalProperties: false
    MessageResponseEntity:
      type: object
      properties:
        messageId:
          description: Message ID
          type: string
          nullable: true
        firmName:
          description: The name of the firm posting the message
          type: string
          nullable: true
        postedDate:
          description: Message posted date 
          type: string
          nullable: true
        accountName:
          description: Account Name
          type: string
          nullable: true
        accountNumber:
          description: Account Number
          type: string
          nullable: true
        messageBody:
          description: Message Body
          type: string
          nullable: true
        activityName:
          description: Activity Type Name
          type: string
          nullable: true
        activityAmount:
          description: Activity Amount
          type: string
          nullable: true
        taxableIndicator:
          description: Taxable Indicator (Y/N)
          type: string
          nullable: true
        messageReadTime:
          description: The time manager user reads the Message
          type: string
          nullable: true
        messageInitiatorName:
          description: The user ID of the Operational User who has created the message
          type: string
          nullable: true
        strategyName:
          description: Strategy Name
          type: string
          nullable: true
        portfolioName:
          description: Portfolio Name
          type: string
          nullable: true
        portfolioId:
          description: Portfolio ID
          type: string
          nullable: true
        externalReferenceId:
          description: External Reference ID
          type: string
          nullable: true
        messageNotes:
          description: Message Notes associated with the message
          type: array
          items:
            $ref: '#/components/schemas/MessageNotesEntity'
          nullable: true
        isAttachmentAvailble:
          description: Flag indicating if attachment is available with the message
          type: boolean
          nullable: true
      additionalProperties: false