createReport abstract method

Future<MastodonResponse<Report>> createReport({
  1. required String accountId,
  2. String? reason,
  3. bool? forward,
  4. ReportCategory? category,
  5. List<String>? statusIds,
  6. List<String>? ruleIds,
})

Report problematic users to your moderators.

Parameters

  • accountId: ID of the account to report.

  • reason: The reason for the report. Default maximum of 1000 characters.

  • forward: If the account is remote, should the report be forwarded to the remote admin? Defaults to false.

  • category: Specify if the report is due to ReportCategory.spam, ReportCategory.violation of enumerated instance rules, or some other reason. Defaults to ReportCategory.other. Will be set to violation if ruleIds is provided (regardless of any category value you provide).

  • statusIds: You can attach statuses to the report to provide additional context.

  • ruleIds: For violation category reports, specify the ID of the exact rules broken.

Endpoint Url

  • POST /api/v1/reports HTTP/1.1

Authentication Methods

  • OAuth 2.0

Required Scopes

  • write:reports

Reference

Implementation

Future<MastodonResponse<Report>> createReport({
  required String accountId,
  String? reason,
  bool? forward,
  ReportCategory? category,
  List<String>? statusIds,
  List<String>? ruleIds,
});