Back

CallRail API Essential Guide

Aug 12, 20246 minute read

What type of API does CallRail provide?

Based on the search results, CallRail has a REST API. Here are the key points:

Type of API

CallRail uses a REST (Representational State Transfer) API.

Key Details

  • The CallRail API adheres to REST architectural principles.
  • It takes advantage of HTTP methods to create, read, update, and delete (CRUD) resources.
  • The API sends and receives data in JSON format.

Additional Information

  • The API uses API keys for authentication and authorization.
  • It has rate limiting in place to restrict the number of requests on an hourly and daily basis.
  • CallRail provides webhooks for real-time notifications of certain events.

Best Practices

  • Use the JSON POST body for accessing attributes, as it's the recommended format for any new development.
  • Parse the JSON POST body and ignore query string parameters according to the currently-supported version of the API.
  • Use the provided secret token to validate webhook payloads for security.

In summary, CallRail offers a REST API that follows standard REST principles, uses JSON for data exchange, and provides features like authentication, rate limiting, and webhooks for integration with other systems.

Does the CallRail API have webhooks?

The official CallRail API does have webhooks. You can subscribe to various events, including pre-call, call routing complete, post-call, call modified, text message received, text message sent, form submission, outbound post-call, and outbound call modified. Webhooks are configured per company in CallRail, and you can specify the URL to receive the data and the events to trigger it. Webhook payloads are sent as JSON in the POST body, and CallRail generates a secret token for each company that can be used to validate webhook payloads. Webhooks should respond with a 2xx HTTP status code to indicate successful receipt. The Post-Call webhook fires after a call is completed and recording/transcription are attached, with a maximum delay of 20 minutes, and the Call Modified webhook fires when call data is updated after the call has ended. Webhooks can be created and managed through the CallRail API as well as the web interface.

Rate Limits and other limitations

Here are the key points about the API rate limits for CallRail's API:

Default Rate Limits

CallRail has the following default rate limits for their API:

  • General API Requests:

    • 1,000 requests per hour
    • 10,000 requests per day
  • SMS Send:

    • 150 requests per hour
    • 1,000 requests per day
  • Outbound Call:

    • 100 requests per hour
    • 2,000 requests per day

Exceeding Rate Limits

  • If you exceed the rate limit, all endpoints will return an HTTP 429 response code.

  • Applications should detect this code and react by pausing or slowing requests until the 429 clears.

Increasing Rate Limits

  • If you need higher rate limits, you can contact CallRail's support team to request an increase.

  • Rate limits can be increased on a case-by-case basis.

  • In most cases, there is no charge to increase limits, but CallRail may ask questions about your use case before approving.

Key Considerations

  • Rate limits are applied at the account level.

  • If multiple applications or clients are using the same CallRail account, their API usage will count towards the same rate limit.

  • For agencies using one central CallRail account for multiple clients, it's especially important to monitor API usage to avoid hitting limits.

Best Practices

  • Monitor your API usage to stay within limits.
  • Implement proper error handling for 429 responses.
  • If you consistently need more requests, contact CallRail support to discuss increasing your limits.

By understanding and adhering to these rate limits, you can ensure smooth integration with the CallRail API while avoiding disruptions due to exceeding request thresholds.

Latest API Version

The most recent version of the CallRail API is v3.

Key points to consider:

  • CallRail currently offers API v3, which is a REST API that provides programmatic access to CallRail account data.

  • The API uses JSON for data exchange and requires authentication via an API key provided in the Authorization header.

  • It supports standard HTTP methods (GET, POST, PUT, DELETE) for CRUD operations on CallRail resources.

  • The base URL for API requests is https://api.callrail.com/v3/.

  • Rate limiting is applied on an hourly and daily basis. Exceeding the rate limit will result in a 429 HTTP response.

Best practices:

  • Use HTTPS for all API requests to ensure data security.

  • Include proper error handling in your code to deal with rate limiting and other potential errors.

  • Validate webhook payloads using the provided signature to ensure requests are coming from CallRail.

  • When possible, use the JSON response body rather than query string parameters, as new features are only added to the JSON response.

