Skip to main content

Network Webhooks

Network

When the community (network) setting is updated, network.updated webhook event is called.

When the plan of a community is changed, plan.updated webhook event is called.

Here is how the structure for network webhooks looks like:

Event name: network.updated
{
"networkId": "ONyPnp8I8o",
"context": "NETWORK",
"entityId": "ONyPnp8I8o",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T05:24:42.452Z",
"verb": "UPDATED",
"verbAction": "UPDATED",
"actor": {
"id": "olQ88vTqYp",
"roleId": "Kni0OF7HtE",
"roleType": "admin",
"sessionInfo": [
null
]
},
"object": {
"id": "ONyPnp8I8o",
"createdAt": "2021-12-15T21:43:41.848Z",
"updatedAt": "2021-12-20T05:24:42.452Z",
"createdById": "olQ88vTqYp",
"ownerId": "olQ88vTqYp",
"name": "Bettermode Dev Test",
"slug": "bettermode-dev-test",
"description": null,
"domain": "bettermode-dev-test.bettermode.io",
"newDomain": "",
"aliases": [],
"faviconId": null,
"visibility": "public",
"membership": "inviteOnly",
"status": "published",
"statusLocked": false,
"statusReason": [
null
],
"whoCanInviteIds": [
null
],
"logoId": null,
"brandColor": null,
"locale": "en-US",
"incidentEmails": [],
"billingEmail": "[email protected]",
"organizationId": "j8SljvcYvy",
"navigationSlates": [
null
],
"oldThemes": null,
"activeThemeId": null,
"themes": null,
"topNavigation": null,
"footer": null,
"enabledSocialLogins": [],
"companyName": null,
"entrancePage": null,
"termsOfServiceUrl": null,
"privacyPolicyUrl": null,
"tribeBranding": true,
"subscriptionPlanId": "nFdIdtEoDxhNXJ3qZNwZh",
"memberCapacityDeclared": 5,
"seatCapacityDeclared": 1,
"customMemberCapacity": 0,
"additionalSeatsCapacity": 0,
"hideDefaultAuthenticationForm": false,
"subscriptionPlan": [
null
],
"seatsCapacity": 100,
"memberCapacity": 100,
"memberFields": [
null
],
"newThemes": [],
"activeTheme": null
},
"target": {
"organizationId": "j8SljvcYvy",
"networkId": "ONyPnp8I8o"
},
"id": "d1549307a9cd08df7dc20f68bda60eb6",
"name": "network.updated",
"noun": "NETWORK",
"shortDescription": "Update Network"
}
}

Apps

When an app is installed or uninstalled, app_installation.created and app_installation.deleted webhook events are called.

Installing an app

Updating app's setting in a community results in app_installation.updated.

The structure for above webhook requests is as followed:

Event name: app_installation.created
{
"networkId": "ONyPnp8I8o",
"entityId": "ONyPnp8I8o",
"type": "SUBSCRIPTION",
"data": {
"time": "2023-07-19T15:00:19.216Z",
"verb": "CREATED",
"verbAction": "ADDED",
"actor": {
"id": "Orqhv62gXX",
"roleId": "rVghIhIbsp",
"roleType": "admin",
"sessionInfo": {
"ip": "24.201.219.131",
"country": "CA",
"locale": "en-US",
"client": 0,
"clientVersion": "1.0.0",
"os": "Mac OS",
"osVersion": "10.15.7",
"deviceBrand": "",
"trackerGlobalSessionId": null,
"trackerSessionId": null
}
},
"object": {
"id": "chTyUWDtf66y",
"networkId": "ONyPnp8I8o",
"appId": "I56g1RsYKmYI",
"appVersion": "1.0.0",
"installedById": "Orqhv62gXX",
"uninstalledById": null,
"createdAt": "2023-07-18T16:37:14.384Z",
"updatedAt": "2023-07-19T15:00:19.216Z",
"installedAt": "2023-07-19T15:00:32.584Z",
"status": "ENABLED",
"context": "NETWORK",
"entityId": "ONyPnp8I8o",
"permissions": [
"*"
],
"uninstallationReason": null,
"templatesMappings": null,
"networkInfo": null
},
"target": {
"organizationId": "g1qdNmmQOB",
"networkId": "ONyPnp8I8o",
"networkDomain": "community.bettermode.com",
"appId": "I56g1RsYKmYI"
},
"id": "c74841bbce17a6243b88af3530abd5e0",
"name": "app_installation.created",
"noun": "APP_INSTALLATION",
"shortDescription": "Install App"
},
"currentSettings": [],
"entities": {
"network": {
"id": "ONyPnp8I8o",
"createdAt": "2022-02-17T22:26:32.112Z",
"updatedAt": "2023-06-20T15:18:02.167Z",
"name": "Bettermode",
"slug": "bettermode-community",
"domain": "community.bettermode.com",
"visibility": "public",
"membership": "open",
"status": "published",
"brandColor": null,
"locale": "en-US",
"tribeBranding": true,
"subscriptionPlan": {
"id": "b3MsbGhSBHBmrK1M201m4",
"networkId": "ONyPnp8I8o",
"name": "ADVANCED",
"memberCapacity": 100000,
"seatCapacity": 1,
"renewalType": "year",
"startDate": "2022-04-13T19:11:54.228Z",
"endDate": null,
"renewDate": null,
"trial": false,
"createdAt": "2022-04-13T19:11:54.231Z",
"updatedAt": "2022-04-13T19:11:54.231Z",
"extendable": false
}
},
"actor": {
"id": "Orqhv62gXX",
"externalId": null,
"status": "VERIFIED",
"username": "admin",
"email": "[email protected]",
"emailStatus": "verified",
"phone": "+15389910983",
"roleId": "rVghIhIbsp",
"role": {
"id": "rVghIhIbsp",
"createdAt": "2022-02-17T22:26:32.112Z",
"updatedAt": "2022-02-17T22:26:32.112Z",
"networkId": "ONyPnp8I8o",
"name": "Admin",
"description": null,
"scopes": [
"*"
],
"locked": true,
"type": "admin",
"visible": true,
"network": null
},
"name": "Bettermode Dev",
"profilePictureId": null,
"bannerId": null,
"tagline": "Bettermode Dev Ambassador",
"locale": "en-US",
"createdAt": "2022-02-17T22:26:32.112Z",
"updatedAt": "2023-06-20T18:27:22.087Z",
"lastSeenAt": "2023-07-19T14:57:36.913Z",
"teammate": true,
"fields": [
{
"key": "website",
"value": "\"https://bettermode.com\""
},
{
"key": "jobTitle",
"value": "\"Bettermode Dev Engineer\""
}
],
"settings": {
"privateMessaging": {
"privateMessagingEnabled": true
}
}
}
}
}

Uninstalling an app

Event name: app_installation.created
{
"networkId": "ONyPnp8I8o",
"entityId": "ONyPnp8I8o",
"currentSettings": [],
"type": "APP_UNINSTALLED",
"data": {
"id": "chTyUWDtf66y",
"networkId": "ONyPnp8I8o",
"appId": "I56g1RsYKmYI",
"appVersion": "1.0.0",
"installedById": "Orqhv62gXX",
"uninstalledById": "Orqhv62gXX",
"createdAt": "2023-07-18T16:37:14.384Z",
"updatedAt": "2023-07-18T17:00:25.529Z",
"installedAt": "2023-07-18T16:37:29.600Z",
"status": "DELETED",
"context": "NETWORK",
"entityId": "ONyPnp8I8o",
"permissions": [],
"uninstallationReason": "",
"templatesMappings": null,
"networkInfo": null
}
}