update_suprsend_category_preference_object
Overwrite the opt-in or opt-out preference for one category on one object, with optional per-channel opt-outs.
Instructions
Set ONE category's preference for ONE object — opted in, opted out, or cant_unsubscribe (locked) — plus per-channel opt-outs within that category.
Replaces, does not merge. This call overwrites the existing preference for the named category. Previous opt-outs within the same category are lost; pass them again in opt_out_channels if you want to keep them.
When to use: changing a single category on a single object.
When NOT to use:
For object-wide channel toggles ("block all SMS") — use update_suprsend_object_channel_preference.
For users — use update_suprsend_users_preferences.
For tenant defaults — use update_suprsend_tenant_default_preference.
Preference values: opt_in enables; opt_out disables; cant_unsubscribe locks the object from toggling this category.
Returns: updated preference state on success; structured error on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | category_slug of an category to get. | |
| object_id | Yes | The object_id of the object to get preferences from. | |
| object_type | Yes | The object_type of the object to get preferences from. | |
| opt_out_channels | No | The channels to opt out from for the object. | |
| preference | Yes | The preference to update for the object. | |
| workspace | No | SuprSend workspace to get the user from. |