All Collections
Collect
How to Receive Responses at a Webhook
How to Receive Responses at a Webhook
Updated over a week ago

Note: This feature is available on the Premium plan only.

Once your StoryPrompt has been created, select Customize and go to Configure your StoryPrompt. You will find Webhook and Workflow settings. Here you can specify what happens after you receive a response.

Click Add step and under Select an action, select Post to a Webhook.

Then follow these steps:

  • Add your webhook endpoint URL. This is the URL that will receive the response in JSON format.

  • Under Authorization Header, enter a key or secret that will be sent to your endpoint to verify requests. This is your own key that can help you secure your webhook requests and will be sent to your URL as part of the Authorization Header when responses are received.

  • Click Save step.

What is the format of the payload sent to my webhook?

When someone replies to your StoryPrompt, your endpoint will be notified. The JSON payload will be sent in the body of the request and will consist of an array containing a prompt and a reply. When your StoryPrompt contains multiple steps, you will receive one request containing all the prompts and the replies for that respondent.

The request and will look something like this:

[
{
"prompt": {
"url": "https://storyprompt.com/reply/XXX",
"name": "Test Prompt",
"title": "",
"video_url": "https://url.com/XXX.mp4",
"thumbnailUrl": "https://url.com/XXX.gif"
},
"reply": {
"url": "https://storyprompt.com/watch/XXX",
"video_url": "https://url.com/XXX.mp4",
"title": "",
"thumbnailUrl": "https://url.com/XXX.jpg",
"duration": 2,
"dateCreated": "2023-06-13T15:47:43.000Z",
"transcription": "",
"transcriptionSummary": "",
"keywords": [],
"contact": {
"jobTitle": "",
"name": "John Smith",
"phoneNumber": "",
"custom_fields": {
"id": "XXX"
},
"email": "XXX@storyprompt.com",
"company": ""
},
"step": 1,
"maxSteps": 2
}
},
{
"prompt": {
"url": "https://storyprompt.com/reply/XXX",
"name": "",
"title": "",
"video_url": "https://url.com/XXX.mp4",
"thumbnailUrl": "https://url.com/XXX.jpg"
},
"reply": {
"url": "https://storyprompt.com/watch/XXX",
"video_url": "https://url.com/XXX.mp4",
"title": "",
"thumbnailUrl": "https://url.com/XXX.jpg",
"duration": 3,
"dateCreated": "2023-06-13T15:47:58.000Z",
"transcription": "",
"transcriptionSummary": "",
"keywords": [],
"contact": {
"name": "John Smith",
"phoneNumber": "",
"jobTitle": "",
"email": "XXX@storyprompt.com",
"custom_fields": {
"id": "XXX"
},
"company": ""
},
"step": 2,
"maxSteps": 2
}
}
]

Did this answer your question?