Twilio is a cloud communications platform that allows users to programmatically make and receive phone calls, and exchange text messages.

Hevo uses the Twilio REST API to replicate the data present in your Twilio account into the desired Destination database or data warehouses for scalable analysis. You must provide the Twilio API key, which is a combination of the API string identifier (SID) and the API Secret, to allow Hevo to access the Twilio data.


Configuring Twilio as a Source

Perform the following steps to configure Twilio as the Source in your Pipeline:

  1. Click PIPELINES in the Asset Palette.

  2. Click + CREATE in the Pipelines List View.

  3. In the Select Source Type page, select Twilio.

  4. In the Configure your Twilio Source page, specify the following:

    Configure your Twilio Source

    • Pipeline Name: A unique name for your Pipeline, not exceeding 255 characters.

    • API SID: The string identifier (SID) for your API key.

    • API Secret: The secret for your API key, retrieved from your Twilio account.

    • Historical Sync Duration: The duration for which the existing data in the Source must be ingested. Default duration: 6 Months.

  5. Click TEST & CONTINUE.

  6. Proceed to configuring the data ingestion and setting up the Destination.

Creating the Twilio API Key

  1. Log in to the Twilio console.

  2. Click Account, and in the drop-down, click API keys & tokens.

    Auth tokens and API keys

  3. In the Auth tokens & API keys page, click Create API key.

    API key for Hevo

  4. In the Create new API key page, provide the following credentials:

    • Friendly name: A name for your API key.

    • Region: The region where your Twilio data is stored.

    • Key type: The type of API key. This can be: Standard or Main. You must select the Main key type, so that Hevo can access the data in your accounts and sub-accounts. Read API Key Resource to know more about the two key types.

  5. Click Create API key.

    Create API key

  6. In the Copy secret key page, copy the API SID and Secret and store them safely.

  7. Select the confirmation check box below, and click Done.

    Copy API key and API SID

  8. You have successfully created your API key. You can view the API key that you created in the Auth tokens & API keys page. Use the API SID and Secret for creating Hevo Pipelines.

    Your API key

Data Replication

Default Pipeline Frequency Minimum Pipeline Frequency Maximum Pipeline Frequency Custom Frequency Range (Hrs)
6 Hrs 1 Hr 24 Hrs 1-24

Note: The custom frequency must be set in hours, as an integer value. For example, 1, 2, 3 but not 1.5 or 1.75.

  • Historical Data: In the first run of the Pipeline, Hevo ingests historical data for the Usage Records object on the basis of the historical sync duration selected at the time of creating the Pipeline and loads it to the Destination. Default duration: 6 Months.

  • Incremental Data: Once the historical load is complete, all new and updated records for the object, Usage Records are synchronized with your Destination according to the Pipeline frequency.

Schema and Primary Keys

Hevo uses the following schema to upload the records in the Destination:

Data Model

The following is the list of tables (objects) that are created at the Destination when you run the Pipeline:

Note: All objects other than Usage Records are Full Load objects.

Object Description
Accounts Contains the details about your Twilio account and sub-accounts. These details are stored according to the API SID and API Secret provided by the user. It is the topmost entity and acts as a parent for all the other objects.
Addresses Contains your and your customer’s physical location within a country.
Calls Contains the list of incoming and outgoing calls made to all the phone numbers available for an account.
Conferences Contains the details about conferences in your Twilio account.
Conversation Services Contains the details about conversations in your Twilio account. It also contains the child objects, Conversations, Conversation Roles, and Conversation Users.
Conversations Contains the list of the current participants in a conversation, and the messages that they have sent amongst each other.
Conversation Users Contains the details about all the users in a conversation. Users are participants in a conversation with privileges such as the ability to edit and delete messages.
Conversation Roles Contains the details about the roles that participants have been assigned in a conversation. This determines what they are able to do within a particular conversation, such as invite participants to be members of the conversation, post messages, and remove other participants from the conversation.
Flows Contains the individual workflows that you create. Workflows control how tasks are prioritized and arranged into queues, and how they should move across queues over time.
Incoming Phone Numbers Contains the phone numbers provisioned from Twilio and ported or hosted to Twilio.
Messages Contains the details about an inbound or outbound message.
Outgoing Caller IDs Contains the list of an account’s verified phone numbers. An Outgoing Caller ID represents a single verified number that may be used as a caller ID for making outgoing calls.
Trunks Contains the details of Session Initiation Protocol (SIP) Trunks in your Twilio account. SIP Trunks are used to create cloud-based solutions for providing IP-based communications.
Usage Records Contains the details about the actions, such as calls made and messages exchanged, by your Twilio account during any time period and by any usage category. This information makes it easy to build reporting and analytics tools for your application.

Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
May-24-2022 1.89 New document.
Last updated on 09 Sep 2022

Tell us what went wrong