Each event has a similar JSON schema, but a unique payload object that is determined by its event type.
Common Attributes
Every webhook has a couple of common attributes to identify those events.
Attribute | Note |
event.id | A unique GUID to represent the event (RFC 4122) |
event.type | Type of an event. This will remain constant across all events of this type that is being pushed through the webhook. |
event.timestamp | Formatted date timestamp. (RFC 2822) |
AuthenticationSuccessEvent
Webhook event name
authentication_success
Example payload
{
"event": {
"id": "cf6091c9-1085-43c3-a73f-202562d1b8ab",
"type": "authentication_success",
"timestamp": 1518596198
},
"member": {
"id": "000123",
"internal_id": 5878092,
"firstname": "John",
"lastname": "Smith",
"avatar_url: "https://ugc.rewardgateway.net/avatars/5870000/5878092/200x200_c70a5e1ca50a727d22e5c670b8b43ssddb88.jpg",
"email": "john.smith@example.com"
}
}
MemberCreatedEvent
WEBHOOK EVENT NAME
member_created
EXAMPLE PAYLOAD
{
"event": {
"id": "cf6091c9-1085-43c3-a73f-202562d1b8ab",
"type": "member_created",
"timestamp": 1518596198
},
"member": {
"id": "000123",
"internal_id": 5878092,
"firstname": "John",
"lastname": "Smith",
"avatar_url: "https://ugc.rewardgateway.net/avatars/5870000/5878092/200x200_c70a5e1ca50a727d22e5c670b8b43ssddb88.jpg",
"email": "john.smith@example.com"
}
}
MemberRevokedEvent
WEBHOOK EVENT NAME
member_revoked
EXAMPLE PAYLOAD
{
"event": {
"id": "cf6091c9-1085-43c3-a73f-202562d1b8ab",
"type": "member_created",
"timestamp": 1518596198
},
"member": {
"id": "000123",
"internal_id": 5878092,
"firstname": "John",
"lastname": "Smith",
"avatar_url: "https://ugc.rewardgateway.net/avatars/5870000/5878092/200x200_c70a5e1ca50a727d22e5c670b8b43ssddb88.jpg",
"email": "john.smith@example.com"
}
}
Comments
0 comments
Please sign in to leave a comment.