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

# Get the authenticated user's message notifications



## OpenAPI

````yaml get /v1/message-notifications
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/message-notifications:
    get:
      tags:
        - MessageNotification
      summary: Get the authenticated user's message notifications
      operationId: messageNotification.index
      parameters:
        - name: status
          in: query
          description: Filter by status (unread, read, dismissed).
          schema:
            type:
              - string
              - 'null'
            enum:
              - unread
              - read
              - dismissed
              - null
        - name: per_page
          in: query
          description: The number of items per page.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
            maximum: 100
        - name: page
          in: query
          description: The page number.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: Paginated set of `MessageNotificationResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MessageNotificationResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  schemas:
    MessageNotificationResource:
      type: object
      properties:
        id:
          type: integer
        tenant_id:
          type: integer
        user_id:
          type: integer
        chat_log_id:
          type: integer
        status:
          type: string
        read_at:
          type:
            - string
            - 'null'
          format: date-time
        dismissed_at:
          type:
            - string
            - 'null'
          format: date-time
        message:
          $ref: '#/components/schemas/ConversationMessageResource'
        customer:
          anyOf:
            - $ref: '#/components/schemas/RelatedCustomerResource'
            - type: 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - tenant_id
        - user_id
        - chat_log_id
        - status
        - read_at
        - dismissed_at
        - created_at
        - updated_at
      title: MessageNotificationResource
    ConversationMessageResource:
      type: object
      properties:
        id:
          type: integer
        conversation_id:
          type:
            - integer
            - 'null'
        channel_id:
          type:
            - integer
            - 'null'
        channel_message_id:
          type:
            - string
            - 'null'
        user_id:
          type:
            - integer
            - 'null'
        user_name:
          type:
            - string
            - 'null'
        is_customer:
          type: boolean
        message_type:
          type: string
          description: >-
            One of text, audio, video, document, image, sticker, location,
            contact or system; clients should render an unknown value as a
            generic message.
        media_type:
          type:
            - string
            - 'null'
        message:
          type:
            - string
            - 'null'
        message_format:
          type: string
        quoted_text:
          type:
            - string
            - 'null'
        transcript:
          type:
            - string
            - 'null'
        transcript_status:
          type:
            - string
            - 'null'
        is_deleted:
          type: boolean
        is_edited:
          type: boolean
        edited_by_user_name:
          type:
            - string
            - 'null'
        deleted_by_user_name:
          type:
            - string
            - 'null'
        read_at:
          type:
            - string
            - 'null'
          format: date-time
        delivery_status: {}
        metadata:
          description: >-
            Type-specific payload: location carries
            latitude/longitude/location_name/location_address, contact carries
            contacts (a list of {name, phones}), video carries is_gif, system
            carries its event fields; null for every other type.
          anyOf:
            - type: 'null'
            - type: object
              additionalProperties: {}
            - type: array
              items: {}
            - type: object
              properties:
                contacts: {}
              required:
                - contacts
            - type: object
              properties:
                is_gif:
                  type: boolean
              required:
                - is_gif
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        file:
          anyOf:
            - $ref: '#/components/schemas/ChatLogMediaResource'
            - $ref: '#/components/schemas/FileResource'
            - type: 'null'
        file_temporary_url:
          type: string
        media_group_id:
          type:
            - string
            - 'null'
        media_group_index:
          type:
            - integer
            - 'null'
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessageReactionResource'
      required:
        - id
        - conversation_id
        - channel_id
        - channel_message_id
        - user_id
        - user_name
        - is_customer
        - message_type
        - media_type
        - message
        - message_format
        - quoted_text
        - transcript
        - transcript_status
        - is_deleted
        - is_edited
        - edited_by_user_name
        - deleted_by_user_name
        - read_at
        - delivery_status
        - metadata
        - created_at
        - file
        - file_temporary_url
        - media_group_id
        - media_group_index
        - reactions
      title: ConversationMessageResource
    RelatedCustomerResource:
      type: object
      properties:
        id:
          type: integer
        record_state:
          $ref: '#/components/schemas/RecordStateResource'
        first_name:
          anyOf:
            - type: string
            - type: 'null'
        last_name:
          anyOf:
            - type: string
            - type: 'null'
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
        is_masked:
          type: boolean
          description: >-
            Whether the identity fields are masked because the viewer may not
            see this lead's patient.
        is_lead_stage:
          type: boolean
          description: >-
            Whether the person is still a lead (link to `/leads/{lead_id}`)
            rather than a patient (link to `/customers/{id}`).
        lead_id:
          type:
            - integer
            - 'null'
          description: >-
            The lead the person came from; kept after conversion, so check
            `is_lead_stage` before linking to it.
      required:
        - id
        - record_state
        - first_name
        - last_name
        - phone_number
        - email
        - is_masked
        - is_lead_stage
        - lead_id
      title: RelatedCustomerResource
    ChatLogMediaResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        description:
          type: 'null'
        type:
          type: string
        mime_type:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        formatted_size:
          type: string
        group_id:
          type: 'null'
        fileable_type:
          type: string
          const: chat_log
        fileable_id:
          type: integer
        temporary_url:
          type:
            - string
            - 'null'
        temporary_thumbnail_url:
          type: 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type: 'null'
      required:
        - id
        - name
        - description
        - type
        - mime_type
        - size
        - formatted_size
        - group_id
        - fileable_type
        - fileable_id
        - temporary_url
        - temporary_thumbnail_url
        - created_at
        - updated_at
        - deleted_at
      title: ChatLogMediaResource
    FileResource:
      type: object
      properties:
        id:
          type: integer
        record_state:
          $ref: '#/components/schemas/RecordStateResource'
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        type:
          type: string
        mime_type:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        formatted_size:
          type: string
        group_id:
          type:
            - string
            - 'null'
        fileable_type:
          type:
            - string
            - 'null'
        fileable_id:
          type:
            - integer
            - 'null'
        fileable_name:
          type:
            - string
            - 'null'
        sort_order:
          type:
            - integer
            - 'null'
        temporary_url:
          type:
            - string
            - 'null'
        temporary_thumbnail_url:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - record_state
        - name
        - description
        - type
        - mime_type
        - size
        - formatted_size
        - group_id
        - fileable_type
        - fileable_id
        - fileable_name
        - sort_order
        - temporary_url
        - temporary_thumbnail_url
        - created_at
        - updated_at
        - deleted_at
      title: FileResource
    ConversationMessageReactionResource:
      type: object
      properties:
        id:
          type: integer
        emoji:
          type: string
        is_customer:
          type: boolean
        user_id:
          type:
            - integer
            - 'null'
        user_name:
          type:
            - string
            - 'null'
        reacted_at:
          type: string
          format: date-time
      required:
        - id
        - emoji
        - is_customer
        - user_id
        - user_name
        - reacted_at
      title: ConversationMessageReactionResource
    RecordStateResource:
      type: object
      properties:
        is_read_only:
          type: boolean
          description: >-
            True when every write on this record is refused; false does not
            imply the caller may write.
        reason_code:
          type:
            - string
            - 'null'
          description: >-
            Why the record is read-only (`CUSTOMER_ERASED`, or
            `LEAD_NOT_ASSIGNED` for a salesperson on another rep's lead), or
            null when it is not.
      required:
        - is_read_only
        - reason_code
      title: RecordStateResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.