Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 3.94 KB

README.md

File metadata and controls

66 lines (46 loc) · 3.94 KB

SubscribersMessages

(subscribersMessages)

Overview

Available Operations

  • markAll - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.

markAll

Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use novu;
use novu\Models\Components;

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

$markAllMessageAsRequestDto = new Components\MarkAllMessageAsRequestDto(
    markAs: Components\MarkAllMessageAsRequestDtoMarkAs::Seen,
);

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

);

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 */*