Update a notification category
PUT
/v1/preferences/categories/{key}
const url = 'https://your-notavia-host/v1/preferences/categories/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","default_channels":["email"],"default_opt_in":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://your-notavia-host/v1/preferences/categories/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "default_channels": [ "email" ], "default_opt_in": true }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” key
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
description
string
default_channels
required
Array<string>
default_opt_in
required
boolean
Responses
Section titled “ Responses ”Updated category.
Media type application/json
object
id
string format: uuid
key
string
name
string
description
string
is_critical
boolean
default_channels
Array<string>
default_opt_in
boolean
is_archived
boolean
Example
{ "default_channels": [ "email" ]}Validation or request error.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Missing or invalid credentials.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Credentials do not have the required scope.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Resource not found.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}