Skip to main content
POST
/
v1
/
subscribers
/
{subscriberId}
/
messages
/
mark-all
PHP
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
}
123

Authorizations

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

subscriberId
string
required

Body

application/json
markAs
enum<string>
required

Mark all subscriber messages as read, unread, seen or unseen

Available options:
read,
seen,
unread,
unseen
feedIdentifier

Optional feed identifier or array of feed identifiers

Response

The response is of type number.