Space and Space Membership Webhooks
Space
When a space is created it results in space.created
event. Updating and deleting a space results in space.updated
and space.deleted
respectively.
The structure for all above events are as followed:
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T02:32:06.721Z",
"verb": "CREATED",
"verbAction": "ADDED",
"actor": {
"id": "olQ88vTqYp",
"roleId": "Kni0OF7HtE",
"roleType": "admin",
"sessionInfo": [
null
]
},
"object": {
"id": "ky4X0Ci6q4M5",
"networkId": "CAxOmI7I7t",
"groupId": "JJaH6objoJw3",
"customOrderingIndexInGroup": 6,
"createdById": "olQ88vTqYp",
"layout": null,
"createdAt": "2021-12-20T02:32:06.721Z",
"updatedAt": "2021-12-20T02:32:06.721Z",
"deletedAt": null,
"name": "Test space",
"slug": "test-space-eedrlif9",
"status": "created",
"description": null,
"seoDetail": [
null
],
"imageId": ":speech_balloon:",
"bannerId": null,
"membersCount": 0,
"private": false,
"hidden": false,
"inviteOnly": false,
"nonAdminsCanInvite": false,
"whoCanPost": null,
"whoCanReply": null,
"whoCanReact": null,
"spaceRoles": [
null
],
"networkRoles": [
null
]
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"groupId": "JJaH6objoJw3",
"spaceId": "ky4X0Ci6q4M5",
"collectionId": "JJaH6objoJw3"
},
"id": "8147a2af79248c3c8815ffeaa6777a7f",
"name": "space.created",
"noun": "SPACE",
"shortDescription": "Create Space"
}
Space membership
The space_membership.created
event is called when a member joins a space or is added to one. This includes when a member is added automatically to the default spaces.
The space_membership.deleted
event is called when a member leaves a space or is removed from one. The structure these requests are similar and as followed:
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T03:35:55.782Z",
"verb": "CREATED",
"verbAction": "ADDED",
"actor": {
"id": "zENywtyv1G",
"roleId": "bbh6VcnbNR",
"roleType": "member",
"sessionInfo": [
null
]
},
"object": {
"networkId": "CAxOmI7I7t",
"spaceId": "kBMLH6nwC78J",
"memberId": "zENywtyv1G",
"joinedAt": "2021-12-20T03:35:55.782Z",
"removedAt": null,
"roleId": "02zyUfsN0pvb",
"status": "joined",
"id": "UWCTDyGHFDdne7o",
"createdAt": "2021-12-20T03:35:55.746Z",
"updatedAt": "2021-12-20T03:35:55.746Z"
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"groupId": "JJaH6objoJw3",
"spaceId": "kBMLH6nwC78J",
"memberId": "zENywtyv1G",
"collectionId": "JJaH6objoJw3"
},
"id": "7495f96f80d0c93331a314d3d192b008",
"name": "space_membership.created",
"noun": "SPACE_MEMBERSHIP",
"shortDescription": "Add Member To Space"
}
}
Space membership request
When a member requests to join an invitation only space, the space_join_request.created
event is called. Approving the request by an admin or moderator will result in space_join_request.accepted
event and rejecting it will result in space_join_request.rejected
event.
Please note that when a space membership request is accepted it will result in a separate webhook request for space_membership.create
event since the member will be added to the space as the result of this event.
The structure of these webhook requests are as followed:
{
"networkId": "CAxOmI7I7t",
"context": "NETWORK",
"entityId": "CAxOmI7I7t",
"currentSettings": [],
"type": "SUBSCRIPTION",
"data": {
"time": "2021-12-20T03:49:30.025Z",
"verb": "ACCEPTED",
"verbAction": "ACCEPTED",
"actor": {
"id": "olQ88vTqYp",
"roleId": "Kni0OF7HtE",
"roleType": "admin",
"sessionInfo": [
null
]
},
"object": {
"id": "TRvtRWokz4oYO3N0d3qmf",
"networkId": "CAxOmI7I7t",
"spaceId": "LfCVZ0kCnopN",
"status": "APPROVED",
"memberId": "zENywtyv1G",
"updatedById": "olQ88vTqYp",
"createdAt": "2021-12-20T03:47:40.444Z",
"updatedAt": "2021-12-20T03:49:30.025Z"
},
"target": {
"organizationId": "i7RkgwKXwz",
"networkId": "CAxOmI7I7t",
"groupId": "JJaH6objoJw3",
"spaceId": "LfCVZ0kCnopN",
"memberId": "zENywtyv1G",
"requestToJoinId": "TRvtRWokz4oYO3N0d3qmf",
"collectionId": "JJaH6objoJw3"
},
"id": "f035aaf670ee96fa9d30972f58246496",
"name": "space_join_request.accepted",
"noun": "SPACE_JOIN_REQUEST",
"shortDescription": "Accept Space Join Request"
}
}