Terra Docs
Dashboard
  • Docs
  • API Reference
  • Changelog
  • Getting Started
    • What is Terra API?
    • Account setup and API keys
    • Core concepts
  • Health & Fitness API
    • Overview
    • Quickstart
    • Integration setup
      • Understanding sources and destinations
      • Setting up data sources
      • Setting up data destinations
        • Webhooks
        • SQL database (Postgres, MySQL)
        • Supabase
        • Cloud storage (S3, GCP)
        • Queuing services (SQS, Kafka)
      • Customising data types
      • Dedicated data source API keys
      • Understanding Terra environments
    • User authentication
      • Authentication flow
      • Implementation (Terra widget)
      • Implementation (Custom UI)
      • Handling authentication events
      • Customising authentication redirects
    • Managing user health data
      • Receiving health data updates (events)
      • Requesting historical health data (REST API requests)
      • Writing data
    • Mobile-only sources
      • iOS (Swift)
      • Android (Kotlin)
      • React Native
      • Flutter
    • Troubleshooting
    • Pricing
  • User Engagement
    • Health Scores
  • Streaming API
    • Overview
    • Wearable -> Your app
      • iOS (Swift)
      • Android
    • Your app -> Terra
      • iOS (Swift)
      • Android
    • Terra -> Your backend
  • Teams API
  • Biomarkers API - Upcoming
Powered by GitBook
On this page
  • Data sources
  • Data Destinations
  • Automatic data delivery
  • Summary of steps

Was this helpful?

  1. Health & Fitness API
  2. Integration setup

Understanding sources and destinations

PreviousIntegration setupNextSetting up data sources

Last updated 20 days ago

Was this helpful?

To integrate with Terra, you must define Data Sources where user data originates (e.g. Fitbit, Garmin, etc.) and Data Destinations where Terra sends this data (e.g. Webhook, MongoDB, etc.)

Once that is done, Terra’s Health & Fitness API pushes all user health payloads via events directly to your data destination (e.g. webhook). This removes the need to request data via the API.

Data sources

Data Sources are the external health and fitness platforms your users authorize to share data with Terra. These include wearables (e.g., Fitbit, Garmin, Oura), fitness applications, and medical devices. Terra standardises data from these diverse sources into a uniform format.

Refer to for setup instructions.

Data Destinations

Data Destinations specify where Terra should deliver processed user data. Supported destinations include Webhooks, SQL databases (PostgreSQL, MySQL), cloud storage (AWS S3, GCP GCS, Azure Blob), and message queuing services (AWS SQS, Kafka).

Refer to for setup instructions.

Automatic data delivery

Terra's Health & Fitness API operates on an event-driven model. Once Data Sources are enabled, a Data Destination is configured, and a user successfully authenticates:

  1. New data becomes available from the user's connected Data Source.

  2. Terra retrieves and processes this data, creating a standardised event payload.

  3. This payload is automatically pushed to your configured Data Destination.

This automatic push mechanism means you receive new data as it becomes available, without needing to poll the API. For example, if using a Webhook destination, Terra will send an HTTP POST request to your server with the new data payload.

Summary of steps

The typical process for setting up your integrations involves:

Add data with one click (e.g. Fitbit, Oura, Garmin)

Add a data of choice (e.g. Webhook, MongoDB, PostgreSQL, AWS S3, etc.)

Setting up data sources
Setting up data destinations
sources
destination