Skip to main content

Custom Integrations with Webhooks

This allows you to connect external systems to Memberspot via webhooks.

Updated over a week ago

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:

  1. Create a webhook app: This is where you define the target URL and technical parameters.

  2. 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.

  1. Navigate in your Memberspot dashboard to Settings > Integrations

  2. Click on the Add App button and then select Webhook from the list of available integrations.

  3. A settings window will open. Enter the notification URL of your external system. This is the address to which Memberspot will send the data.

  4. After entering the URL, click Validate Now. Memberspot will now send the test event mentioned above to your URL to verify the connection.

  5. 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:

  1. Accessibility: The URL must be publicly accessible on the internet.

  2. Request type: The endpoint must be able to respond to POST requests.

  3. Success status code: Upon successful receipt of the data, the server must respond with HTTP status code 200 OK or 201 Created.

  4. Validation event: The endpoint must accept a test payload in the body to test the connection:
    ​{ "event": "auth_test" }.

  5. 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.

  1. Go to Settings > Integrations and click Add Automation.

  2. A configuration window will appear. Select the desired trigger (event) that should initiate the notification.
    Example: A member was added.

  3. Select the webhook app you created in step one as the action.

  4. 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"
}

Did this answer your question?