---
id: guides-send-orb-data-to-tinybird
title: Send Orb events to Tinybird
meta:
    description: In this guide you'll learn how to send Orb events to Tinybird using webhooks and the Events API.
---

# Send Orb events to Tinybird

[Orb](https://withorb.com) is a developer-focused platform to manage your subscription billing and revenue operations. By integrating Orb with Tinybird, you can analyze your subscription billing data in real time and enrich it with other data sources.

Some common use cases for sending Orb events to Tinybird include:

1. Tracking and monitoring subscriptions.
2. Monitoring user churn.
3. Creating custom dashboards for subscription analysis.
4. Subscriptions logs.

Read on to learn how to send events from Orb to Tinybird.

## Before you start

Before you connect Orb to Tinybird, ensure:

* You have an Orb account.
* You have a Tinybird workspace.

## Connect Orb to Tinybird

1. From the Orb dashboard, select **Developers** > **Webhooks**.
   
2. Select **Add Endpoint**.

3. In your Tinybird project, create a data source called `orb`. You can follow this [schema](https://github.com/tinybirdco/tinynest/blob/main/tinybird/datasources/orb.datasource):

```tb {% title = 'Data Source schema for Orb events %}
SCHEMA >
  `event_time` DateTime `json:$.tinybirdIngestTime` DEFAULT now(),
  `event_type` String `json:$.type` DEFAULT 'unknown',
  `event` JSON `json:$` DEFAULT '{}'

ENGINE "MergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(event_time)"
ENGINE_SORTING_KEY "event_time"
```

Using the [JSON Data Type](/sql-reference/data-types/json) you can store the semi-structured data you receive from Orb in a single column. You can later retrieve various events and their metadata as needed in your pipes.

{% callout type="caution" %}
The `JSON` data type is in private beta. If you are interested in using this type, contact Tinybird at <support@tinybird.co> or in the [Community Slack](/community).
{% /callout %}

4. From Tinybird Cloud, copy a token with privileges to append to the data source you created. You can use the admin token or create one with the required scope.

5. Back in Orb, paste the Events API URL in your Webhook Endpoint URL. Use the query parameter `name` to match the name of the data source you created in Tinybird. For example: 

```
{% user("apiHost") %}/v0/events?name=orb&token={% user("userToken") %}
```

{% snippet title="api-region-reminder" /%}

6. Select **Send test request** to test the connection and check the data gets to the `orb` data source in Tinybird.

7. You're done. Any of the Orb events is automatically sent to Tinybird through the [Events API](../events-api).

You can check the status of the integration by clicking on the Webhook endpoint in Orb or from the **Log** tab in the Tinybird `orb` data source. 
    
## See also

* [Orb webhooks](https://docs.withorb.com/guides/integrations-and-exports/webhooks)
