Skip to content

Latest commit

 

History

History
136 lines (85 loc) · 4.31 KB

notification.md

File metadata and controls

136 lines (85 loc) · 4.31 KB

Notification API documentation


/notification/user/

Send a notification to a list of users

POST /notification/user/

Request

Body

name type description requirement
title String Notification title Required
type String Notification type Required
user_list list[int] User ids Required
data string Notification data Optional

Allowed types (see ALLOWED_USER_TYPES variable)

Response

Status code

status code content-type response
201 application/json {"message": "Notification created"}
400 application/json {"errors": [...]}
500 application/json {"errors": [...]}

/notification/user/{notification_id}/

Delete a notification

DELETE /notification/user/{notification_id}/

Request

Body

None

Response

Status code

status code content-type response
201 application/json {"message": "Notification deleted"}
400 application/json {"errors": [...]}
500 application/json {"errors": [...]}

/notification/friend/add/

Send status of two new friends

POST /notification/friend/add/

Sends a friend_status notification with the status of the new friend

Request

Headers

name type description requirement
Authorization String Service token Required

Body

name type description requirement
new_relationship list[int] New friends' user_id Required

Response

Status code

status code content-type response
200 application/json {"message": "Notification sent"}
400 application/json {"errors": [...]}
500 application/json {"errors": [...]}

/notification/friend/delete/

Send a notification to delete a friend

POST /notification/friend/delete/

Sends a friend_status notification with status deleted.

Request

Headers

name type description requirement
Authorization String Service token Required

Body

name type description requirement
deleted_relationship list[int] Deleted friends' user_id Required

Response

Status code

status code content-type response
200 application/json {"message": "Notification sent"}
400 application/json {"errors": [...]}
500 application/json {"errors": [...]}