billing.cost-report.send

Send a month’s report now, with its CSVs (once per month unless `again`)

POST /billing/api/cost-report/sendIAM billing:SendCostReportChanges state

`outcome`: sent, already_sent, disabled, no_recipients or failed. With `again: true` it goes out once more, at most every 10 minutes (429 otherwise). Attached: cost-lines-YYYY-MM.csv and accounting-YYYY-MM.csv.

Request syntax

POST /billing/api/cost-report/send
{
  "period": "string",
  "again": "boolean"
}

Request body

  • periodOptional

    string

    The billing month, YYYY-MM (default: last month)

    Constraints: /^\d{4}-(0[1-9]|1[0-2])$/

  • againOptional

    boolean

    Send even if this month already went out (at most every 10 minutes); default: only if it has not

Response

200 with { period, outcome }, also when nothing went out: sent, already_sent (that month went out before and again was not set), disabled (the report is off and again was not set; with again it is sent anyway), no_recipients, or failed (the mail could not be sent; the error is recorded under `get`’s sent). 429 when again is set and that month went out less than 10 minutes ago.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow billing:SendCostReport on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud billing cost-report send

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_billing_cost-report_send.