GET
/
notifications
/
v1
/
logs
Notifications logs
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/notifications/v1/logs \
  --header 'apikey: <api-key>'
{
  "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
    }
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Query Parameters

messageId
integer

To filter based on the ID of message or reply.

reactionId
integer

To filter based on the ID of the reaction added.

from
integer

To get the logs for messages that are sent after the mentioned timestamp in milliseconds.

to
integer

To get the logs for messages that are sent after the mentioned timestamp in milliseconds.

messageCategory
enum<string>

To filter logs based on the category of the message or reply. Values can be message, interactive.

Available options:
message,
interactive
messageType
string

To filter logs based on the type of the message or reply. Values are based on the message category.

trigger
enum<string>

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.

Available options:
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
sender
string

To filter based on the sender of the message. This has to be uid.

reactionSender
string

To filter based on the user who reacted on a message.

receiver
string

To filter based on the receiver of a message. This can be uid or guid based on the receiverType.

receiverType
enum<string>

To filter based on the receiver's type. The value of this field can be user or group.

Available options:
user,
group
reactionReceiver
string

To filter based on the user who is notified when a reaction is added.

member
string

To filter based on the user who is notified in a given group. This is only present when the receiverType is group.

channel
enum<string>

To filter based on whether the user was notified using push, email or sms notification.

Available options:
push,
email,
sms
provider
enum<string>

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.

Available options:
fcm,
apns,
sendgrid,
twilio,
custom
notificationTriggered
boolean

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.

reason
enum<string>

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.

Available options:
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
success
boolean

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.

affix
enum<string>

To paginate over logs use the value of affix as prepend or append.

Available options:
prepend,
append
logId
string

To be used with affix for pagination.

Response

200 - application/json

A list of push notification's email custom provider

The response is of type object.