## Update Report **post** `/print-mail/v1/reports/{id}` Update an existing saved report definition. You can change the query, description, or metadata. ### Path Parameters - `id: string` ### Body Parameters - `description: optional string` An optional user-friendly description for the report. Set to null to remove. - `metadata: optional map[string]` Optional key-value metadata associated with the report. Set to null to remove. - `sqlQuery: optional string` The SQL query defining the report. ### Returns - `Report = object { id, createdAt, live, 5 more }` Represents a saved Report definition. - `id: string` Unique identifier for the report. - `createdAt: string` Timestamp when the report was created. - `live: boolean` Indicates if the report is associated with the live or test environment. - `object: "report"` Always `report`. - `"report"` - `sqlQuery: string` The SQL query defining the report. - `updatedAt: string` Timestamp when the report was last updated. - `description: optional string` An optional user-friendly description for the report. - `metadata: optional map[string]` Optional key-value metadata associated with the report. ### Example ```http curl https://api.postgrid.com/print-mail/v1/reports/$ID \ -H 'Content-Type: application/json' \ -H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" \ -d '{}' ``` #### Response ```json { "id": "report_123", "object": "report", "live": false, "sqlQuery": "SELECT id, status FROM orders WHERE created_at > ?", "description": "Recent Orders", "metadata": { "team": "Sales" }, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ```