Create Users and Custom Attributes

1- Do I necessarily need to create users to send messages? I didn’t really understand this function, because I didn’t register and sending and receiving notifications is already working.

2- What is the function of customs_atributes. I could give examples of use in scenarios.

Hey @mequelussi!

Great questions. We should add some information about when to use the /users API in the docs.

You don’t need to create users before sending the notifications. As you said, the POST /notifications endpoint can create a user if one isn’t found. However if you have already created users and setup an externalID, you can use that instead of sending us the email address.

You can setup custom_attributes for users and those can be used for matching and sending to a segment. As an example, you can notify all agents or any other group that you want to notify. This is an enterprise-plan feature.

You can also send custom_attributes for notifications. They are useful if you want to disable the default click behavior and add an onNotificationClick callback. When we invoke the callback, we’ll pass you the entire notification object, including the custom_attributes that you provided us. Then you can use these attributes to do any kind of custom redirects or analytics.