The CallRail API v3 provides comprehensive access to call data, company information, integrations, and other CallRail features. It's designed to allow developers to build custom integrations and automate workflows involving CallRail data.

How to get a CallRail developer account and API Keys?

To get a developer account for CallRail to create an API integration, you need to follow these steps:

1. Sign up for a CallRail account

First, you need to have a CallRail account. If you don't already have one, you'll need to sign up for CallRail's services.

2. Obtain an API key

Once you have a CallRail account:

  1. Log in to your CallRail dashboard.
  2. Look for an API or Developer section in the account settings.
  3. Generate an API key. This key will be used to authenticate your API requests.

3. Familiarize yourself with the API documentation

CallRail provides comprehensive API documentation that you should review:

  • The API uses REST principles and communicates using JSON format.
  • Authentication is done via the HTTP Authorization header using your API key.
  • The base URL for API requests is https://api.callrail.com/v3/.

4. Set up your development environment

To start making API requests:

  1. Choose an HTTP client (like Postman) or a programming language with HTTP capabilities.
  2. Set up your requests with the necessary headers, including the Authorization header with your API key.

5. Test your integration

Make a simple API request to verify your setup. For example, you could try retrieving your account information:

GET https://api.callrail.com/v3/a/{account_id}/companies.json
Authorization: Token token="YOUR_API_KEY"

Replace {account_id} with your actual account ID and YOUR_API_KEY with your API key.

Key points to consider:

  • API keys are scoped to individual users and have access to the same data as the user who created the key.
  • Be cautious with your API key, as anyone with the key can access or modify data you have control over.
  • Familiarize yourself with the rate limits to avoid exceeding them.
  • Use webhooks for real-time notifications of certain events in your account.

Best practices:

  1. Keep your API key secure and don't share it publicly.
  2. Use version control for your integration code.
  3. Implement error handling to manage API response codes effectively.
  4. Consider using CallRail's webhooks for real-time updates rather than constantly polling the API.

By following these steps and best practices, you should be able to set up a developer account and create an API integration with CallRail. Remember to refer to the official CallRail API documentation for the most up-to-date and detailed information.

What can you do with the CallRail API?

Based on the information provided in the search results, here's a list of data models you can interact with using the CallRail API, along with what is possible for each:

Accounts

  • Retrieve data about which CallRail accounts can be accessed by the given API key
  • Accounts are the top-level object in CallRail
  • Create companies within accounts
  • Perform actions like creating tracking numbers and adding users within accounts

Companies

  • Create separate entities within an account
  • Create tracking phone numbers within companies
  • Configure integrations for companies
  • Enable email notifications for companies
  • Handle specific company settings
  • Track calls and other activities within the context of a company
  • Aggregate reports across all tracking numbers within a company
  • Restrict user access to specific companies

Calls

  • Retrieve call data
  • Log calls to external systems (e.g., Google Sheets)
  • Create real-time alerts for calls
  • Sync call data with CRM systems like Salesforce

Texts

  • Access data about text messages

Form Submissions

  • Retrieve data about form submissions

Integrations

  • Create and manage integrations between CallRail and third-party services
  • Set up webhook integrations to send data from CallRail to outside sources
  • Create custom integrations to capture custom cookie data from web visitors and associate it with calls

Outbound Caller IDs

  • List all Outbound Caller IDs within a target company
  • Retrieve details such as phone number, name, verification status, and creation date

Integration Triggers

  • List all Integration Triggers for a company
  • Configure triggers based on criteria such as call type, duration, and lead status

Communication Records

  • Access phone calls, call recordings, text messages, chat logs, form submissions, and web visitor sessions
  • Note: Data is retained for 25 months according to the Data Retention Policy

Tracking Numbers

  • Create and manage tracking phone numbers within companies

Users

  • Add and manage users within accounts and companies

Reports

  • Generate and retrieve reports aggregated across tracking numbers within a company

This list covers the main data models and interactions possible with the CallRail API based on the provided search results. The API allows for comprehensive management and retrieval of data related to call tracking, marketing analytics, and customer interactions.