# Notifications

# Get Notifications

# Resource URL

https://humtog.com/api/notifications

# Resource Method

GET

# Params

Name Required Type Description
filter Yes string Can be seen or unseen
page No file Current page number, used with seen filter

# Example Response

{
     "data": [
        {
            "id": "54fb7ff3-47ba-43f8-98af-b84f2600d29a",
            "type": "App\\Notifications\\CommentReplied",
            "notifiable_type": "App\\User",
            "notifiable_id": 1,
            "data": {
                "url": "/p/submissionSlug?comment=commentId",
                "name": "userName",
                "avatar": "/imgs/default-avatar.png",
                "body": "@userName replied to your comment on \"CommentText\""
            },
            "read_at": null,
            "created_at": "2020-05-21 13:45:47",
            "updated_at": "2020-05-21 13:45:59",
            "viewed": 1
        }
    ]
}

# Mark all Notifications as Read

# Resource URL

https://humtog.com/api/notifications

# Resource Method

POST

# Example Response

{
    "message": "All notifications have been marked as read."
}

# Mark Notification as Read

# Reource URL

https://humtog.com/api/notification-read/:notification_id

# Resource Method

PATCH

# Example Response

{
    "message": "Notification have been marked as read."
}

# Mark all Notifications as Seen

# Resource URL

https://humtog.com/api/notification-viewed

# Resource Method

PATCH

# Example Response

{
    "message": "Notification have been viewed."
}