Notifications
These API endpoints are related to user notifications on Omniplex
Gets info needed to subscribe to push notifications (VAPID public key)
Success
application/json- response
public_key?stringcurl -X GET 'https://spider.omniplex.gg/users/notifications/info'{ "public_key": "string"}Gets a users notifications
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
id*stringUser ID
Success
application/json- response
notifications?array<>curl -X GET 'https://spider.omniplex.gg/users/string/notifications'{ "notifications": [ { "browser_info": { "browser": "string", "browser_ver": "string", "mobile": true, "os": "string" }, "created_at": "2019-08-24T14:15:22Z", "endpoint": "string", "notif_id": "string" } ]}Creates a new subscription for a push notification. Returns 204 on success
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
id*stringUser ID
application/json- body
auth?stringThe auth key for the subscription returned by PushSubscription
endpoint?stringThe endpoint for the subscription returned by PushSubscription
p256dh?stringThe p256dh key for the subscription returned by PushSubscription
Success
application/json- response
context?Context of the error. Usually used for validation error contexts
message?stringMessage of the error
curl -X POST 'https://spider.omniplex.gg/users/string/notifications' \ -H 'Content-Type: application/json' \ -d '{}'{ "context": { "property1": "string", "property2": "string" }, "message": "string"}Deletes a users notification. Returns 204 on success
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
id*stringUser ID
notif_id*stringNotification ID
Success
application/json- response
context?Context of the error. Usually used for validation error contexts
message?stringMessage of the error
curl -X DELETE 'https://spider.omniplex.gg/users/string/notification?notif_id=string'{ "context": { "property1": "string", "property2": "string" }, "message": "string"}Returns every known alert category and whether the user wants notifications for it. A category with no stored row defaults to true.
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
id*stringUser ID
Success
application/json- response
[key: string]?booleancurl -X GET 'https://spider.omniplex.gg/users/string/notification-prefs'{ "property1": true, "property2": true}Partially updates the calling user's notification preferences -- only the categories present in the request body are changed.
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
id*stringUser ID
application/json- body
[key: string]?booleanSuccess
application/json- response
context?Context of the error. Usually used for validation error contexts
message?stringMessage of the error
curl -X PATCH 'https://spider.omniplex.gg/users/string/notification-prefs' \ -H 'Content-Type: application/json' \ -d '{ "property1": true, "property2": true}'{ "context": { "property1": "string", "property2": "string" }, "message": "string"}