CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Update existing subscription by ID
Use this to enable or disable notification events, change the notification endpoint URI, or change the filtering so only receive notification for a subset of events.
UpdateSubscription service call returns no response.
Testing this method using swagger doc REST interface (Try Me! button) does not work correctly. Please use curl or other rest client to test api call.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
UpdateSubscription | Update Subscription using attached info | object | |
RequestId | Unique ID of web request needed for de-duping | anyURI | |
Subscription | Subscribe to a CallFire postback notification event, such as 'textnotification', by registering a callback URI endpoint where events will get published to. | object | |
id | Unique ID of Subscription | long | |
Enabled | Enable publishing of postback notifications for subscribed events. | boolean | |
NonStrictSsl | Enable posting to unknown ssl endpoints (ssl certificate verification will be disabled) | boolean | |
Endpoint | Email or URI endpoint to publish notification event to. | anyURI | |
NotificationFormat | [XML, JSON, SOAP, EMAIL, LEGACY] | NotificationFormat | |
TriggerEvent | Event to trigger on[UNDEFINED_EVENT, INBOUND_CALL_FINISHED, INBOUND_TEXT_FINISHED, OUTBOUND_CALL_FINISHED, OUTBOUND_TEXT_FINISHED, CAMPAIGN_STARTED, CAMPAIGN_STOPPED, CAMPAIGN_FINISHED] | SubscriptionTriggerEvent | |
ExpiresAt | Set when a Subscription will expire | long | |
SubscriptionFilter | Filter the type of notification events published to postback URI endpoint. | object | |
BroadcastId | Broadcast ID to filter on | long | |
BatchId | Batch ID to filter on | long | |
FromNumber | From number (11 digit) or shortcode to filter on | PhoneNumber | |
ToNumber | E.164 11 digit phone number | List[PhoneNumber] | |
Inbound | Deprecated, use TriggerEvent | boolean |
* indicates choice value, bolded parameters are required
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* UpdateSubscription. Use this to enable or disable notification
* events, change the notification endpoint URI, or change the
* filtering so only receive notification for a subset of events.
*/
$request = new stdclass();
$request->Subscription = new stdclass(); // required
$request->Subscription->id = $subscriptionId; // Previously created subscription.
$request->Subscription->Enabled = false;
$client->UpdateSubscription($request);
// No Response.
?>