Aller au contenu
NimbusNexus

Notifications

Une notification est un message dans l’application adressé à un seul utilisateur, par exemple une invitation à rejoindre un espace de travail ou la réponse à une demande de quota. Chacune a un title et un message, un delivery_status (pending, unread ou read), un visual_type (info, system, invite, payment, billing, warning, critical ou resize) et, en option, des meta_data sur l’objet qu’elle concerne.

GET /api/v1/notifications/list renvoie les notifications de l’appelant, de la plus récente à la plus ancienne, avec un total et un unread_count. Filtrez avec statuses, workspace_id, meta_data_key et meta_data_value, et paginez avec offset et limit (jusqu’à 200). Marquez-en une comme lue avec PATCH /api/v1/notifications/, ou plusieurs à la fois avec PATCH /api/v1/notifications/bulk. DELETE sur ces deux mêmes chemins les supprime.

Pour une livraison en direct, ouvrez un WebSocket vers /api/v1/ws avec votre token de session dans les headers du handshake. GET /api/v1/notifications/websocket-info décrit la connexion.

Étapes suivantes

  • Espaces de travail — les invitations à rejoindre un espace de travail arrivent sous forme de notifications.
  • Quotas — tout comme les réponses aux demandes de quota.
  • Facturation — les adresses e-mail qui reçoivent les relevés et les reçus.

Reference

POST/api/v1/notifications/

Create Notification

Create a new in-app notification addressed to the calling user in the current scope.

Request body

FieldTypeDescription
notification_typeobject—
message*string—
delivery_statusobject—
is_email_sentboolean—
title*string—
visual_typeobject—
has_actionsboolean—
meta_dataobject | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/notifications/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "example",
    "title": "Example"
  }'
PATCH/api/v1/notifications/

Update Notification

Update a single notification (for example to mark it as read) and return the updated record.

Request body

FieldTypeDescription
id*string—
notification_typeNotificationTypeEnum | null—
messagestring | null—
delivery_statusDeliveryStatusEnum | null—
created_atstring | null—
is_email_sentboolean | null—
titlestring | null—
visual_typeVisualTypeEnum | null—
has_actionsboolean | null—
meta_dataobject | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/notifications/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
DELETE/api/v1/notifications/

Delete Notification

Delete a single notification by ID.

Request body

FieldTypeDescription
id*string—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/notifications/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
PATCH/api/v1/notifications/bulk

Update Notifications Bulk

Update many notifications in a single transaction; reports any IDs that were not found.

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/notifications/bulk" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "id": "example"
    }
  ]'
DELETE/api/v1/notifications/bulk

Delete Notification Bulk

Delete many notifications in a single transaction; reports any IDs that were not found.

Request body

JSON body required.

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/notifications/bulk" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "id": "example"
    }
  ]'
GET/api/v1/notifications/list

Get Notifications List

List the calling user's notifications with filtering by delivery status, metadata and pagination.

Parameters

NameInTypeDescription
idquerystring | null—
statusesquerystring | null—
notification_typesquerystring | null—
workspace_idquerystring | null—
meta_data_keyquerystring | null—
meta_data_valuequerystring | null—
offsetqueryinteger—
limitqueryinteger—
sort_byquerystring | null—
sort_descqueryboolean—
provide_workspace_idqueryboolean—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/notifications/list" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/notifications/websocket-info

WebSocket connection guide

WebSocket Endpoint

More
    `wss://<host>/api/v1/ws`

    This endpoint establishes a persistent WebSocket connection used to receive real-time notifications.

    ---

    ## Authentication

    Authentication is required.

    JWT token must be provided in **HTTP headers** during the WebSocket handshake:

Responses

  • 200Successful Response
  • 401Unauthorized
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/notifications/websocket-info" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →