Update Channel Preferences
PUT
/api/canvas/notifications/channel-preferences
const url = 'https://example.com/api/canvas/notifications/channel-preferences';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"in_app":true,"slack":true,"push":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://example.com/api/canvas/notifications/channel-preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "in_app": true, "slack": true, "push": true }'Update notification channel preferences for the current user.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
ChannelPrefsResponse
object
in_app
required
In App
boolean
slack
required
Slack
boolean
push
required
Push
boolean
Example generated
{ "in_app": true, "slack": true, "push": true}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}