REST API Endpoints
🕸️ API info
Returns list of all available integrations on the API
FITBITAPPLEsuccessPossible values: Returns list of all available integrations on the API
If true, allows SDK integrations to be included in the response.
Successful response containing a list of integrations.
Status of the API response
successSuccessful response containing a list of integrations.
🔌 Authentication
Your API key for authentication
Your developer ID for authentication and tracking
Provider resource identifier (e.g., 'FITBIT', 'GARMIN', 'OURA'). See "Get detailed list of integrations" for available providers
FITBITyour developer ID
testingTerraReturned when authentication link could be successfully generated
indicates that the request was successful
successPossible values: User ID for the user being created
23dc2540-7139-44c6-8158-f81196e2cf2eauthentication URL the user must be redirected to in order to link their account
https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=23BBG9&scope=settings+nutrition+sleep+heartrate+electrocardiogram+weight+respiratory_rate+oxygen_saturation+profile+temperature+cardio_fitness+activity+location&state=bLqqjPie9ptwoWm6VBxHCu6JkkoWJpOne or more parameters is malformed. The detail field describes the specific problem.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
200
success250c68b9c21b78e40e7a3285a2d538d3bc24aabd3b4c76a782fb0a571ca4501d0Example: 180A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Comma separated list of providers to display on the device selection page. This overrides your selected sources on your dashboard
GARMIN,FITBIT,OURA,WITHINGS,SUUNTODisplay language of the widget
enIdentifier of the end user on your system, such as a user ID or email associated with them
[email protected]URL the user is redirected to upon successful authentication
https://myapp.com/successURL the user is redirected to upon unsuccessful authentication
https://myapp.com/failureReturned when authentication link could be successfully generated
Session ID for the widget authentication session
23dc2540-7139-44c6-8158-f81196e2cf2ethe widget URL the user must be redirected to in order to link their account
https://widget.tryterra.co/session/344d475f-296a-489a-a88c-54183671dafdindicates that the request was successful (value is success)
successPossible values: a number in seconds depicting how long the url is valid for
900One or more parameters is malformed. The detail field describes the specific problem.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to deauthenticate and remove from Terra system
Returned when user is successfully deauthenticated and data is deleted
indicates that the deauthentication was successful (value is success)
A referenced resource does not exist on Terra's end.
💁♂️ User info
Your API key for authentication
Your developer ID for authentication and tracking
user ID to query for
reference ID to query for
Returned when the provided resources are found
One or more parameters is malformed. The detail field describes the specific problem.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Zero-based page number. If omitted, results are not paginated.
0Number of results per page (default is 500).
500Returned upon a successful request
One or more parameters is malformed. The detail field describes the specific problem.
Your API key for authentication
Your developer ID for authentication and tracking
List of user IDs to get information for
Returned upon successful request
List of User objects
Terra identifier for the wearable connection
123e4567-e89b-12d3-a456-426614174000Connection data source
FITBITTime at which the connection was created
2022-12-12T10:00:00.000000+00:00Last time at which a webhook update was sent for the connection
2022-12-12T10:00:00.000000+00:00(when available) Permissions granted by the user during authentication - to be used as debugging metadata
activity:read,sleep:readConnection identifier on the developer's end, used to tie connection back to a user on the developer's platform
[email protected]whether the user is active or not (inactive users will not receive any data updates and are in considered
trueOne or more parameters is malformed. The detail field describes the specific problem.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
⏳ Historical Data retrieval
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Boolean flag specifying whether to include detailed samples in the returned payload (default: false)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Start date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
End date for data query - either ISO8601 date (YYYY-MM-DD) or unix timestamp in seconds (10-digit)
Boolean flag specifying whether to send the data retrieved to the webhook instead of in the response (default: true if not provided)
Returned upon successful data request
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
✏️ Writing data
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
Returned when activity was successfully created on the provider
List of identifiers for the objects created, returned in the same order they were posted. I.e. Posting [ObjectA, ObjectB] will return [IdentifierA, IdentifierB]
Planned workout successfully createdOne or more parameters is malformed. The detail field describes the specific problem.
A referenced resource does not exist on Terra's end.
Your API key for authentication
Your developer ID for authentication and tracking
Terra user ID (UUID format) to retrieve data for
List of identifiers for planned workout entries to be deleted
Returned when all records were deleted successfully
Returned when multiple status codes were obtained from attempting to delete the requested records
One or more parameters is malformed. The detail field describes the specific problem.
Authentication credentials are missing or invalid.
A referenced resource does not exist on Terra's end.
🛰️ v3 endpoints
Last updated
Was this helpful?