You can read more about preference categories here.
Note:
Changes will only be pushed if "validation_result":{"is_valid":true}
in the response. General reasons for validation failure are:
- There are multiple categories with the same slug
- Some subcategories have been deleted in this version, on which active workflows are configured
- You’ve not passed all three categories in the request body - system, transactional, promotional
Authorizations
You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Path Parameters
Workspace slug (staging, production, etc.)
Query Parameters
Whether to commit changes immediately. Set to true to make changes live, false to save as draft.
Optional commit message describing the changes made. Required when commit=true.
Body
Array of preference categories. Include all three root categories (system, transactional, promotional) even if empty.
Response
Successfully created/updated preference category
JSON schema reference for preference category structure
"https://schema.suprsend.com/preference_category/v1/schema.json"
Array of preference categories
Current status of the preference category
draft
, active
"draft"
Version number of the preference category
3
Commit message describing the changes that were made
null
Timestamp when the changes were committed
null
Result of validating the preference category