Get
GET /:account/analytics_reports/:report{?account,descendants,startDate,endDate}
This will return aggregated statistics for the first 100 users of an Account for a given date range. The descendants flag is required to include statistics for the account and all descendants.
Examples
Getting the Users by Primary Account Report
Request
GET /my_account/analytics_reports/users_by_organization?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /my_account/analytics_reports/users_by_organization?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Response
Status
200
Response Type
Example Body
{
"@type": "AnalyticsReport",
"@context": "/contexts/AnalyticsReport.jsonld",
"id": "/my_account/analytics_reports/users_by_organization?account=/accounts/my_account&start_date=2020-10-23&end_date=2020-10-30",
"startDate": "2020-10-23",
"endDate": "2020-10-30",
"headers": [
{
"title": "Organization Name",
"slug": "organization_name",
"description": "The highest level account."
},
{
"title": "User Created",
"slug": "user_created",
"description": "The date the user was created in Next."
}
],
"totalCount": 1,
"data": [
[
"Example Account",
"TextUs Account",
"Example Account",
"Not Chuck",
"user",
"2020-10-23",
"2020-10-30"
]
],
"title": "User Engagement"
}
Getting the User Engagement Report
Request
GET /my_account/analytics_reports/user_engagement?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /my_account/analytics_reports/user_engagement?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Response
Status
200
Response Type
Example Body
{
"@type": "AnalyticsReport",
"@context": "/contexts/AnalyticsReport.jsonld",
"id": "/my_account/analytics_reports/user_engagement?account=/accounts/my_account&start_date=2020-10-23&end_date=2020-10-30",
"startDate": "2020-10-23",
"endDate": "2020-10-30",
"headers": [
{
"title": "Organization Name",
"slug": "organization_name",
"description": "The highest level account."
},
{
"title": "User Created",
"slug": "user_created",
"description": "The date the user was created in Next."
}
],
"totalCount": 1,
"data": [
[
"Example Account",
"TextUs Account",
"Example Account",
"Not Chuck",
"user",
"2020-10-23",
"2020-10-30"
]
],
"title": "User Engagement"
}
Getting the Message Deliverability Report
Request
GET /my_account/analytics_reports/message_deliverability?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /my_account/analytics_reports/message_deliverability?account=/accounts/my_account&startDate=2020-10-23&endDate=2020-10-30
Response
Status
200
Response Type
Example Body
{
"@type": "AnalyticsReport",
"@context": "/contexts/AnalyticsReport.jsonld",
"id": "/my_account/analytics_reports/message_deliverability?account=/accounts/my_account&start_date=2020-10-23&end_date=2020-10-30",
"startDate": "2020-10-23",
"endDate": "2020-10-30",
"headers": [
{
"title": "Organization Name",
"slug": "organization_name",
"description": "The highest level account."
},
{
"title": "User Created",
"slug": "user_created",
"description": "The date the user was created in Next."
}
],
"totalCount": 1,
"data": [
[
"Example Account",
"TextUs Account",
"Example Account",
"Not Chuck",
"user",
"2020-10-23",
"2020-10-30"
]
],
"title": "Message Deliverability"
}