Menu

Webhooks

Thinkific's Webhooks API can be used to integrate an external application with your Thinkific site. Pretty cool, right?

Webhooks provide a way to receive information about certain events as soon as they happen in your Thinkific site. They allow developers to build apps that receive information, in near real-time, about events that happen in Thinkific courses and enable them to extend, customize, and integrate Thinkific with their own custom extensions or even with other applications around the web.


Please note that due to the custom nature of webhooks, our support team is unable to provide assistance with your webhook integrations. If you experience troubles while setting up your webhooks, we recommend you contact a developer to assist you. 



List of Supported Webhook Topics

Event data should be stored as JSON. Right now webhooks can be registered for the following topics:


Model
TopicsTrigger
Orderorder.createdWhen an order is successfully completed

Useruser.signup,
user.signin
user.signup - When a new user signs up for your site

user.signin - When a user signs in to your site in all the existing ways (regular sign in, linkedin sign in, express sign in, checkout sign in and SSO)

Enrollmentenrollment.trial,
enrollment.created,
enrollment.progress,
enrollment.completed
enrollment.trial - When a user enrolls for a preview in any course

enrollment.created - When a paid enrollment is created in any of your courses

enrollment.progress  - When a student makes any progress on a course or a new lesson is added to a course (and admin updates user's progress)

enrollment.completed - When an enrollment reaches 100% progress completion




Create a Webhook

Webhooks can be found in your admin dashboard under Settings > Code & analytics > Webhooks on our Growth plan and above. If you click on New webhook in the top right corner, you will need to select a Model, Topic, and Target URL




Once your webhook is created, you will see it in your list here. From this page, you can hover over the ellipsis icon to edit, send a test event, or delete the webhook altogether. 




If you need to see the events that have been sent, you can click on the webhook topic itself to get payload information and to check for success messages. 




Webhook Details

You can check information about events sent to a specific webhook on the details page. Click on the event ID to see the payload.


Response Status

The expected response status are HTTP status codes. The most common ones are:

  • 200 OK
  • 404 NOT FOUND
  • 403 FORBIDDEN
  • 502 BAD GATEWAY
  • 503 SERVICE UNAVAILABLE

To learn more about HTTP status code, please check this wiki page.



Payload

When your webhook is sent successfully, it will deliver a payload to the Target URL. Here are the current events's payload examples:


A payload sent for the user.signin topic:

{
    "id": "20180123154501518395902",
    "resource": "user",
    "action": "signin",
    "tenant_id": "73394",
    "created_at": "2018-01-23T20:45:00.314Z",
    "payload": {
        "administered_course_ids": null,
        "affiliate_code": "e7c7eb",
        "affiliate_commission": "15.00",
        "affiliate_commission_type": "%",
        "affiliate_payout_email": "user@thinkific.com",
        "avatar_url": "https://s3.amazonaws.com/thinkific/profiles/002/121/9021516740299.thumb.?1516740299",
        "bio": null,
        "company": "",
        "created_at": "2017-07-23T02:42:13.043Z",
        "custom_profile_fields": [],
        "email": "user@thinkific.com",
        "external_source": null,
        "first_name": "Thinkific",
        "headline": "Software Engineer",
        "id": 2048575,
        "last_name": "User",
        "roles": [
            "affiliate"
        ]
    }
}



A payload sent for the user.signup topic:

{
    "id": "20180123170248040678392",
    "resource": "user",
    "action": "signup",
    "tenant_id": "73394",
    "created_at": "2018-01-23T22:02:45.001Z",
    "payload": {
        "administered_course_ids": null,
        "affiliate_code": null,
        "affiliate_commission": null,
        "affiliate_commission_type": "%",
        "affiliate_payout_email": null,
        "avatar_url": null,
        "bio": null,
        "company": null,
        "created_at": "2018-01-23T22:02:44.987Z",
        "custom_profile_fields": [],
        "email": "robertwhite@thinkific.com",
        "external_source": null,
        "first_name": "Robert",
        "headline": null,
        "id": 3289528,
        "last_name": "White",
        "roles": []
    }
}



A payload sent for the enrollment.created topic:

{
    "id": "20180126171756020665195",
    "resource": "enrollment",
    "action": "created",
    "tenant_id": "3",
    "created_at": "2018-01-26T22:17:01.924Z",
    "payload": {
        "activated_at": "2018-01-26T22:16:52.255Z",
        "completed_at": null,
        "course": {
            "id": 4,
            "name": "Course 10"
        },
        "course_id": 4,
        "created_at": "2018-01-26T22:16:52.285Z",
        "expiry_date": null,
        "free_trial": false,
        "id": 97472,
        "percentage_completed": "0.0",
        "started_at": "2018-01-26T22:17:01.891Z",
        "updated_at": "2018-01-26T22:17:01.924Z",
        "user": {
            "email": "milton@assis.com",
            "first_name": "Milton",
            "id": 136832,
            "last_name": "Assis"
        }
    }
}



A payload sent for the enrollment.trial topic:

{
    "id": "20180116184610563698247",
    "resource": "enrollment",
    "action": "trial",
    "tenant_id": "1008",
    "created_at": "2018-01-16T23:45:06.466Z",
    "payload": {
        "activated_at": null,
        "completed_at": null,
        "course": {
            "id": 2692,
            "name": "Original one"
        },
        "course_id": 2692,
        "created_at": "2018-01-16T23:45:03.227Z",
        "expiry_date": null,
        "free_trial": true,
        "id": 97197,
        "percentage_completed": "0.0",
        "started_at": "2018-01-16T23:45:06.436Z",
        "updated_at": "2018-01-16T23:45:06.466Z",
        "user": {
            "email": "try@example.com",
            "first_name": "Try",
            "id": 132365,
            "last_name": "Free"
        }
    }
}



A payload sent for the enrollment.progress topic:

{
    "id": "20180118171806111886309",
    "resource": "enrollment",
    "action": "progress",
    "tenant_id": "987",
    "created_at": "2018-01-18T22:18:05.984Z",
    "payload": {
        "activated_at": "2018-01-18T22:17:52.380Z",
        "completed_at": null,
        "course": {
            "id": 3035,
            "name": "Test course"
        },
        "course_id": 3035,
        "created_at": "2018-01-18T22:17:52.459Z",
        "expiry_date": null,
        "free_trial": false,
        "id": 97254,
        "last_percentage_completed": "0.0",
        "percentage_completed": "0.333333333333333",
        "started_at": "2018-01-18T22:17:58.569Z",
        "updated_at": "2018-01-18T22:18:05.984Z",
        "user": {
            "email": "sarah+test@thinkific.com",
            "first_name": "Sarah",
            "id": 125680,
            "last_name": "Thinkific"
        }
    }
}



A payload sent for the enrollment.completed topic:

{
    "id": "20180126171947527620204",
    "resource": "enrollment",
    "action": "completed",
    "tenant_id": "3",
    "created_at": "2018-01-26T22:19:47.432Z",
    "payload": {
        "activated_at": "2018-01-26T22:19:26.972Z",
        "completed_at": "2018-01-26T22:19:47.308Z",
        "course": {
            "id": 3891,
            "name": "Mauricio's Test Course"
        },
        "course_id": 3891,
        "created_at": "2018-01-26T22:19:26.995Z",
        "expiry_date": null,
        "free_trial": false,
        "id": 97473,
        "percentage_completed": "1.0",
        "started_at": "2018-01-26T22:19:29.025Z",
        "updated_at": "2018-01-26T22:19:47.432Z",
        "user": {
            "email": "milton@assis.com",
            "first_name": "Milton",
            "id": 136832,
            "last_name": "Assis"
        }
    }
}



A payload sent for the order.created topic:

{
    "id": "20180126172320940835610",
    "resource": "order",
    "action": "created",
    "tenant_id": "3",
    "created_at": "2018-01-26T22:23:20.808Z",
    "payload": {
        "affiliate_referral_code": null,
        "billing_name": "Milton Assis",
        "coupon": null,
        "created_at": "2018-01-26T22:23:18.400Z",
        "id": 19796,
        "payment_type": "one-time",
        "product_id": 1,
        "product_name": "Five Dollar Course",
        "status": "Complete",
        "user": {
            "email": "milton@assis.com",
            "first_name": "Milton",
            "id": 136832,
            "last_name": "Assis"
        }
    }
}



For more in-depth details on our Webhooks API, you can view our public documentation here.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.