Set Preferences
PUT
/api/v1/inbox/preferencesAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredRequest body
requiredapplication/jsonchannelsobjectmuted_topicsobjectResponses
200Successful Response
successbooleandefault: true
dataPreferencesView | anyShow propertiesHide properties
Any of:
PreferencesView
preferencesNotificationPreferencesrequiredWhich channels a person wants per kind; an absent kind takes `DEFAULT_CHANNELS`.
Its own collection because `UsersRepository.upsert` replaces the whole user mirror on every
Clerk `user.updated` webhook, wiping any field not on the `User` model.
Show propertiesHide properties
idstringrequiredchannelsobjectmuted_topicsobjectupdated_atstring<date-time>slack_kindsNotificationKind[]requiredtopicsobjectrequiredany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X PUT "/api/v1/inbox/preferences" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channels": {
"property1": [
"inbox"
],
"property2": [
"inbox"
]
},
"muted_topics": {
"property1": [
"string"
],
"property2": [
"string"
]
}
}'const response = await fetch("/api/v1/inbox/preferences", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"channels": {
"property1": [
"inbox"
],
"property2": [
"inbox"
]
},
"muted_topics": {
"property1": [
"string"
],
"property2": [
"string"
]
}
})
});import requests
response = requests.put(
"/api/v1/inbox/preferences",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"channels": {
"property1": [
"inbox"
],
"property2": [
"inbox"
]
},
"muted_topics": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
)Response
{
"success": true,
"data": {
"preferences": {
"id": "string",
"channels": {
"property1": [
"inbox"
],
"property2": [
"inbox"
]
},
"muted_topics": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"updated_at": "2019-08-24T14:15:22Z"
},
"slack_kinds": [
"comment_mention"
],
"topics": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}