# Connect to Twilio

## Overview

Connect Finout to your Twilio account to track and analyze your Twilio spending alongside your other infrastructure costs.

Once connected, your Twilio costs can be broken down on Finout's platform by product category.

**Twilio configuration workflow:**

1. Locate your Account SID in Twilio
2. Create an API Key and Secret in Twilio
3. Connect Twilio in Finout

***

## Connect to Twilio

### 1. Locate Your Account SID

Your Account SID is available on the Twilio Console home page and identifies the Twilio account Finout will connect to.

**To locate your Account SID:**

1. Log in to the [Twilio Console](https://console.twilio.com).
2. On the **Dashboard**, locate the **Account Info** panel.
3. Copy the **Account SID**. Save it for use in step 3.

***

### 2. Create an API Key and Secret in Twilio

Finout uses a Twilio API Key and Secret to authenticate and retrieve your billing data. You generate these in the Twilio Console. The API Secret is only shown once - copy it before closing the page.

**To create an API Key:**

1. In the Twilio Console, navigate to **Account > API Keys & Tokens**.
2. Click **Create API Key**. The **New API Key** form appears.
3. Enter a **Friendly Name** for the key, for example: `finout-billing-read`.
4. Set the **Key Type** to **Standard**.
5. Click **Create API Key**. The **API Key** and **API Secret** appear.\
   **Important**: Copy the API Secret now. Twilio does not display it again after you close this.
6. Copy both the **API Key (SID)** and the **API Secret**. Save them for use in step 3.
7. Click **Done**.

***

### 3. Connect Twilio in Finout

With your Account SID, API Key, and API Secret ready, add Twilio as a Cost Center in Finout.

**To connect Twilio:**

1. In Finout, navigate to **Settings > Cost Centers** and click **Add cost center**. The **Connect Accounts** window appears.
2. Find **Twilio** and click **Connect Now**. The **Connect Twilio** wizard appears.
3. Enter the following details:
   * **Cost Center Name**: Enter a name for this Twilio cost center.
   * **Account SID**: Paste the Account SID copied in step 1.
   * **API Key**: Paste the API Key SID copied in step 2.
   * **API Secret**: Paste the API Secret copied in step 2.
4. Click **Complete Integration**. Your Twilio Cost Center is created.

{% hint style="info" %}
**Note**: Twilio data appears in Finout within 48 hours
{% endhint %}

***

### Data coverage and invoice reconciliation

Finout retrieves Twilio cost data through the Twilio Usage Records API. There are two known gaps between what the API returns and what appears on your Twilio invoice. Understanding them helps you reconcile Finout's figures against your invoice.

**Flat category hierarchy**

The Twilio Usage Records API returns data at multiple levels of the same hierarchy under the same column.

For example, `calls` appears as a single total alongside its sub-categories `calls-inbound` and `calls-outbound`. Similarly, `sms` appears alongside `sms-inbound`, `sms-outbound`, `sms-outbound-shortcode`, and `sms-outbound-longcode`.

Since the same spend is represented at every level of the hierarchy, in effect **the API reports the same cost multiple times**, which Finout deduplicates.

{% hint style="danger" %}
When categories are reported by the API that are outside Finout's deduplication allow-list, it may lead to missing costs; Finout will actively add new categories to this list to mitigate this gap.
{% endhint %}

**Products not available via the API**

Not all Twilio products that appear on your invoice are accessible through the Usage Records API. The following products return no records through the API and are therefore not reflected in Finout:

* **Flex**
* **Taxes**

{% hint style="danger" %}
**Important**: Because these products are not exposed by Twilio's API, the total cost shown in Finout will be lower than your Twilio invoice total. This gap cannot be closed through data processing alone. Contact <support@finout.io> if you need guidance on accounting for these costs alongside your Twilio cost center.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-twilio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
