Add and/or remove items of a list-valued preference (dismissed_workspaces, views_only_workspaces), atomically: two tabs adding different items never lose one
PATCH
/api/v1/users/me/preferences/lists
const url = 'https://example.com/api/v1/users/me/preferences/lists';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"list":"dismissed_workspaces","add":["example"],"remove":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/users/me/preferences/lists \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "list": "dismissed_workspaces", "add": [ "example" ], "remove": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
list
required
string
add
Array<string>
remove
Array<string>