Omniplex Docs
PopplioStaging

Notifications

These API endpoints are related to user notifications on IBL

GET
/users/notifications/info

Get Notifications Info

Gets info needed to subscribe to push notifications (VAPID public key)

/users/notifications/info
curl -X GET "https://spider-staging.omniplex.gg/users/notifications/info"

Success

{
  "public_key": "string"
}

GET
/users/{id}/notifications

Get User Notifications

Gets a users notifications

/users/{id}/notifications

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Path Parameters

id
Required
string

User ID

curl -X GET "https://spider-staging.omniplex.gg/users/string/notifications" \
  -H "User-Auth: <token>"

Success

{
  "notifications": [
    {
      "browser_info": {
        "browser": "string",
        "browser_ver": "string",
        "mobile": true,
        "os": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "endpoint": "string",
      "notif_id": "string"
    }
  ]
}

POST
/users/{id}/notifications

Create User Notification

Creates a new subscription for a push notification. Returns 204 on success

/users/{id}/notifications

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Request Body

application/jsonRequired

authstring

The auth key for the subscription returned by PushSubscription

endpointstring

The endpoint for the subscription returned by PushSubscription

p256dhstring

The p256dh key for the subscription returned by PushSubscription

Path Parameters

id
Required
string

User ID

curl -X POST "https://spider-staging.omniplex.gg/users/string/notifications" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "auth": "string",
    "endpoint": "string",
    "p256dh": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

DELETE
/users/{id}/notification

Delete User Notifications

Deletes a users notification. Returns 204 on success

/users/{id}/notification

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Path Parameters

id
Required
string

User ID

Query Parameters

notif_id
Required
string

Notification ID

curl -X DELETE "https://spider-staging.omniplex.gg/users/string/notification?notif_id=string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}