Do you want to send your Tolstoy data straight to a web app or URL?

Set up Webhooks to receive notifications when a viewer interacts with or responds to your Tolstoy.

Step 1

Get your API Token

Go to project settings, click Connect and Generate under API Token

Save your received token, it's the same token for all your Tolsoys.

Step 2

Configure a webhook using Rest API

Use your token in the request Authorization header: "Bearer YOUR_API_TOKEN"

Base URL:

https://api.gotolstoy.com

Method

Route

About

GET

/webhooks/

list subscriptions

POST

/webhooks/

create a subscription

GET

/webhooks/:id/

get a subscription

PUT

/webhooks/:id/

update a subscription

DELETE

/webhooks/:id/

delete a subscription

Supported Events:

response_summary - get a summary of a viewer session in Tolstoy.

collected_info - get a summary of a viewer session in Tolstoy only if there was a lead form submitted.

Example Request to add a webhook:

curl --location --request POST 'https://api.gotolstoy.com/webhooks' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://YOUR_URL/",
"event": "response_summary"
}'

Example Request to see your defined webhooks:

curl --location --request GET 'https://api.gotolstoy.com/webhooks' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

response_summary event example:

{
subscribers: [],
notificationLevel: 4,
user: 'Anonymous',
playlist: 'Tolstoy #5',
publishId: 'zgo4t6htijvzz',
timestamp: '2021-03-11T11:52:19.968Z',
accountId: '43a7bd93-c302-4c18-93bc-d7151c586336',
accountEmail: 'nimrod.popper@gmail.com',
anonymousId: 'ab63ae8f-1c96-4fc6-baf3-a9c3b9ad0eab',
collectedInfo: {
email: 'newuser@test.com',
"name": "newuser",
"phone": "123123"
},
events: [
{
videoName: 'Question 1.mov',
eventName: 'pageView',
question: '',
timestamp: '2021-03-11T11:52:17.383Z'
},
{
videoName: 'Question 1.mov',
eventName: 'sessionStart',
question: '',
timestamp: '2021-03-11T11:52:18.253Z'
},
{
videoName: 'Question 1.mov',
text: 'heyy',
eventName: 'clickCta',
question: '',
timestamp: '2021-03-11T11:52:19.968Z'
},
{
videoName: '1 intro.mp4',
text: 'test',
eventName: 'clickCta',
question: '',
timestamp: '2021-03-11T11:52:22.703Z'
},
{
videoName: '1 intro.mp4',
eventName: 'sessionEnd',
question: '',
timestamp: '2021-03-11T11:52:22.713Z'
}
],
sessionTime: '93'
}

If you still need help, we're happy to chat! Please send an email to support@gotolstoy.com and we'll get back to you in less than 24 hours!

Did this answer your question?