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

> Paginated API to fetch logs for notifications

# Notifications logs

For the complete error reference, see [Error Guide](/rest-api/notifications-apis/error-codes).


## OpenAPI

````yaml get /notifications/v1/logs
openapi: 3.0.0
info:
  title: Chat APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Notifications
    description: Allows configuring Notifications core.
paths:
  /notifications/v1/logs:
    get:
      tags:
        - Notifications
      summary: Notifications logs
      description: Paginated API to fetch logs for notifications
      operationId: notifications-logs
      parameters:
        - name: messageId
          in: query
          description: To filter based on the ID of message or reply.
          required: false
          schema:
            type: integer
        - name: reactionId
          in: query
          description: To filter based on the ID of the reaction added.
          required: false
          schema:
            type: integer
        - name: from
          in: query
          description: >-
            To get the logs for messages that are sent after the mentioned
            timestamp in milliseconds.
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: >-
            To get the logs for messages that are sent after the mentioned
            timestamp in milliseconds.
          required: false
          schema:
            type: integer
            format: int64
        - name: messageCategory
          in: query
          description: >-
            To filter logs based on the category of the message or reply. Values
            can be message.
          required: false
          schema:
            type: string
            enum:
              - message
            description: Message category filter.
        - name: messageType
          in: query
          description: >-
            To filter logs based on the type of the message or reply. Values are
            based on the message category.
          required: false
          schema:
            type: string
        - name: trigger
          in: query
          description: >-
            To filter based on the trigger value of the event that is
            responsible for triggering the notification.

            For a message or a reply, the value of this field is after_message.

            For message actions, the values are message_deleted or
            message_edited or message_reaction_added.

            For default calling feature, the values are initiated, rejected,
            cancelled, unanswered.

            For group events, the values are: after_group_joined,
            after_group_left, after_group_members_added,
            after_group_members_kicked, after_group_members_banned,
            after_group_members_unbanned, after_scope_changed.
          required: false
          schema:
            type: string
            enum:
              - after_message
              - message_deleted
              - message_edited
              - message_reaction_added
              - initiated
              - rejected
              - cancelled
              - unanswered
              - after_group_joined
              - after_group_left
              - after_group_members_added
              - after_group_members_kicked
              - after_group_members_banned
              - after_group_members_unbanned
              - after_scope_changed
            description: Webhook event trigger type.
        - name: sender
          in: query
          description: To filter based on the sender of the message. This has to be uid.
          required: false
          schema:
            type: string
        - name: reactionSender
          in: query
          description: To filter based on the user who reacted on a message.
          required: false
          schema:
            type: string
        - name: receiver
          in: query
          description: >-
            To filter based on the receiver of a message. This can be uid or
            guid based on the receiverType.
          required: false
          schema:
            type: string
        - name: receiverType
          in: query
          description: >-
            To filter based on the receiver's type. The value of this field can
            be user or group.
          required: false
          schema:
            type: string
            enum:
              - user
              - group
            description: 'Receiver type. user: one-on-one. group: group conversation.'
        - name: reactionReceiver
          in: query
          description: >-
            To filter based on the user who is notified when a reaction is
            added.
          required: false
          schema:
            type: string
        - name: member
          in: query
          description: >-
            To filter based on the user who is notified in a given group. This
            is only present when the receiverType is group.
          required: false
          schema:
            type: string
        - name: channel
          in: query
          description: >-
            To filter based on whether the user was notified using push, email
            or sms notification.
          required: false
          schema:
            type: string
            enum:
              - push
              - email
              - sms
            description: Notification channel type.
        - name: provider
          in: query
          description: >-
            To filter based on the provider.

            For channel as push, the value of this field can be fcm, apns,
            custom.

            For channel as email, the value of this field can be sendgrid or
            custom.

            For channel as sms, the value of this field can be twilio or custom.
          required: false
          schema:
            type: string
            enum:
              - fcm
              - apns
              - sendgrid
              - twilio
              - custom
            description: Notification provider type.
        - name: notificationTriggered
          in: query
          description: >-
            The value is true when the notification provider is triggered. If
            false, the notification was not triggered due to some preference
            that is mentioned in the reason field.
          required: false
          schema:
            type: boolean
        - name: reason
          in: query
          description: >-
            Available only when the value of notificationTriggered is false.

            This contains the reason for not triggering the notification
            provider.


            To filter logs using reason, use the following values:
            MESSAGES_PREFERENCE, REPLIES_PREFERENCE, MESSAGE_ACTIONS_PREFERENCE,
            REACTIONS_PREFERENCE, GROUP_ACTIONS_PREFERENCE, DND_PREFERENCE,
            MUTE_PREFERENCE, SCHEDULE_PREFERENCE, CALL_PREFERENCE,
            QUOTA_PREFERENCE, MISSING_EMAIL, MISSING_PHNO,
            INVALID_PUSH_PROVIDER_ID, TIMED_OUT, NOT_FOUND, TWILIO_CREATE_ERROR.
          required: false
          schema:
            type: string
            enum:
              - MESSAGES_PREFERENCE
              - REPLIES_PREFERENCE
              - MESSAGE_ACTIONS_PREFERENCE
              - REACTIONS_PREFERENCE
              - GROUP_ACTIONS_PREFERENCE
              - DND_PREFERENCE
              - MUTE_PREFERENCE
              - SCHEDULE_PREFERENCE
              - CALL_PREFERENCE
              - QUOTA_PREFERENCE
              - MISSING_EMAIL
              - MISSING_PHNO
              - INVALID_PUSH_PROVIDER_ID
              - TIMED_OUT
              - NOT_FOUND
              - TWILIO_CREATE_ERROR
            description: Notification log status or reason code.
        - name: success
          in: query
          description: >-
            Available only when the value of notificationTriggered is true.


            To filter based on whether the HTTP request to the provider was
            successful or not, true indicating that the provider returned
            success while false indicating that the provider returned an error.
          required: false
          schema:
            type: boolean
        - name: affix
          in: query
          description: To paginate over logs use the value of affix as prepend or append.
          required: false
          schema:
            type: string
            enum:
              - prepend
              - append
            description: Cursor pagination direction.
        - name: logId
          in: query
          description: To be used with affix for pagination.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A list of push notification's email custom provider
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  - _id: 67e3c56babf90e20e2652edb
                    processingStartedAtMS: 1742980459696
                    processingEndedAtMS: 1742980459738
                    totalProcessingTimeInMS: 42
                    component: notifications-core
                    channel: push
                    provider: apns
                    messageId: 3939
                    reactionId: 69
                    trigger: message_reaction_added
                    messageSentAtMS: 1742980459000
                    sender: cometchat-uid-4
                    reactionSender: cometchat-uid-1
                    receiver: cometchat-guid-1
                    reactionReceiver: g-muted-yes
                    receiverType: group
                    member: g-muted-yes
                    tokenType: apns_ios_device
                    pushToken: pushtoken123
                    providerId: apns-provider
                    payload:
                      payload:
                        title: cometchat-uid-1
                        body: 'Reacted to your message: 😂'
                        tag: '69'
                        sender: cometchat-uid-1
                        senderName: cometchat-uid-1
                        receiver: cometchat-guid-1
                        receiverName: cometchat-guid-1
                        receiverType: group
                        conversationId: group_cometchat-guid-1
                        type: chat
                        sessionId: null
                        callAction: null
                        callType: null
                        sentAt: null
                      contentAvailable: 1
                      mutableContent: 1
                      topic: com.example.com
                      alert:
                        title: cometchat-uid-1
                        body: 'Reacted to your message: 😂'
                      priority: 10
                      pushType: alert
                      sound: default
                      collapseId: '69'
                      expiry: 1742984059
                      type: apns
                    notificationTriggered: false
                    reason: MUTE_PREFERENCE
                meta:
                  previous:
                    affix: prepend
                    messageId: 3939
                  current:
                    limit: 20
                    count: 20
                  next:
                    affix: append
                    messageId: 3939
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````