Skip to main content

Member Webhooks

In this section, we cover member.created, member.verified, member.updated, and member.deleted events.

Member creation and verification

Right after a member registers the member.created event is triggered. This is when the member object is created on Bettermode.

After the member verifies their account, member.verified event is triggered. At this point, the member account is active and they're able to perform actions.

Event name: member.created
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T03:32:18.757Z",
"verb": "CREATED",
"verbAction": "ADDED",
"actor": {
"id": "vBvRy32yvV",
"roleId": "ZK6Ddb35aw",
"roleType": "guest",
"sessionInfo": [
null
]
},
"with": {
"hasInvitation": true,
"hasRequestToJoin": false
},
"object": {
"networkId": "CAxOmI7I7t",
"username": "siavash.lij6z7zd",
"email": "[email protected]",
"emailStatus": "notDelivered",
"password": null,
"afterVerificationRoleId": null,
"roleId": "ZK6Ddb35aw",
"name": "Siavash",
"invitationLinkId": "Nab5VLjadkLuOCsqjffJp",
"id": "zENywtyv1G",
"externalId": null,
"verifiedAt": null,
"blockedAt": null,
"deletedAt": null,
"lastSeen": null,
"verificationCode": null,
"verificationCodeExpiresAt": null,
"displayName": null,
"profilePictureId": null,
"bannerId": null,
"tagline": null,
"phone": null,
"bio": null,
"createdAt": "2021-12-20T03:32:18.757Z",
"updatedAt": "2021-12-20T03:32:18.757Z",
"status": "UNVERIFIED",
"verificationTries": null,
"teammate": false,
"overrideTeammate": false,
"attributes": [
null
],
"fields": [
null
]
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"invitationLinkId": "Nab5VLjadkLuOCsqjffJp",
"memberId": "zENywtyv1G"
},
"id": "e93d6e7272fe7b56a7cdb26a75327f6d",
"name": "member.created",
"noun": "MEMBER",
"shortDescription": "Create Unverified Member"
}
}
Event name: member.verified
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T03:35:55.659Z",
"verb": "VERIFIED",
"verbAction": "VERIFIED",
"actor": {
"id": "zENywtyv1G",
"roleId": "bbh6VcnbNR",
"roleType": "member",
"sessionInfo": [
null
]
},
"with": {
"hasInvitation": false,
"hasRequestToJoin": false
},
"object": {
"id": "zENywtyv1G",
"networkId": "CAxOmI7I7t",
"externalId": null,
"createdAt": "2021-12-20T03:32:18.757Z",
"updatedAt": "2021-12-20T03:35:55.657Z",
"verifiedAt": "2021-12-20T03:35:55.659Z",
"blockedAt": null,
"deletedAt": null,
"lastSeen": null,
"status": "VERIFIED",
"username": "siavash.lij6z7zd",
"email": "[email protected]",
"emailStatus": "verified",
"password": null,
"verificationCode": null,
"verificationCodeExpiresAt": null,
"verificationTries": null,
"afterVerificationRoleId": null,
"teammate": false,
"overrideTeammate": false,
"roleId": "bbh6VcnbNR",
"name": "Siavash",
"displayName": null,
"profilePictureId": null,
"bannerId": null,
"tagline": null,
"phone": null,
"bio": null,
"attributes": [
null
],
"invitationLinkId": "Nab5VLjadkLuOCsqjffJp",
"fields": [
null
]
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"memberId": "zENywtyv1G"
},
"id": "2b749870ec3b75687448773c89354321",
"name": "member.verified",
"noun": "MEMBER",
"shortDescription": "Create Member"
}
}

Member update and deletion

When a member is updated or deleted, member.updated and member.deleted events are colled.

The webhook request structure for both events look as followed:

Event name: member.updated
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T04:43:13.694Z",
"verb": "UPDATED",
"verbAction": "UPDATED",
"actor": {
"id": "olQ88vTqYp",
"roleId": "Kni0OF7HtE",
"roleType": "admin",
"sessionInfo": [
null
]
},
"with": {
"hasInvitation": false,
"hasRequestToJoin": false
},
"object": {
"id": "olQ88vTqYp",
"networkId": "CAxOmI7I7t",
"externalId": null,
"createdAt": "2021-12-15T21:43:41.848Z",
"updatedAt": "2021-12-20T04:43:13.694Z",
"verifiedAt": "2021-12-15T21:44:03.186Z",
"blockedAt": null,
"deletedAt": null,
"lastSeen": null,
"status": "VERIFIED",
"username": "admin",
"email": "[email protected]",
"emailStatus": "verified",
"password": null,
"verificationCode": null,
"verificationCodeExpiresAt": null,
"verificationTries": null,
"afterVerificationRoleId": null,
"teammate": true,
"overrideTeammate": false,
"roleId": "Kni0OF7HtE",
"name": "Siavash",
"displayName": null,
"profilePictureId": "fztnlqmX167UOT9I40j63",
"bannerId": null,
"tagline": "Co-founder at Bettermode",
"phone": null,
"bio": null,
"attributes": [
null
],
"invitationLinkId": null,
"fields": [
null
]
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"memberId": "olQ88vTqYp"
},
"id": "1b8946f5e703c2ce906fe5753fa1ca1e",
"name": "member.updated",
"noun": "MEMBER",
"shortDescription": "Update Member"
}
}

Member invitation

When a member invites members by email to their community the member_invitation.created event is called for each email.

When a member joins through an invitation email, right after the member registers member_invitation.accepted event is called.

After a member invitation is expired, it results in member_invitation.rejected event.

The structure for for all above webhook events is as followed:

Event name: member_invitation.accepted
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T05:02:54.660Z",
"verb": "ACCEPTED",
"verbAction": "ACCEPTED",
"actor": {
"id": "GUEST_NUc1Mp3kbE44VVa",
"roleId": "ZK6Ddb35aw",
"roleType": "guest",
"sessionInfo": [
null
]
},
"object": {
"id": "f8RBXo0sPKtw5EvoNnZJd",
"networkId": "CAxOmI7I7t",
"createdAt": "2021-12-20T05:00:01.078Z",
"updatedAt": "2021-12-20T05:02:54.660Z",
"expiresAt": "2022-01-19T05:00:01.067Z",
"joinedAt": "2021-12-20T05:02:54.660Z",
"status": "accepted",
"inviterId": "olQ88vTqYp",
"inviteeEmail": "[email protected]",
"inviteeName": "",
"inviteeId": "qPW05chmNr",
"roleId": "bbh6VcnbNR",
"token": "SaOpRtP4pmRDdOHLPpq8M",
"invitationMessage": null
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"invitationId": "f8RBXo0sPKtw5EvoNnZJd"
},
"id": "96b814bcc5d43582aac44fd985d63834",
"name": "member_invitation.accepted",
"noun": "MEMBER_INVITATION",
"shortDescription": "Accept Member Invitation"
}
}