Channel preferences
Use this reference with the complete developer tour and Python types. The example at the end runs after the tour setup.
delivery_preferences
Section titled “delivery_preferences”Read a Person’s versioned delivery defaults and Agent/Agent-role overrides.
delivery_preferences(self, person_id: str)| Parameter | Type and default | Usage |
|---|---|---|
person_id |
str (required) |
Stable recipient Person identity ID. |
Returns: DeliveryPreferences with person_id, version, default and ordered overrides.
Permissions, lifecycle and errors: Person self, administrator or authorized identity manager only. Reload after a stale-version conflict; preferences grant no contact authority.
Working Python example. Input/output fields are in the types reference.
save_delivery_preferences
Section titled “save_delivery_preferences”Save a Person’s channel policy using its observed version.
save_delivery_preferences(self, person_id: str, preferences: dict[str, Any])| Parameter | Type and default | Usage |
|---|---|---|
person_id |
str (required) |
Stable recipient Person identity ID. |
preferences |
dict[str, Any] (required) |
The recipient delivery preferences to save, including the observed version, default policy and ordered overrides. |
Returns: DeliveryPreferences with the incremented version; pending external sends from the previous configuration stop.
Permissions, lifecycle and errors: Person self, administrator or authorized identity manager only. Reload after a stale-version conflict; preferences grant no contact authority.
Working Python example. Input/output fields are in the types reference.
Example
Section titled “Example”Run this region after the shared setup. Assertions check the returned data; the full tour is a runnable program.
preferences = owner.delivery_preferences(person_id)saved_preferences = owner.save_delivery_preferences(person_id, { 'version': preferences['version'], 'default': {'mode': 'preferred', 'destinations': [], 'followup_seconds': 0}, 'overrides': []})assert saved_preferences['version'] > preferences['version']