(Subscribers.Preferences.Legacy)
- UpdateGlobal - Update subscriber global preferences
Update subscriber global preferences
package main
import(
"context"
"os"
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := novugo.New(
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)
res, err := s.Subscribers.Preferences.Legacy.UpdateGlobal(ctx, "<id>", components.UpdateSubscriberGlobalPreferencesRequestDto{}, nil)
if err != nil {
log.Fatal(err)
}
if res.UpdateSubscriberPreferenceGlobalResponseDto != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
subscriberID |
string | ✔️ | N/A |
updateSubscriberGlobalPreferencesRequestDto |
components.UpdateSubscriberGlobalPreferencesRequestDto | ✔️ | N/A |
idempotencyKey |
*string | ➖ | A header for idempotency purposes |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse, error
Error Type | Status Code | Content Type |
---|---|---|
apierrors.ErrorDto | 414 | application/json |
apierrors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
apierrors.ValidationErrorDto | 422 | application/json |
apierrors.ErrorDto | 500 | application/json |
apierrors.APIError | 4XX, 5XX | */* |