Event type: User
User events are related to users registered in the Magine Pro Platform and changes related to that user object.
The available events are:
User Created
Trigger:
Whenever a user is created, it triggers a User Created event. This can happen either when a user registers to your service, when our platform API is used to create users or when an admin creates an account through the Magine Pro Console.
Type:
user.created
Payload
{
"type": "user.created",
"timestamp": "2022-11-03T20:26:10.344522Z",
"data": {
"userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
"name": "John Doe",
"country": "SE",
"locale": "sv",
"email": "[email protected]",
"emailOptIn": true,
"mobilePhone": "",
"tags": ["tag", "tag-b"],
"birthDate": "1990-12-24",
"gender": "male",
"zipCode": "12345"
}
}
User Updated
Trigger:
User updated is triggered any time a user object is updated. This can occur through various channels, including the user making changes themselves, an administrator updating information in the Magine Pro Console, or an internal platform process modifying a field based on business logic.
Type:
user.updated
Payload
{
"type": "user.updated",
"timestamp": "2022-11-03T20:26:10.344522Z",
"data": {
"userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
"name": "John Doe",
"country": "SE",
"locale": "sv",
"email": "[email protected]",
"mobilePhone": "",
"tags": ["tag", "tag-b"],
"birthDate": "1990-12-24",
"gender": "male",
"zipCode": "12345"
}
}
User Deleted
Trigger:
A user can be deleted from the service either if the feature is enabled in iOS and Android devices or by and admin through the Magine Pro Console. When the user is deleted, a user deleted event will be triggered.
Type:
user.deleted
Payload
{
"type": "user.deleted",
"timestamp": "2024-03-06T14:41:43.304Z",
"data": {
"userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
"email": "[email protected]"
}
}
Parameters
In the various events, the included parameters inside the data object will vary between the different events and what was actually added or changed in the user object. These are the parameters that can be included:
Field | Type | Description |
---|---|---|
userId | string | ID of the user. |
name | string | Name of the user. |
country | string | Country of the user. |
locale | string | The locale set on the user. |
string | Email for the user. | |
emailOptIn | boolean | If the user have opted in to |
emailBeforeUpdate | string | Is only included if the contact |
mobilePhone | string | Phone number for the user. |
tags | array | Tags set on the user. |
birthDate | string | Birthdate of the user. |
gender | string | Gender set on the user. |
zipCode | string | Zip code for the user. |
Updated about 2 months ago