6.0.0 • Published 5 years ago

@datafire/callfire v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/callfire

Client library for CallFire API Documentation

Installation and Usage

npm install --save @datafire/callfire
let callfire = require('@datafire/callfire').create({
  username: "",
  password: ""
});

.then(data => {
  console.log(data);
});

Description

CallFire

Actions

findCalls

To search for all calls sent or received by the user. Use "id=0" for the campaignId parameter to query for all calls sent through the POST /calls API. See call states and results

callfire.findCalls({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • id array: Lists the Call ids to search for. If calls ids are specified then other query parameters can be ignored
    • campaignId integer: An id of a campaign, queries for calls included to a particular campaign. Specify null for all campaigns and 0 for default campaign
    • batchId integer: An id of a contact batch, queries for calls of a particular contact batch
    • fromNumber string: Phone number in E.164 format (11-digit) that call was from. Example: 12132000384
    • toNumber string: Phone number in E.164 format (11-digit) that call was sent to. Example: 12132000384
    • label string: A label for a specific call
    • states string: Searches for all calls which correspond to statuses listed in a comma separated string. Available values: READY, SELECTED, CALLBACK, FINISHED, DISABLED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT. See call states and results
    • results string: Searches for all calls with statuses listed in a comma separated string. Available values: SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED. See call states and results
    • inbound boolean: Filters inbound calls for "true" value and outbound calls for "false" value
    • intervalBegin integer: Start of the find time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    • intervalEnd integer: End of the find time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT

Output

sendCalls

Use the /calls API to send individual calls quickly. A verified Caller ID and sufficient credits are required to make a call. CallRecipient represents a single recipient identified by phone number or contact id in CallFire system. You can attach user-defined attributes to a Call action via CallRecipient.attributes property, attributes are available in Call action response

callfire.sendCalls({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • campaignId integer: Specifies a campaignId to send calls quickly on a previously created campaign
    • defaultLiveMessage string: Text to be turned into a sound, this text will be played when the phone is answered. Parameter can be overridden for any particular CallRecipient
    • defaultMachineMessage string: Text to be turned into a sound, this text will be played when answering machine is detected. Parameter can be overridden for any particular CallRecipient
    • defaultLiveMessageSoundId integer: Id of sound file to play if phone is answered. Parameter can be overridden for any particular CallRecipient
    • defaultMachineMessageSoundId integer: An id of a sound file to play if answering machine is detected. Parameter can be overridden for any particular CallRecipient
    • defaultVoice string (values: MALE1, FEMALE1, FEMALE2, SPANISH1, FRENCHCANADIAN1): The voice set by default for all text-to-speech messages defined in CallRecipient objects or as default *Message properties
    • strictValidation boolean: Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
    • body array

Output

findCallBroadcasts

Searches for all voice broadcasts created by user. Can query on label, name, and the current running status of the campaign. Returns a paged list of voice broadcasts

callfire.findCallBroadcasts({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • label string: A label of a voice broadcast
    • name string: A name of voice broadcast
    • running boolean: Specify whether the campaigns should be running or not
    • scheduled boolean: Specify whether the campaigns should be scheduled or not
    • intervalBegin integer: Start of the find time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    • intervalEnd integer: End of the find time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT

Output

createCallBroadcast

Creates a call broadcast campaign using the Call Broadcast API. Send a CallBroadcast in the message body to add details in a voice broadcast campaign. The campaign can be created without contacts and bare minimum configuration, but contacts will have to be added further on to use the campaign

callfire.createCallBroadcast({}, context)

Input

  • input object
    • start boolean: Specify whether to immediately start this campaign (not required)
    • strictValidation boolean: Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
    • body CallBroadcast

Output

getCallBroadcast

Returns a single CallBroadcast instance for a given call broadcast campaign id

callfire.getCallBroadcast({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a CallBroadcast
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateCallBroadcast

This operation lets the user modify the configuration of a voice broadcast campaign after call broadcast campaign is created. See CallBroadcast for more information on what can/can't be updated on this API

callfire.updateCallBroadcast({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a voice broadcast
    • strictValidation boolean: Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
    • body CallBroadcast

Output

archiveVoiceBroadcast

Archives a voice broadcast (voice broadcast will be hidden in search results)

callfire.archiveVoiceBroadcast({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a voice broadcast to archive

Output

getCallBroadcastBatches

This endpoint will enable the user to page through all of the batches for a particular voice broadcast campaign

callfire.getCallBroadcastBatches({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call broadcast
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.

Output

addCallBroadcastBatch

The 'add batch' API allows user to add additional batches to an already created voice broadcast campaign. The added batch will go through the CallFire validation process, unlike in the recipients version of this API. That is why you can use the scrubDuplicates flag to remove duplicates from your batch. Batches may be added as a contact list id, a list of contact ids, or a list of numbers

callfire.addCallBroadcastBatch({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call broadcast
    • strictValidation boolean: Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
    • body BatchRequest

Output

getCallBroadcastCalls

This endpoint will enable the user to page through all calls for a particular call broadcast campaign

callfire.getCallBroadcastCalls({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An Id of a call broadcast
    • batchId integer: An id of a particular batch associated with broadcast
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.

Output

addCallBroadcastRecipients

Use this API to add the recipients to an existing voice broadcast. Post a list of Recipient objects to be added to the voice broadcast campaign. These contacts will not go through validation process, and will be acted upon as they are added. Recipients may be added as a list of contact ids, or list of numbers

callfire.addCallBroadcastRecipients({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call broadcast
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • strictValidation boolean: Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
    • body array

Output

startVoiceBroadcast

Start a voice broadcast

callfire.startVoiceBroadcast({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of voice broadcast to start

Output

getCallBroadcastStats

Returns broadcast statistics like total number of sent/received actions, total cost, number of remaining outbound actions, error count, etc

callfire.getCallBroadcastStats({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call broadcast
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • begin integer: Start of the search time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    • end integer: End of the search time interval, formatted in unix time milliseconds. Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT

Output

stopVoiceBroadcast

Stop a voice broadcast

callfire.stopVoiceBroadcast({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of voice broadcast to stop

Output

toggleCallBroadcastRecipientsStatus

This operation lets the user to disable/enable undialed recipients in created broadcast

callfire.toggleCallBroadcastRecipientsStatus({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a voice broadcast
    • enable boolean: Flag which indicate what to do with calls (true will enable call in DISABLED status and vice versa)
    • body array

Output

getCallRecording

Returns metadata of recording of a particular call. Metadata contains a link to a MP3 recording

callfire.getCallRecording({
  "id": 0
}, context)

Input

  • input object
    • id required integer: ~
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getCallRecordingMp3

Returns an MP3 recording of particular call, response contains binary data, content type is 'audio/mpeg'

callfire.getCallRecordingMp3({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call

Output

getCall

Returns a single Call instance for a given call id.

callfire.getCall({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getCallRecordings

Returns a list of recordings metadata of particular call. Metadata contains link to a MP3 recording

callfire.getCallRecordings({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a call
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getCallRecordingByName

Returns recording metadata of particular call. Metadata contains link to a MP3 recording

callfire.getCallRecordingByName({
  "id": 0,
  "name": ""
}, context)

Input

  • input object
    • id required integer: An id of a call
    • name required string: A name of a recording
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getCallRecordingMp3ByName

Returns a MP3 recording of a particular call, response contains binary data, content type is 'audio/mpeg'

callfire.getCallRecordingMp3ByName({
  "id": 0,
  "name": ""
}, context)

Input

  • input object
    • id required integer: An id of a call
    • name required string: A name of a recording

Output

getCampaignBatch

Returns a single Batch instance for a given batch id. This API is useful for determining the state of a validating batch

callfire.getCampaignBatch({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a batch
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateCampaignBatch

Updates a single Batch instance, currently batch can only be turned "on/off"

callfire.updateCampaignBatch({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a batch to update
    • body Batch

Output

findCampaignSounds

To find all campaign sounds which were created by user. Returns all sounds available to be used in campaigns

callfire.findCampaignSounds({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • filter string: value to filter file names again; this value is used to check if the filename contains the filter value.
    • includeArchived boolean: Includes ARCHIVED sounds for "true" value
    • includePending boolean: Includes UPLOAD/RECORDING sounds for "true" value
    • includeScrubbed boolean: Includes SCRUBBED sounds for "true" value
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

postCallCampaignSound

Use this API to create a sound via a phone call. Provide the required phone number in the CallCreateSound object inside the request, and user will receive a call shortly after with instructions on how to record a sound over the phone.

callfire.postCallCampaignSound({}, context)

Input

  • input object

Output

postFileCampaignSound

Create a campaign sound file via a supplied .mp3 or .wav file

callfire.postFileCampaignSound({
  "file": ""
}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • file required string, object: A sound file encoded in binary form
      • content string
      • encoding string (values: ascii, utf8, utf16le, base64, binary, hex)
      • contentType string
      • filename string
    • name string: Optional name of a sound file, if the name is empty than it will be taken from a file

Output

postTTSCampaignSound

Use this API to create a sound file via a supplied string of text. Add a text in the TextToSpeech.message field, and pick a voice in the TextToSpeech.voice field. Available voices are: MALE1, FEMALE1, FEMALE2, SPANISH1, FRENCHCANADIAN1

callfire.postTTSCampaignSound({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • body TextToSpeech

Output

deleteCampaignSound

Deletes a single campaign sound instance for a specific campaign sound id, this operation does not delete sound completely, it sets sound status to ARCHIVED which means that sound will no longer appear in 'find' operation results, but still accessible via 'get' operation

callfire.deleteCampaignSound({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a campaign sound

Output

getCampaignSound

Returns a single CampaignSound instance for a given sound id in campaign. This is a meta data to the sounds. No audio data is returned from this API

callfire.getCampaignSound({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a sound campaign
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getCampaignSoundDataMp3

Download the MP3 version of a hosted file. This is an audio data endpoint. Returns binary response of the 'audio/mpeg' content type

callfire.getCampaignSoundDataMp3({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a campaign sound

Output

getCampaignSoundDataWav

Download the WAV version of the hosted file. This is an audio data endpoint. Returns binary response of the 'audio/mpeg' content type

callfire.getCampaignSoundDataWav({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a campaign sound

Output

findContacts

Find user's contacts by id, contact list, or on any property name. Returns a paged list of contacts

callfire.findContacts({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • id array: A list of contact IDs. If the id parameter is included, the other query parameters are ignored.
    • number array: Multiple contact numbers can be specified. If the number parameter is included, the other query parameters are ignored.
    • contactListId integer: Filters contacts by a particular contact list
    • propertyName string: Name of a contact property to search by
    • propertyValue string: Value of a contact property to search by

Output

createContacts

Creates contacts in CallFire system. Only values from the next list can be used as external system parameter in contact creation: NATION_BUILDER, SALES_FORCE_CONTACTS, SALES_FORCE_LEADS, SALES_FORCE_REPORTS, ZOHO, NETSUITE, MAIL_CHIMP. See contacts validation rules

callfire.createContacts({}, context)

Input

  • input object

Output

findDoNotContacts

Searches for all Do Not Contact (DNC) objects created by user. These DoNotContact entries only affect calls/texts/campaigns on this account. Returns a paged list of DoNotContact objects

callfire.findDoNotContacts({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • prefix string: Prefix (1-10 digits) of phone numbers
    • campaignId integer: A campaign id which was used to send a message to a DNC number
    • source string: A DNC source name to search for DNCs
    • call boolean: Show only Do-Not-Call numbers
    • text boolean: Show only Do-Not-Text numbers
    • inboundCall boolean: ~
    • inboundText boolean: ~
    • number array: ~

Output

addDoNotContacts

Add or update a list of Do Not Contact (DNC) contact entries. Can toggle whether the DNCs are enabled for calls/texts.

callfire.addDoNotContacts({}, context)

Input

Output

deleteDoNotContactsBySource

Delete Do Not Contact (DNC) contact entries contained in source.

callfire.deleteDoNotContactsBySource({
  "source": ""
}, context)

Input

  • input object
    • source required string: Source associated with Do Not Contact (DNC) entry.

Output

getUniversalDoNotContacts

Searches for a UniversalDoNotContact object for a given phone number. Shows whether inbound/outbound actions are allowed for a given number

callfire.getUniversalDoNotContacts({
  "toNumber": ""
}, context)

Input

  • input object
    • toNumber required string: A required destination phone number in E.164 format (11-digit). Example: 12132000384
    • fromNumber string: An optional destination/source number for DNC, specified in E.164 format (11-digit). Example: 12132000384
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

deleteDoNotContact

Delete a Do Not Contact (DNC) contact entry.

callfire.deleteDoNotContact({
  "number": ""
}, context)

Input

  • input object
    • number required string: Number associated with Do Not Contact (DNC) entry.

Output

getDoNotContact

Get Do Not Contact (DNC) object create by user. This DoNotContact entry only affects calls/texts/campaigns on this account.

callfire.getDoNotContact({
  "number": ""
}, context)

Input

  • input object
    • number required string: Number associated with Do Not Contact (DNC) entry.

Output

updateDoNotContact

Update a Do Not Contact (DNC) contact entry. Can toggle whether the DNC is enabled for calls/texts.

callfire.updateDoNotContact({
  "number": ""
}, context)

Input

Output

findContactLists

Searches for all contact lists which are available for the current user. Returns a paged list of contact lists

callfire.findContactLists({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • name string: A name or a partial name of a contact list
    • contactCount integer: ~
    • orderBy string: ~

Output

createContactList

Creates a contact list for use with campaigns using 1 of 3 inputs. A List of Contact objects, a list of String E.164 numbers, or a list of CallFire contactIds can be used as the data source for the created contact list. After contact list is added into the CallFire system, contact lists goes through seven system safeguards that check the accuracy and consistency of the data. For example, our system checks that contact number is formatted correctly, is valid, is not duplicated in another contact list, or is not added on a specific DNC list. You can configure to keep/merge or remove contacts which do not complies these rules. If contacts were not added to a contact list after the validation, this means the data needs to be properly formatted and corrected before calling this API

callfire.createContactList({}, context)

Input

Output

createContactListFromFile

Creates a contact list to be used with campaigns through uploading a .csv file. Returns the id of created list

callfire.createContactListFromFile({
  "file": ""
}, context)

Input

  • input object
    • file required string, object: CSV file to be uploaded
      • content string
      • encoding string (values: ascii, utf8, utf16le, base64, binary, hex)
      • contentType string
      • filename string
    • name string: A name of a contact list
    • useCustomFields boolean: A flag to indicate how to define property names for contacts. If true, uses the field and property names exactly as defined. If false will assign custom properties and fields to A, B, C, etc

Output

deleteContactList

Deletes a contact list, included contacts will not be deleted.

callfire.deleteContactList({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of the contact list to be deleted

Output

getContactList

Returns a single ContactList instance for a given contact list id

callfire.getContactList({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a contact list to return
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateContactList

Updates contact list instance.

callfire.updateContactList({
  "id": 0
}, context)

Input

Output

removeContactListItems

Deletes contacts from a contact list. List the contact ids in request to delete multiple contacts with one request.

callfire.removeContactListItems({
  "id": 0
}, context)

Input

  • input object
    • id required integer: A id of a contact list
    • contactId array: An id of a contact entity in the CallFire system

Output

getContactListItems

Searches for all entries in a contact list with specified id. Returns a paged list of contact entries

callfire.getContactListItems({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a contact list
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.

Output

addContactListItems

Adds contacts to a contact list. Available contact sources are: list of the contact entities, list of ids of existing contacts in user's account, list of phone numbers in E.164 format (11-digits)

callfire.addContactListItems({
  "id": 0
}, context)

Input

Output

removeContactListItem

Deletes a single contact from a contact list

callfire.removeContactListItem({
  "id": 0,
  "contactId": 0
}, context)

Input

  • input object
    • id required integer: An id of a contact list
    • contactId required integer: An id of a contact

Output

deleteContact

Deletes a contact instance from account

callfire.deleteContact({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An Id of a contact

Output

getContact

Returns a Contact instance for a given contact id. Deleted contacts can be still retrieved but will be marked as deleted. Deleted contacts will not be shown in search request.

callfire.getContact({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a contact
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateContact

Updates a single contact instance with id specified. See contact validation rules

callfire.updateContact({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a contact
    • body Contact

Output

getContactHistory

Searches for all texts and calls attributed to a contact. Returns a list of calls and texts a contact has been involved with

callfire.getContactHistory({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An Id of a contact
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findKeywords

Searches for all keywords available for purchase on the CallFire platform. If a keyword appears in the response, it is available for purchase. List the 'keywords' in a query parameter to search for multiple keywords (at least one keyword should be sent in request). Keyword should only consist of uppercase and lowercase letters and numbers. Number of characters must be greater than 2, but less than 65.

callfire.findKeywords({}, context)

Input

  • input object
    • keywords array: A keyword to search for

Output

findKeywordLeases

Searches for all keywords owned by user. A keyword lease is the ownership information involving a keyword

callfire.findKeywordLeases({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • filter string: Filter by part of Keyword name or Label name of Keyword
    • labelName string: An exact label name to search by
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findKeywordLeaseConfigs

Searches for all keyword lease configs for the user. Returns a paged list of KeywordConfig

callfire.findKeywordLeaseConfigs({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • filter string: Filter by part of Keyword name or Label name of Keyword
    • labelName string: An exact label name to search by
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getKeywordLeaseConfig

Returns a single KeywordConfig instance for a given keyword lease

callfire.getKeywordLeaseConfig({
  "keyword": ""
}, context)

Input

  • input object
    • keyword required string: A Keyword to get KeywordConfig by
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateKeywordLeaseConfig

Updates a keyword lease configuration. Use this API endpoint to enable/disable inbound SMS forwarding, set forward number. Forward number must be in E.164 format)

callfire.updateKeywordLeaseConfig({
  "keyword": ""
}, context)

Input

  • input object
    • keyword required string: To update a keyword lease config
    • body KeywordConfig

Output

getKeywordLeaseById

Get keyword by id

callfire.getKeywordLeaseById({
  "id": 0
}, context)

Input

  • input object
    • id required integer: ~
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getKeywordLease

Searches for all keywords owned by user

callfire.getKeywordLease({
  "keyword": ""
}, context)

Input

  • input object
    • keyword required string: Keyword text that a lease is desired for
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateKeywordLease

Updates a keyword lease. Turns the autoRenew on/off. Configure double opt in feature. Add/remove contact list from keyword.

callfire.updateKeywordLease({
  "keyword": ""
}, context)

Input

  • input object
    • keyword required string: To update a keyword lease
    • body KeywordLease

Output

isKeywordAvailable

Searches for the specific keyword to purchase on the CallFire platform. Returns 'true' if keyword is available. Keyword should only consist of uppercase and lowercase letters and numbers. Number of characters must be greater than 2, but less than 65.

callfire.isKeywordAvailable({
  "keyword": ""
}, context)

Input

  • input object
    • keyword required string: To specify a keyword to search for. Example: SUN, MOON

Output

  • output boolean

getAccount

Searches for the user account details. Details include name, email, and basic account permissions. For authentication use api credentials.

callfire.getAccount(null, context)

Input

This action has no parameters

Output

findApiCredentials

Searches for all credentials generated by user. Returns a paged list of the API credentials. Only ACCOUNT_HOLDER can invoke this API. For authentication use account credentials.

callfire.findApiCredentials({}, context)

Input

  • input object
    • name string: Filter by name
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.

Output

createApiCredential

Creates an API credentials for the CallFire API. This endpoint requires full CallFire account credentials to be used, authenticated using Basic Authentication. At the moment user provides only the name for the credentials. The generated credentials can be used to access any CallFire APIs. For authentication use account credentials.

callfire.createApiCredential({}, context)

Input

Output

deleteApiCredential

Deletes a specified API credential. Currently, removes the ability to access the API. Only ACCOUNT_HOLDER can invoke this API. For authentication use account credentials.

callfire.deleteApiCredential({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of an API credential

Output

getApiCredential

Returns an API credential instance for a given api credential id. Only ACCOUNT_HOLDER can invoke this API. For authentication use account credentials.

callfire.getApiCredential({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of an API credential
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

disableApiCredentials

Disables a specified API credential. Currently, removes the ability to access the API. Only ACCOUNT_HOLDER can invoke this API. For authentication use account credentials.

callfire.disableApiCredentials({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of an API credential

Output

enableApiCredentials

Enables a specified API credential. Currently, adds the ability to access the API. Only ACCOUNT_HOLDER can invoke this API. For authentication use account credentials.

callfire.enableApiCredentials({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of an API credential

Output

getCreditUsage

Find credit usage for the user. Returns credits usage for time period specified or if unspecified then total for all time. For authentication use api credentials.

callfire.getCreditUsage({}, context)

Input

  • input object
    • intervalBegin integer: Beginning of usage period formatted in unix time milliseconds. Example: 1473781817000
    • intervalEnd integer: End of usage period formatted in unix time milliseconds. Example: 1473781817000

Output

getBillingPlanUsage

Searches for the data of a billing plan usage for the user. Returns the data of a billing plan usage for the current month. For authentication use api credentials.

callfire.getBillingPlanUsage(null, context)

Input

This action has no parameters

Output

getCallerIds

Returns a list of verified caller ids. If the number is not shown in the list, then it is not verified. In this case sending of a verification code is required. For authentication use api credentials.

callfire.getCallerIds(null, context)

Input

This action has no parameters

Output

sendVerificationCodeToCallerId

Generates and sends a verification code to the phone number provided in the path. The verification code is delivered via a phone call. This code needs to be submitted to the verify caller id API endpoint to complete verification. For authentication use api credentials.

callfire.sendVerificationCodeToCallerId({
  "callerid": ""
}, context)

Input

  • input object
    • callerid required string: A phone number in E.164 format (11-digit) which needs to be verified. Example: 12132000384

Output

verifyCallerId

With the verification code received from the Create caller id endpoint, a call to this endpoint is required to finish verification. For authentication use api credentials.

callfire.verifyCallerId({
  "callerid": ""
}, context)

Input

  • input object
    • callerid required string: A phone number in E.164 format (11-digit) which needs to be verified. Example: 12132000384
    • body CallerIdVerificationRequest

Output

  • output boolean

findMedia

Find media files created by user

callfire.findMedia({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • filter string: value to filter file names again; this value is used to check if the filename contains the filter value.
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

createMedia

Uploads media file to account, acceptable media formats: bmp, gif, jpg, m4a, mp3, mp4, png, wav

callfire.createMedia({
  "file": ""
}, context)

Input

  • input object
    • file required string, object: Binary media file
      • content string
      • encoding string (values: ascii, utf8, utf16le, base64, binary, hex)
      • contentType string
      • filename string
    • name string: A name of a media file

Output

getMediaDataByKey

Download a media file. Available types of files: bmp, gif, jpg, m4a, mp3, mp4, png, wav. Content type in response depends on 'extension' parameter, e.g. image/jpeg, image/png, audio/mp3, etc

callfire.getMediaDataByKey({
  "key": "",
  "extension": ""
}, context)

Input

  • input object
    • key required string: A hash-key of a media resource
    • extension required string: Media file type, available types: bmp, gif, jpg, m4a, mp3, mp4, png, wav

Output

getMedia

Get media resource by id

callfire.getMedia({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a media resource
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getMediaData

Download a media file. Available types of files: bmp, gif, jpg, m4a, mp3, mp4, png, wav. Content type in response depends on 'extension' parameter, e.g. image/jpeg, image/png, audio/mp3, etc

callfire.getMediaData({
  "id": 0,
  "extension": ""
}, context)

Input

  • input object
    • id required integer: An id of a media resource
    • extension required string: Media file type. Available types: bmp, gif, jpg, m4a, mp3, mp4, png, wav

Output

getMediaDataBinary

Download a MP3 media, endpoint returns application/binary content-type

callfire.getMediaDataBinary({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of a media resource

Output

findNumberLeases

Searches for all numbers leased by account user. This API is useful for finding all numbers currently owned by the user. Returns a paged list of number leases.

callfire.findNumberLeases({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • prefix string: A 4-7 digit prefix
    • city string: A city name
    • state string: A two-letter state code. Example: CA, IL, etc.
    • zipcode string: A five-digit Zipcode
    • labelName string: A label name
    • tollFree boolean: ~
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findNumberLeaseConfigs

Searches for all number lease configs for the user. Returns a paged list of NumberConfig

callfire.findNumberLeaseConfigs({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • prefix string: A 4-7 digit prefix
    • city string: A city name
    • state string: A two-letter state code. Example: CA, IL, etc.
    • zipcode string: A five-digit Zipcode
    • labelName string: A label name
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getNumberLeaseConfig

Returns a single NumberConfig instance for a given number lease

callfire.getNumberLeaseConfig({
  "number": ""
}, context)

Input

  • input object
    • number required string: A phone number in E.164 format (11-digit). Example: 12132000384
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateNumberLeaseConfig

Updates a phone number lease configuration. Use this API endpoint to add an Inbound IVR or Call Tracking feature to a CallFire phone number. Call tracking configuration allows you to track the incoming calls, to analyze and to respond customers using sms or voice replies. For more information see call tracking page

callfire.updateNumberLeaseConfig({
  "number": ""
}, context)

Input

  • input object
    • number required string: A phone number in E.164 format (11-digit) which needs to be verified. Example: 12132000384
    • body NumberConfig

Output

getNumberLease

Returns a single NumberLease instance for a given number

callfire.getNumberLease({
  "number": ""
}, context)

Input

  • input object
    • number required string: A phone number in E.164 format (11-digit). Example: 12132000384
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

updateNumberLease

Updates a number lease instance. Ability to turn on/off autoRenew and toggle call/text features for a particular number

callfire.updateNumberLease({
  "number": ""
}, context)

Input

  • input object
    • number required string: A phone number in E.164 format (11-digit). Example: 12132000384
    • body NumberLease

Output

findNumbersLocal

Searches for numbers available for purchase in CallFire local numbers catalog . At least one additional parameter is required. User may filter local numbers by their region information. If all numbers with desirable zip code is already busy search will return available numbers with nearest zip code.

callfire.findNumbersLocal({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • prefix string: A 4-7 digit prefix
    • city string: A city name
    • state string: A two-letter state code. Example: CA, IL, etc.
    • zipcode string: A five-digit Zipcode
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findNumberRegions

Searches for region information. Use this API to obtain detailed region information that can be used to query for more specific phone numbers than a general query.

callfire.findNumberRegions({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • prefix string: A 4-7 digit prefix
    • city string: A city name
    • state string: A two-letter state code. Example: CA, IL, etc.
    • zipcode string: A five-digit Zipcode
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findNumbersTollfree

Searches for the toll free numbers which are available for purchase in the CallFire catalog

callfire.findNumbersTollfree({}, context)

Input

  • input object
    • pattern string: Filter toll free numbers by prefix, pattern must be 3 char long and should end with ''. Examples: 8**, 85, 87 (but 855 will fail because pattern must end with '').
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

findOrders

Searches for account orders

callfire.findOrders({}, context)

Input

  • input object
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • status array: Filter by order status, accepts multiple values in comma separated string, available values: PROCESSING, FINISHED, PAYMENT_ERROR, VOID, WAIT_FOR_PAYMENT, PARTIALLY_ADJUSTED, ADJUSTED
    • intervalBegin integer: Start of the find time interval, formatted in unix time milliseconds. Example: 1473781817000
    • intervalEnd integer: End of the find time interval, formatted in unix time milliseconds. Example: 1473781817000

Output

orderKeywords

Purchase keywords. Send a list of available keywords into this API to purchase them using CallFire credits. Make sure the account has enough credits before trying to purchase the keywords. Keyword should only consist of uppercase and lowercase letters and numbers. Number of characters must be greater than 2, but less than 65.

callfire.orderKeywords({}, context)

Input

Output

orderNumbers

Purchase numbers. There are many ways to purchase a number. Set either 'tollFreeCount' or 'localCount' along with some querying fields to purchase numbers by bulk query. Set the list of numbers to purchase by list. Available numbers will be purchased using CallFire credits owned by the user. Make sure the account has enough credits before trying to purchase

callfire.orderNumbers({}, context)

Input

Output

getOrder

Returns a single NumberOrder instance for a given order id. Order contains information about purchased keywords, local, toll-free numbers

callfire.getOrder({
  "id": 0
}, context)

Input

  • input object
    • id required integer: An id of an order
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

getDeliveryReports

Get delivery reports

callfire.getDeliveryReports({}, context)

Input

  • input object
    • startDate string: ~
    • endDate string: ~
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • campaignId integer: ~
    • fromNumber string: ~
    • toNumber string: ~
    • deliveryCategory string (values: NO_DATA, OPTED_OUT, BOUNCED, NO_CREDITS, DELIVERED): ~
    • deliveryState string (values: DELIVERED, UNSENT_OPTED_OUT_GLOBAL, UNSENT_OPTED_OUT_LOCAL, UNSENT_NO_CREDITS, GATEWAY_REJECTED, CARRIER_REJECTED, NOT_DELIVERED, UNSENT_BAD_DATA, UNSENT_NO_WIRELESS_CARRIER, UNSENT_MESSAGE_TOO_LONG, UNSENT_MESSAGE_BLOCKED, UNSENT_QUEUE_LIMIT_REACHED, SPAM_DETECTED, ORIGINATED, SUBMITTED, FORWARDED, NOT_GIVEN, UNKNOWN, RETRY_MMS_AS_SMS, QUEUED, QUEUED_TRANSCODE, ORIGINAL, DUPE, TRUNCATED, REQUEUED_RATE_LIMITED, BUFFERED, RATE_LIMIT_EXCEEDED, SERVICE_UNAVAILABLE, SEND_MMS_AS_SMS, REQUEUED_RECOVERABLE_ERROR, SEND_WITH_ADDITIONAL_SPID): ~
    • carrier string: ~
    • messageText string: ~

Output

findTexts

Searches for texts sent or received by user. Use "campaignId=0" parameter to query for all texts sent through the POST /texts API. See call states and results

callfire.findTexts({}, context)

Input

  • input object
    • id array: List of Text ids to search for, if ids specified other query params ignored
    • campaignId integer: An id of a campaign, queries for texts inside a particular campaign. Specify null to list texts of all campaigns or 0 for a default campaign
    • batchId integer: An Id of a contact batch, queries for texts which are used in the particular contact batch
    • fromNumber string: A phone number in E.164 format (11-digit). Example: 12132000384, 67076
    • toNumber string: A phone number in E.164 format (11-digit). Example: 12132000384, 67076
    • label string: A label of a text message
    • states string: Expected text statuses in comma separated string, available values: READY, SELECTED, CALLBACK, FINISHED, DISABLED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT. See call states and results
    • results string: Expected text results in comma separated string, available values: SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED. See call states and results
    • inbound boolean: Specify true for inbound or false for outbounds. Do not specify this parameter if you need to get both inbound and outbound texts listed in response
    • intervalBegin integer: Start of the find time interval, formatted in unix time milliseconds. Example: 1473781817000
    • intervalEnd integer: End of the find time interval, formatted in unix time milliseconds. Example: 1473781817000
    • limit integer: To set the maximum number of records to return in a paged list response. The default is 100
    • offset integer: Offset to the start of a given page. The default is 0. Check pagination page for more information about pagination in CallFire API.
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.

Output

sendTexts

Use the /texts API to send individual texts quickly. By default all texts are going out from CallFire's dedicated short code. Example: 67076, 818818 etc

callfire.sendTexts({}, context)

Input

  • input object
    • fields string: Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at partial response page.
    • campaignId integer: Specifies a campaignId to send texts through a previously created campaign
    • defaultMessage string: Text message can be overridden by TextRecipient.message field. If multiple recipients have the same text message to a di
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.0

8 years ago