Skip to main content
PATCH
/
v1
/
{workspace}
/
preference_category
/
commit
/
Commit Category
curl -X PATCH "https://management-api.suprsend.com/v1/{workspace}/preference_category/commit/?commit_message=Added%20password-reset%20subcategory" \
  --header "Authorization: ServiceToken {token}" \
  --header "Content-Type: application/json"
{
  "$schema": "https://schema.suprsend.com/preference_category/v1/schema.json",
  "categories": [
    {
      "root_category": "system",
      "sections": [
        {
          "name": "Alerts",
          "description": null,
          "tags": null,
          "subcategories": [
            {
              "category": "critical-updates",
              "name": "Critical Updates",
              "description": "Important system alerts requiring immediate attention",
              "default_preference": "opt_in",
              "default_mandatory_channels": null,
              "tags": null
            }
          ]
        }
      ]
    },
    {
      "root_category": "transactional",
      "sections": [
        {
          "name": "Task Updates",
          "description": null,
          "tags": null,
          "subcategories": [
            {
              "category": "tagged-to-me",
              "name": "Tagged to Me",
              "description": "Status updates or mentions on tasks assigned by me or tagged to me",
              "default_preference": "opt_in",
              "default_mandatory_channels": null,
              "tags": null
            }
          ]
        }
      ]
    },
    {
      "root_category": "promotional",
      "sections": [
        {
          "name": "Product Updates",
          "description": null,
          "tags": null,
          "subcategories": [
            {
              "category": "newsletter",
              "name": "Newsletter",
              "description": null,
              "default_preference": "opt_out",
              "default_mandatory_channels": null,
              "tags": null
            }
          ]
        }
      ]
    }
  ],
  "version_no": 2,
  "status": "active",
  "commit_message": "Added password-reset subcategory",
  "committed_at": "2025-10-03T09:52:55.273317+00:00"
}

Authorizations

ServiceToken <token>
string
header
required

You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.

Path Parameters

workspace
string
required

Workspace slug (staging, production, etc.)

Query Parameters

commit_message
string
required

Commit message describing the changes being made live.

Response

Successfully committed preference category

$schema
string

JSON schema reference for preference category structure

Example:

"https://schema.suprsend.com/preference_category/v1/schema.json"

categories
object[]

Array of preference categories

status
enum<string>

Current status of the preference category

Available options:
draft,
active
Example:

"active"

version_no
integer

Version number of the preference category

Example:

2

commit_message
string

Commit message describing the changes that were made live

Example:

"Added password-reset subcategory"

committed_at
string<date-time>

Timestamp when the changes were committed

Example:

"2025-10-03T09:52:55.273317+00:00"

I