Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 4.17 KB

File metadata and controls

59 lines (43 loc) · 4.17 KB

Subscribers.Preferences

Overview

Available Operations

BulkUpdate

Bulk update subscriber preferences by its unique key identifier subscriberId. This API allows updating multiple workflow preferences in a single request.

Example Usage

using Novu;
using Novu.Models.Components;
using System.Collections.Generic;

var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");

var res = await sdk.Subscribers.Preferences.BulkUpdateAsync(
    subscriberId: "<id>",
    bulkUpdateSubscriberPreferencesDto: new BulkUpdateSubscriberPreferencesDto() {
        Preferences = new List<BulkUpdateSubscriberPreferenceItemDto>() {},
        Context = new Dictionary<string, BulkUpdateSubscriberPreferencesDtoContext>() {
            { "key", BulkUpdateSubscriberPreferencesDtoContext.CreateStr(
                "org-acme"
            ) },
        },
    }
);

// handle response

Parameters

Parameter Type Required Description
SubscriberId string ✔️ N/A
BulkUpdateSubscriberPreferencesDto BulkUpdateSubscriberPreferencesDto ✔️ N/A
IdempotencyKey string A header for idempotency purposes

Response

SubscribersControllerBulkUpdateSubscriberPreferencesResponse

Errors

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