Skip to main content

Reports - Report Send

Endpoint

/i/reports/send

Overview

Triggers immediate send for one report.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions

Requires reports Read permission.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringYesApp ID used by permission validation.
argsString (JSON Object)YesMust include report _id.
args._idStringYesTarget report ID.

Examples

Send a report immediately

/i/reports/send?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
args={"_id":"6262742dbf7392a8bfd8c1f6"}

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringResult message from send flow.

Error Responses

  • 200
{
"result": "Not enough args"
}
  • 200
{
"result": "Report not found"
}
  • 200
{
"result": "No data to report"
}
  • 200
{
"result": "Error while sending out report."
}

Standard authentication/authorization errors from read validation can also be returned.

Behavior

  • Parses args JSON before route execution.
  • Uses owner-scoped lookup for non-global-admin users.
  • Loads the target report, generates report payload, and sends email immediately.
  • Returns callback error text directly in result when send fails.
Implementation details

Configuration Impact

SettingDefaultAffectsUser-visible impact
api.offline_modefalseReport enrichment during report generationWhen enabled, external news/universe enrichment is skipped, so sent report content can differ from online mode.

Database Collections

CollectionUsed forData touched by this endpoint
countly.reportsReport sourceReads target report definition before send execution.
countly.membersReport generation contextRead indirectly by report generation flow (report owner/global admin fallback).
countly.event_groupsReport enrichmentRead indirectly for event group naming in generated report content.