POST
/
webhooks
curl --request POST \
  --url https://schoolmaker.co/api/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "webhook_url": "<string>",
  "event_type": "element_completed",
  "provider": "<string>",
  "extra_parameters": {
    "offerFilter": [
      "<string>"
    ],
    "activeLevels": [
      123
    ]
  }
}'
{
  "id": "<string>",
  "webhook_url": "<string>",
  "event_type": "<string>",
  "provider": "<string>",
  "extra_parameters": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Webhooks will allow you to detect when a specified event occurs. Supported event types include:

  • element_completed → When a step is completed

  • member_joining_offer → When a member is added to an offer

    • extra_parameters:

      • offerFilter → An offer ID or multiple offer IDs separated by commas. This event will only trigger if the member is added to an offer that matches the filter
  • new_payment → When a member initiates a new payment (whether it is on a one-time offer price, a multiple installment price, or a subscription)

  • member_inactivity → Will trigger at the same time as the member inactivity notification from SchoolMaker

  • gamification_level_passed → Which will trigger when a level is passed in the community gamification feature

    • extra_parameters:

      • activeLevels → A comma-separated list of level numbers. This event will only trigger if the member has passed a level that is in the list

To see the payload for each event, please refer to the Webhooks Payload page.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
webhook_url
string
required

The URL where webhook payloads will be sent via POST requests. This should be a publicly accessible HTTPS endpoint that can receive and process the webhook events.

event_type
enum<string>
required
Available options:
element_completed,
member_joining_offer,
new_payment,
member_inactivity,
gamification_level_passed
provider
string
extra_parameters
object

Response

201 - application/json
Webhook created
id
string
webhook_url
string
event_type
string
provider
string
extra_parameters
object
created_at
string
updated_at
string