Table of Contents
How to enable Sotion’s outbound webhooks
- Email Sign Up
- Restricted Email List
- Paid Membership (Stripe, Lemon Squeezy, or Gumroad)
![notion image](https://cdn.feather.blog?src=https%3A%2F%2Fusenotioncms.com%2Fproxy-prod%2Fblock%2F654aa097-20b0-4b69-9698-bbf22d9fef6d%2Fbd945902-f70c-4089-a33a-5dae9ae1b5df%2F815c41bd-2dce-4d57-a6f1-059b4e6da3b9%2FUntitled.png&optimizer=image&quality=80&width=280)
![notion image](https://cdn.feather.blog?src=https%3A%2F%2Fusenotioncms.com%2Fproxy-prod%2Fblock%2F5843ddd7-a469-4d0f-8d10-b716cb30b8ee%2Fbd945902-f70c-4089-a33a-5dae9ae1b5df%2Ff2d0e364-7713-4a80-a635-64f8c0e37885%2FUntitled.png&optimizer=image&quality=80&width=280)
Sotion Membership Management Webhooks Documentation
Create a new webhook
- From the Manage Webhooks screen, click Add New Webhook
![notion image](https://cdn.feather.blog?src=https%3A%2F%2Fusenotioncms.com%2Fproxy-prod%2Fblock%2F896450eb-82f7-4649-8d72-425caf0599fd%2Fbd945902-f70c-4089-a33a-5dae9ae1b5df%2F856ca7f1-c2a3-4006-83c4-6052d0bf195b%2FUntitled.png&optimizer=image&quality=80&width=280)
- Enter a name, secret, and URL for your webhook. Also select the events you want to receive
- Name: The display name to identify your webhook in Sotion
- Secret: A secret value to validate the event is coming from Sotion. You can enter your own value, or generate a random value. This value will be added as a
x-webhook-secret
header to every request. - URL: The URL of your webhook. Must be able to receive
POST
request withJSON
payload - Events: Select the Sotion events that will be sent to your wehbook
When will Sotion trigger the webhook?
- When a new member is added via the Sotion Dashboard → Settings → Members
- When a new member signs up via your Sotion site (applicable to sites configured with Email Signup, Restricted Email List, and Paid Membership options)
- When a new member is added via the Sotion Members API: CREATE MEMBER
- When a member is deleted via the Sotion Dashboard → Settings → Members
- When a member is deleted via the Sotion Members API: DELETE MEMBER
What information will be sent to the webhook?
// request method
method: 'POST'
// headers
headers: {
'X-Webhook-Secret': {webhook.secret},
'Content-Type': 'application/json',
}
// body payload
body: JSON.stringify({
eventType: {'member.created' | 'member.deleted'},
siteId: 'E2LSI6JG7CRB8',
status: 'active',
domain: 'your.custom.domain',
pageUrl: `https://your.notion.site/page-name`,
authType: {'email', 'whitelist', 'stripe', 'lemonsq', 'gumroad'},
member: {
email: 'member@email.com',
uuid: 'af566bb1-fdb2-46c5-ae28-edgc49abfo73',
externalId: 'some-external-id-you-can-choose',
registeredAt: '2024-04-29T14:08:21.094Z',
verified: {true | false},
blocked: {true | false},
paid: {true | false},
loginToken: '2024-05-02T11:19:58.018Z'
}
}