Send web push notification with custom data

I have a forum that I want to integrate web push notification in. When someone receives a PM or someone answers a thread, the user should get a notification.
I’ve managed to install WonderPush and send out notifications to specific users, but how do I customize the notification?

Example #1, a user gets a PM:
I want the notification to be sent to user X and say “Hello {user}! You have received a PM from {other user}!”

Example #2, some answers a thread:
I want the notification user X, Y and Z and to say “Hello {user}! The topic {topic} has been answered!”

I’m doing it with curl through PHP.

Hi,
Here is the documentation about content personalization:

I’ve read it and I still don’t understand how to do it.