Event Types

Getting Started

Setting up

Authenticate Users

Getting Data

Parsing Data

API Settings



Mobile Setup


API


Widget


Request


Receive


Events


Data Models

Summary

Terra automatically sends data modeled as Events to your webhook. Each Event should arrive in JSON format.

Each event contains a type field that specifies its type, and a user field that specifies which TerraUser the event relates to.

{
  "type": String,
  "user": TerraUser,
  ...
}

View all event types that you may receive from your webhook. The complete documentation of the data included in each event type can be found in Event Types reference.

TypeExplanation
authOccurs when a user attempts to authenticate
deauthOccurs when a user deauthenticates through the Terra
user_reauthOccurs when a user successfully authenticates for a second time, with the same account. You will receive a successful auth and a user_reauth payload
access_revokedOccurs when a user revokes Terra's access from the provider's end
connection_errorOccurs when a request to a provider returns an HTTP response of 401, 403 or 412
google_no_datasourceOccurs when a Google Fit user doesn't have a data source linked to their account. All data requests for the user will be empty unless they link a data source
processingOccurs when data is being fetched asynchronously from the provider. The data will be sent through automatically via webhook, and you can also safely request for it after the time in the retry_after_seconds field.
large_request_sendingOccurs when more than one month of data has been requested and all data has been successfully submitted
large_request_processingOccurs when more a request for over one month of data has been submitted to Terra. Data will be sent in chunks with the same reference field after this request. Each chunk will be at most 10 objects in the data field or 10 MB in size, whichever limit gets hit first
activity, athlete, body, daily, menstruation, nutrition, sleepOccurs throughout the day as users use their wearables. activity updates when new activity is complete