Skip to main content

Request Details

All Reporting API endpoints must have a start and end date (in UTC timezone) as required query parameters. All data is returned in UTC timezone. Below are details related to the request, response, and query parameters that apply to all Reporting API endpoints.

info

By default, each Reporting API endpoint returns all data for the partner account associated with the API Key being used. If you have more than one integration setup within your account, then by default each endpoint will return all data for your account, grouped by the ClientId of each integration. To fetch data specific to a single ClientId within your account, use the clientIds parameter as described below.

Query Parameters

Each endpoint accepts the following query parameters.

ParameterDescriptionRequired
startDateDate in the format of yyyy-MM-ddtrue
endDateDate in the format of yyyy-MM-ddtrue
clientIdsUse this to retrieve metrics for a specific ClientId within your account. Should be a string with one or more clientIds in the format of "string1,string2,etc.."false
countryFilter by country code as defined herefalse
productTypeFilter by product type. See list of supported languages.false

Example Request

curl \
--request GET 'https://api.inbrain.ai/api/v2/reports/earnings?startDate=2022-09-01&endDate=2022-09-05' \
--header 'X-InBrain-Api-Key: YOUR_API_KEY_HERE'

Response

Response codes

CodeDescriptionReason
200Success
400Bad RequestSome of the request parameters are missing or invalid
401UnauthorizedInvaild API Key
403ForbiddenUser geo is unsupported/User reached surveys limit/User banned
429Too Many RequestsToo many requests in a given amount of time
500Internal Server ErrorServer error occured while processing the request

Success model

Successful response is a JSON object. See example below:

[
{
"clientId": "fbbb2399-0412-46ad-abd7-2f4851d062d3",
"total": 3935.5897,
"data": [
504.6873,
701.3224
],
"dateArray": [
"2021-06-03T00:00:00",
"2021-06-04T00:00:00"
]
},
{
"clientId": "55e9e563-11fc-4b45-84d8-9219bd58731b",
"total": 6935.5897,
"data": [
584.6873,
701.3224
],
"dateArray": [
"2021-06-03T00:00:00",
"2021-06-04T00:00:00"
]
}
]