Calling Rest API

Sending Call(s)

Sends out call(s) for the campaign specified.


Important Notes:

If you want the calls to go out immediately without starting the campaign: Run this function one time for each phone number.

This function will execute a 'campaign start' if more than one number is sent to this API. You'll want to make sure you call a 'campaign stop' (https://www.callfire.com/cloud/1/campaign/{campaignid}/stop) at the proper time to ensure you don't dial outside of restricted dialing times.


URL

https://www.callfire.com/cloud/1/campaign/{campaignid}/call

HTTP Method

POST

Content Type

application/x-www-form-urlencoded

Parameters

  • apikey: Required. This is your account api key.
  • numbers: Required. New-line separated list of numbers. Each line can have a comma separated list of data.
    • e.g. = 2132212289,Thomas,Watson\n3106227076,Alexander,Bell

Response

Content-Type = application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes">
<campaignResponse>
    <campaignid>898085</campaignid>
    <description>Calls Sent</description>
</campaignResponse>


Sample C# Code

Before using this code:

  • Download the PostRequest.cs file given under the Downloads section [Rest API .NET client].
  • Replace the {CampaignId} in the code given below with your campaign id
            PostSubmitter post = new PostSubmitter();
            post.Url = "https://www.callfire.com/cloud/1/campaign/{CampaignId}/call";
            post.PostItems.Add("apikey", "YOUR_API_KEY");
            post.PostItems.Add("numbers","2134000543,ankit");
            post.Type = PostSubmitter.PostTypeEnum.Post;
            string result = post.Post();
            Console.WriteLine("Result is");
            Console.WriteLine(result);