Reputation: 103
I would like to create a webhook using callfire's api on outbound calls when the "transfer digit" is pressed by the user.
The webhooks method is found here: https://developers.callfire.com/docs.html#createWebhook
Is shows an example in the post payload like this:
curl -u username:password -H
"Content-Type:application/json" -X POST"
localhost:8080/callfire-api-v2/v2/webhooks"
-d '{"name":"API hook", "resource":"textCampaign", "events":["start", "stop"], "callback":"http://cool.site.xyz/webhook"}'
This example shows the events "start" and "stop" for a "textCampaign" . This is the only list of events I can find in the documentation.
I was hoping to find a list of events for each resource.
I would like to use a webhook to get call results for voice calls without having to poll for them.
It might look like this assuming these events and resources existed:
-d '{"name":"API hook", "resource":"voiceCampaign", "events":["finalCallResult"], "callback":"blah"}'
Is there a way that one infers the resources and specifically, the events that are available for webhooks?
Upvotes: 0
Views: 190
Reputation: 61
currently API v2 for webhooks is in beta and doesn't have some statuses, events and other things.
I would recommend to use subscriptions in API v1.1 https://www.callfire.com/api-documentation/rest/version/1.1#!/subscription
Upvotes: 0