Update user settings

This page describes how to update the user settings for your account using the Management API.

This request uses RFC 6902 patch operations to update user settings. The specific operations that are supported depend on the settings you are updating. The supported operations are described in this documentation.

For more information about user settings, see User Settings.


User Settings - Management API

This section provides a basic example of how to update the user settings for your account using the Management API.

The request must include one or more operations. You can specify a different path for each operation, allowing you to update multiple settings at the same time.

Authentication

These requests require an access token, as described in Authenticate.

Update user settings

To update user settings with the Management API, use the PATCH <https://api.symbl.ai/v1/manage/settings> operation.

import fetch from 'node-fetch';

const accessToken = '<ACCESS_TOKEN>';
const settings = [
  {
    "op": "<OPERATION>",
    "path": "<PATH>",
    "value": "<VALUE>"
  },
  {
    "op": "<OPERATION>",
    "path": "<PATH>",
    "value": "<VALUE>"
  },
  ...
]

const fetchResponse = await fetch(`https://api.symbl.ai/v1/manage/settings`, {
  method: patch,
  body: JSON.stringify(settings),
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  }
});

const responseBody = await fetchResponse.json();

console.log(responseBody);

Where:

  • <ACCESS_TOKEN> is a valid API access token.
  • <OPERATION> is a valid RFC 6902 operation for the setting that you want to update. Usually this value is add, replace, or remove.
  • <PATH> is the path that represents the setting that you want to update. For example, the path for the bookmark duration setting is /intelligence/bookmarks/duration.
  • <VALUE> is the new value for the setting. The format and data type of the value depend on the setting you are updating.
  • ... indicates that the object can be repeated multiple times.

For additional details about the request body parameters for this request, see Request body parameters.

Request body parameters

The following table describes the body parameters that can be used with this request.

ParameterRequiredDescription
opYesShort label for a bookmark. Can be the same value as other bookmarks.
pathYesThe setting that you want to update. For example, /intelligence/bookmarks/duration targets the operation at the duration setting for bookmarks.
valueYesThe value for the setting.

Response

The following table describes the response body that is returned by this request. The fields are all contained in a settings object in the response.

FieldDescription
intelligenceContains settings objects for Symbl.ai’s conversation intelligence features.
intelligence.bookmarksContains settings for the Bookmarks feature.
intelligence.bookmarks.durationIn seconds, the default duration for a bookmark.
redactionContains settings for the Redaction feature.
redaction.defaultWhether redaction is enabled by default.
redaction.typeThe type of redaction that is used by default.

If the value is default, redacted entities are replaced with the name of the managed entity. For example, the sentence My name is Tony Stark becomes My name is [PERSON_NAME].

If the value is obfuscation, redacted entities are replaced with asterisks. For example, the sentence My name is Tony Stark becomes My name is [****].

If the value is custom, redacted entities are replaced with custom values specified in the custom object. For example, the sentence My name is Tony Stark can become My name is [John_Doe].
redaction.customContains the definitions for custom redaction of detected entities. These values are only used if redaction.type is custom.
redaction.custom.defaultThe type of redaction that is used if no custom definition for a detected entity is found.
redaction.custom.<ENTITY_SUBTYPE>The replacement value for the corresponding entity if detected and redaction is enabled. There may be zero or more definitions in the custom object.
redaction.excludeAn array of entity subtypes. These entities are excluded from redaction, if redaction is enabled.

Example response

{
  "settings": {
    "id": "5624147351175168",
    "intelligence": {
      "bookmarks": {
        "duration": 30
      }
    },
    "redaction": {
      "default": true,
      "type": "custom",
      "custom": {
        "default": "obfuscation",
        "SSN": "Social Security Number",
        "DRIVERS_LICENSE": "Personal ID"
      },
      "exclude": [
        "PERSON_NAME",
        "EMAIL_ADDRESS"
      ]
    }
  }
}