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
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=bLqqjPie9ptwoWm6VBxHCu6JkkoWJpReturned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. resource)
Your API key for authentication
200
success250c68b9c21b78e40e7a3285a2d538d3bc24aabd3b4c76a782fb0a571ca4501d0Example: 180404
Your API key for authentication
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
900Returned when one or more parameters is malformed - an appropriate error message will be returned
Your API key for authentication
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)
Returned when the user_id is not existent
💁♂️ User info
Your API key for authentication
user ID to query for
reference ID to query for
Returned when the provided resources are found
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Zero-based page number. If omitted, results are not paginated.
0Number of results per page (default is 500).
500Returned upon a successful request
Returned when one or more parameters are malformed
Your API key for authentication
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
FITBITLast 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
trueReturned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
⏳ Historical Data retrieval
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
✏️ Writing data
Your API key for authentication
Returned when activity was successfully created on the provider
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Returned when activity was successfully created on the provider
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Returned when activity was successfully created on the provider
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Terra user ID (UUID format) to retrieve data for
Returned when activity was successfully created on the provider
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Terra user ID (UUID format) to retrieve data for
List of identifiers for nutrition 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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
Terra user ID (UUID format) to retrieve data for
List of identifiers for body metrics 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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when credentials (dev ID and API key) are invalid
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Your API key for authentication
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
Returned when one or more parameters is malformed - an appropriate error message will be returned
Returned when authorization with a data provider has failed
Returned when a parameter does not exist on Terra's end (e.g. user_id)
Last updated
Was this helpful?