upsert_suprsend_user
Upsert a SuprSend user by setting properties or managing delivery channels. Perform one action per call: set, unset, append, increment, add/remove channel identifiers.
Instructions
Modify properties or channel identifiers on a SuprSend user. One call performs ONE action; for multiple changes, call this tool multiple times.
Actions:
set, set_once, unset, remove — modify a scalar property by key/value. remove permanently deletes the key.
append, increment — modify array / numeric values.
set_preferred_language, set_timezone — locale and timezone on the user.
add_email / remove_email, add_sms / remove_sms, add_whatsapp / remove_whatsapp, add_androidpush / remove_androidpush, add_iospush / remove_iospush, add_slack / remove_slack — register or deregister a delivery channel.
Channel registration is special. For channel identifiers ALWAYS use the dedicated add_ / remove_ actions — generic set / unset will not register the channel correctly with the delivery router. Slack additionally requires the slack_details payload alongside the action.
When to use: creating a new user or modifying an existing user's stored state.
When NOT to use:
For non-user entities — use upsert_suprsend_object.
For preferences — use update_suprsend_users_preferences (per category) or update_suprsend_user_channel_preference (across categories).
For tenant settings — use upsert_suprsend_tenant.
Side effects: remove and unset permanently delete data. add_ makes the user reachable on that channel for any future workflow run; remove_ stops delivery immediately.
Returns: the updated user on success; structured error with field reasons on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The action to perform. use action "upsert" to create a new user or update an existing user's properties. use action "remove" to remove a user's properties. use action "set" to set a user's property, don't use this when trying to add email, add sms, add whatsapp, add androidpush, add iospush, add slack use the respective actions. use action "unset" to unset a user's property, don't use this when trying to remove email, remove sms, remove whatsapp, remove androidpush, remove iospush, remove slack use the respective actions. use action "set_once" to set a user's property once, this will only set the property if it is not already set. use action "append" to append a value to a user's property. use action "increment" to increment a user's property. use action "add_email" to add an email to a user. use action "remove_email" to remove an email from a user. use action "add_sms" to add an SMS to a user. use action "remove_sms" to remove an SMS from a user. use action "add_whatsapp" to add a WhatsApp to a user. use action "remove_whatsapp" to remove a WhatsApp from a user. use action "add_androidpush" to add an Android push to a user. use action "remove_androidpush" to remove an Android push from a user. use action "add_iospush" to add an iOS push to a user. use action "remove_iospush" to remove an iOS push from a user. use action "add_slack" to add a Slack to a user. use action "remove_slack" to remove a Slack from a user. use action "set_preferred_language" to set a user's preferred language. use action "set_timezone" to set a user's timezone. | |
| distinct_id | Yes | The distinct_id of the user to get. | |
| key | No | The key on which the action is to be performed. only required for set, append, increment, unset actions. | |
| ms_teams_details | No | This is only applicable for add_ms_teams and remove_ms_teams actions. | |
| slack_details | No | This is only applicable for add_slack and remove_slack actions. | |
| value | No | The value to needs to be added/removed/set/unset/appended/incremented. | |
| webpush_details | No | This is only applicable for add_webpush and remove_webpush actions. | |
| workspace | No | SuprSend workspace to get the user from. |