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.
Return individual text message. See QueryTexts
to return a list of
text messages and determine individual textIds.
General usage is to start a text campaign using SendText
, then to pass returned
broadcastId to QueryTexts
to determine textIds of text messages created. This GetText
can then be called with unique textId to determine info and state of text message.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
GetText | Text request by unique ID | object | |
Id | Unique ID of resource | long |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
Text | ||
id | Unique ID of action | long |
FromNumber | E.164 11 digit number or short code | PhoneNumber |
ToNumber | List of E.164 11 digit numbers space seperated | List[PhoneNumber] |
State | Current State of Action[READY, SELECTED, CALLBACK, DISABLED, SKIPPED, FINISHED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT, RESTRICTED_NUMBER] | ActionState |
BatchId | Unique ID of Batch associated with Action | long |
BroadcastId | Unique ID of Broadcast associated with Action | long |
ContactId | Unique ID of Contact associated with Action | long |
Inbound | Is inbound Action | boolean |
Created | DateTime Action was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime |
Modified | DateTime Action was modified 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime |
FinalResult | [LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | Result |
Label | ||
Name | string | |
Message | string | |
TextRecord | ||
id | long | |
Result | [LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | Result |
FinishTime | DateTime action finished in 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' format | dateTime |
BilledAmount | Credits charged for call or text | float |
QuestionResponse | Question / Response pair defined in IVR campaign with 'stash'. | |
Question | IVR stash 'varname' | string |
Response | IVR stash value associated with 'varname' | string |
SwitchId | string | |
CallerName | string | |
Message | string |
<?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'));
/**
* GetText. Get individual Text record by ID.
*/
$request = new stdclass();
$request->Id = 2; // long required
$response = $client->GetText($request);
print_r($response);
// Sample output:
// stdClass Object
// (
// [TotalResults] => 1
// [Text] => stdClass Object
// (
// [FromNumber] => 67076
// [ToNumber] => stdClass Object
// (
// [_] => 13108693472
// )
//
// [State] => SELECTED
// [BatchId] => 8
// [BroadcastId] => 11
// [ContactId] => 3091
// [Inbound] =>
// [Created] => 2013-02-11T10:07:40-08:00
// [Modified] => 2013-02-11T10:07:44-08:00
// [id] => 9300
// )
// )
?>