With Memberspot's webhook integration, you can notify external systems in real time about specific events occurring within your member area. Whenever a selected event occurs (e.g., a new member is added), Memberspot automatically sends data to a URL you define.
This allows you to connect Memberspot with countless other applications, such as your CRM system or your own custom scripts.
Setup is done in two main steps:
Create a webhook app: This is where you define the target URL and technical parameters.
Create an automation: This is where you define which event (trigger) should send data to your webhook app.
Step 1: Create the webhook app
First, you need to establish a connection to your external system.
Navigate in your Memberspot dashboard to
Settings > Integrations
Click on the
Add App
button and then selectWebhook
from the list of available integrations.A settings window will open. Enter the
notification URL
of your external system. This is the address to which Memberspot will send the data.After entering the URL, click
Validate Now
. Memberspot will now send the test event mentioned above to your URL to verify the connection.If the validation is successful, click
Save
. Your webhook app is now created and ready to use.
Important requirements for your notification URL
To ensure a successful connection and validation, your endpoint must meet the following criteria:
Accessibility: The URL must be publicly accessible on the internet.
Request type: The endpoint must be able to respond to
POST
requests.Success status code: Upon successful receipt of the data, the server must respond with HTTP status code
200 OK
or201 Created
.Validation event: The endpoint must accept a test payload in the body to test the connection:
β{ "event": "auth_test" }
.Data handling: The endpoint must be able to process the data structures (payloads) of the events later selected in the automation (see section "Event data formats" below).
Step 2: Create an automation
Once the app is configured, you now define when it should be triggered.
Go to Settings > Integrations and click Add Automation.
A configuration window will appear. Select the desired trigger (event) that should initiate the notification.
Example: A member was added.Select the webhook app you created in step one as the action.
Save the automation.
Security: The Authorization Header
To ensure that the requests genuinely and exclusively originate from Memberspot, a secret key is included in the Authorization header with every request.
Each webhook app automatically generates a unique and immutable
secret
.You can verify this secret in your receiving system to confirm the authenticity of the request. Using this secret is recommended but optional.
Event Data Formats (Payloads)
Depending on which event you selected as the trigger in your automation, Memberspot sends different data packages (payloads) in JSON format.
β
Here is an overview of the possible events and their associated data:
Member received course - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"courseId": "string"
}
Member received access - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"offerId": "string"
}
Lesson completed - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"courseId": "string",
"chapterId": "string",
"postId": "string"
}
Post created in Space - JSON
{
"schoolId": "string",
"spaceId": "string",
"spacePostId": "string",
"creatorUid": "string",
"creatorEmail": "string",
"title": "string",
"content": "string"
}
Member not logged in - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"days": "number"
}
Member was added - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"firstname": "string",
"name": "string"
}
Access expires in X days - JSON
{
"schoolId": "string",
"uid": "string",
"email": "string",
"offerId": "string",
"days": "number",
"dateExpring": "Date"
}