Most common CallRail API requests & how to use them
While the CallRail API is intended for developers and customers, here is a basic introduction on some of the most commonly made API requests.
Listing All Calls sorted by Customer Name
Method GET
https://api.callrail.com/v3/a/{account_id}/calls.json?sort=customer_name&order=asc
This will return JSON listing call data for all calls sorted by the customer name in alphabetical order.
Listing All Calls filtered by Tag
Method GET
https://api.callrail.com/v3/a/{account_id}/calls.json?tags=example_1
This will return call data for calls that have the tag name example_1
https://api.callrail.com/v3/a/{account_id}/calls.json?tags[]=example_1&tags[]=example_2
To request call data for more than one tag at a time, use the format “tag[]”
Creating an Outbound Call
Method POST
Upon making the request, the first leg of the call is placed to the supplied business_phone_number to initiate the outbound phone call. Once this call is answered by the business, another outbound dial is made to the customer_phone_number and connected to the initial business phone call.
Listing All Calls filtered by Date Range
Method GET
https://api.callrail.com/v3/a/{account_id}/calls.json?start_date=2016-10-01&end_date=2016-10-17
This will return JSON listing call data for calls within the given date range.
Creating a Tag for your Account
Method POST
https://api.callrail.com/v3/a/{account_id}/tags.json?name=example&tag_level=account
This will create an account level tag.
This will create a company level tag.
Deleting a User
You’ll first need to retrieve the User ID by listing your users.
Method GET
https://api.callrail.com/v3/a/{account_id}/users.json
Then you’ll need to find the user you want to delete and retrieve that user ID from the response to use in the next request.
Method DELETE
https://api.callrail.com/v3/a/{account_id}/users/{user_id}.json
This will delete the selected user.
Listing All Trackers sorted by Name
Method GET
https://api.callrail.com/v3/a/{account_id}/users.json?sort=name
Listing All Text Messages searching by Customer’s Phone Number
Method GET
https://api.callrail.com/v3/a/170499692/text-messages.json?search={customer_phone_number}
For more information regarding how to use the CallRail API, view our documentation at the following link: https://apidocs.callrail.com/
Comments
Please sign in to leave a comment.