Skip to content

Files

Latest commit

 

History

History
65 lines (45 loc) · 3.74 KB

README.md

File metadata and controls

65 lines (45 loc) · 3.74 KB

SubscribersMessages

(subscribersMessages)

Overview

Available Operations

  • markAll - Update all notifications state

markAll

Update all subscriber in-app (inbox) notifications state such as read, unread, seen or unseen by subscriberId.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use novu;
use novu\Models\Components;

$sdk = novu\Novu::builder()
    ->setSecurity(
        'YOUR_SECRET_KEY_HERE'
    )
    ->build();

$markAllMessageAsRequestDto = new Components\MarkAllMessageAsRequestDto(
    markAs: Components\MarkAs::Read,
);

$response = $sdk->subscribersMessages->markAll(
    subscriberId: '<id>',
    markAllMessageAsRequestDto: $markAllMessageAsRequestDto

);

if ($response->number !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
subscriberId string ✔️ N/A
markAllMessageAsRequestDto Components\MarkAllMessageAsRequestDto ✔️ N/A
idempotencyKey ?string A header for idempotency purposes

Response

?Operations\SubscribersV1ControllerMarkAllUnreadAsReadResponse

Errors

Error Type Status Code Content Type
Errors\ErrorDto 414 application/json
Errors\ErrorDto 400, 401, 403, 404, 405, 409, 413, 415 application/json
Errors\ValidationErrorDto 422 application/json
Errors\ErrorDto 500 application/json
Errors\APIException 4XX, 5XX */*