Skip to content
Kumquat
Esc
↑↓navigate↵open⌘Jpreview

Set Preferences

PUT/api/v1/inbox/preferences
Authorization
AuthorizationBearer token · headerrequired
or
AuthorizationOAuth2 access token · headerrequired
Request body
requiredapplication/json
channelsobject
muted_topicsobject
Responses
200Successful Response
successboolean
default: true
dataPreferencesView | any
Show properties
Any of:
PreferencesView
preferencesNotificationPreferencesrequired
Which 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 properties
idstringrequired
channelsobject
muted_topicsobject
updated_atstring<date-time>
slack_kindsNotificationKind[]required
topicsobjectrequired
any
any
messagestring | any
Show properties
Any of:
string
string
any
any
errorsstring[] | any
Show properties
Any of:
string[]
Array of string
string
any
any
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
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"
    ]
  }
}'
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"
  ]
}