Create / Update object
This is anupsert
method, used to create or update an object.
Edit an object
There are 2 ways in which you can edit an object data.- Build edit payload yourself
- Use helper methods provided by SDK (Recommended)
Edit an object (build edit payload yourself)
Use this to modify an object, typically for removing channels or unsetting properties. The payload will follow the same structure as the Object Edit APIEdit an object (using helper methods) [Recommended]
To edit object, you need to first fetch object instance, call all the update methods and save changes usingobjects.edit
method.
Add Channels
Add Channels
Use
object_ins.add*
method(s) to add channelsRemove Channels
Remove Channels
Use
object_ins.remove_*
method(s) to remove channels from an objectRemove Channels in bulk
Remove Channels in bulk
This method will delete/unset all values in specified channel for object (ex: remove all emails attached to object).
Set preferred language
Set preferred language
If you want to send notification in user’s preferred language, you can set it by passing language code in this method. This is useful especially for the applications which offer vernacular or multi-lingual support.
Set timezone
Set timezone
You can set timezone of user using this method. Value for timezone must be from amongst the IANA timezones.
Set
Set
Set any custom property using this method. It will shallow merge existing properties with new values. Key shouldn’t start with
$
or ss
.Unset
Unset
Use this to unset existing channels or properties.
Append
Append
Use this to append item to an array based property.
Remove
Remove
Use this to remove an item from array based property
Set once
Set once
Use this to add new properties which are not overridden, such as
first_login_at
Increment
Increment
Use on numeric values to increment/decrement. Provide a negative value for decrement
List objects
List objects for anobject_type
. You can also pass listing options in the payload which includes limit
,before
,after