Use this API to set preference categories to be used in workflow or to show on user preference page.
Note:
Changes will only be pushed if "validation_result":{"is_valid":true} in the response. General reasons for validation failure are:
You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Workspace slug (staging, production, etc.)
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.
Array of root preference categories. Include all three root categories (system, transactional, promotional) even if empty.
Successfully created/updated preference category
JSON schema reference for preference category structure
"https://schema.suprsend.com/preference_category/v1/schema.json"
Array of root 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