Notifications (Project-wide)

Here you can interact with the actual notifications sent to the users, or send a new notification. This section deals with project-wide notifications - meaning you can list & query notifications for any user in this project. If you would like to limit your searches to a particular user, refer to the next section - Notifications API (User-wide).

List notifications paginated

GET {base_uri}/project/{project_id}/notifications

Get a list of notifications sent within this project. Sorted by default in reverse chronological order (latest notifications first).

Example response

GET https://belltastic.com/api/v1/project/1/notifications

{
  "data": [
    {
      "id": "95081119-85e2-48aa-9c21-a8fab5bcbfbf",
      "project_id": 1,
      "user_id": 31,
      "icon": "https:\/\/via.placeholder.com\/80x80.png\/005555?text=maxime",
      "title": "aliquid cumque totam fugiat",
      "body": "Voluptatem temporibus voluptatibus repellendus laudantium quo esse quis. Accusantium unde ut vel laudantium dolorem.",
      "category": "system",
      "action_url": null,
      "seen_at": null,
      "read_at": null,
      "created_at": "2021-11-26T18:39:46+00:00",
      "deleted_at": null
    },
    {
      "id": "95081119-8536-44fb-b3f4-2652b73c3450",
      "project_id": 1,
      "user_id": 31,
      "icon": "https:\/\/via.placeholder.com\/80x80.png\/006677?text=animi",
      "title": "porro quia accusamus ea",
      "body": "Et similique et ut. Qui iste fugit distinctio ut et iure minus. Ipsam officiis sunt quos aut.",
      "category": "comment",
      "action_url": "http:\/\/olson.info\/ea-explicabo-itaque-et",
      "seen_at": "2021-12-04T11:53:37+00:00",
      "read_at": null,
      "created_at": "2021-11-21T01:26:48+00:00",
      "deleted_at": null
    },
    ...
  ],
  "links": {
    "first": null,
    "last": null,
    "prev": null,
    "next": "https:\/\/belltastic.com\/api\/v1\/project\/1\/notifications?cursor=eyJpZCI6Ijk1MDYyNWYzLTUyMmQtNDY1Ny1iYzM5LWFhMThmZmRkMTMzZSIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
  },
  "meta": {
    "path": "https:\/\/belltastic.com\/api\/v1\/project\/1\/notifications",
    "per_page": 10
  }
}

Show notification

GET {base_uri}/project/{project_id}/notification/{id}

Get a single notification from the project.

Example response

GET https://belltastic.com/api/v1/project/1/notification/95081119-85e2-48aa-9c21-a8fab5bcbfbf

{
  "id": "95081119-85e2-48aa-9c21-a8fab5bcbfbf",
  "project_id": 1,
  "user_id": 31,
  "icon": "https:\/\/via.placeholder.com\/80x80.png\/005555?text=maxime",
  "title": "aliquid cumque totam fugiat",
  "body": "Voluptatem temporibus voluptatibus repellendus laudantium quo esse quis. Accusantium unde ut vel laudantium dolorem.",
  "category": "system",
  "action_url": null,
  "seen_at": null,
  "read_at": null,
  "created_at": "2021-11-26T18:39:46+00:00",
  "deleted_at": null
}

Archive notification

PUT {base_uri}/project/{project_id}/notification/{id}/archive

Archive (soft-delete) a single notification from the project. It will disappear from the user's notification box.

If the notification was archived already, it will no nothing - the deleted_at timestamp will not be updated.

Example response

PUT https://belltastic.com/api/v1/project/1/notification/95081119-85e2-48aa-9c21-a8fab5bcbfbf/archive

{
  "message": "Notification archived.",
  "data": {
    "id": "95081119-85e2-48aa-9c21-a8fab5bcbfbf",
    "project_id": 1,
    "user_id": 31,
    "icon": "https:\/\/via.placeholder.com\/80x80.png\/005555?text=maxime",
    "title": "aliquid cumque totam fugiat",
    "body": "Voluptatem temporibus voluptatibus repellendus laudantium quo esse quis. Accusantium unde ut vel laudantium dolorem.",
    "category": "system",
    "action_url": null,
    "seen_at": null,
    "read_at": null,
    "created_at": "2021-11-26T18:39:46+00:00",
    "deleted_at": "2021-12-11T06:30:55+00:00"
  }
}

Destroy notification

DELETE {base_uri}/project/{project_id}/notification/{id}

Permanently destroy a notification from this project. It will disappear from the user's notification box.

DANGER

Data cannot be retrieved after the notification has been destroyed as it will be permanently deleted from all our servers.

Example response

DELETE https://belltastic.com/api/v1/project/1/notification/95081119-85e2-48aa-9c21-a8fab5bcbfbf

{
  "message": "Notification deleted."
}