Get Preference Category

Changed on

Retrieve the current preference category for a workspace

get/v1/{workspace}/preference_category/

Request

Path parameters

workspacestring required

Workspace slug (staging, production, etc.)

Query parameters

mode'live' | 'draft'

Mode to retrieve categories. Use 'live' for active categories or 'draft' for current draft. Defaults to draft. validation_result is returned only for the draft version.

Response

Successfully retrieved preference category

$schemastring

JSON schema reference for preference category structure

version_nointeger

Version number field as an identifier to track the version

status'draft' | 'active'

Current status of the preference category

Example response

{
  "$schema": "https://schema.suprsend.com/preference_category/v1/schema.json",
  "root_categories": [
    {
      "root_category": "system",
      "sections": [
        {
          "name": "Account Updates",
          "description": "Important account-related notifications",
          "categories": [
            {
              "category": "password-reset",
              "name": "Password Reset",
              "default_preference": "opt_in",
              "default_mandatory_channels": [
                "email"
              ],
              "is_commercial": true,
              "digest_schedule": {
                "options": [
                  {
                    "time": {
                      "default_value": "00:00"
                    },
                    "dtstart": {
                      "default_value": "2026-06-20T00:00:00Z"
                    }
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "version_no": 1
}

Changes

    • info

      added the optional property ////// to the response with the status

    • warning

      added the new ms_teams enum value to the /////// response property for the response status

    • warning

      added the new ms_teams enum value to the /////// response property for the response status

    • info

      the query request parameter mode became optional