PUT
/reports/custom/{savedReport} Update a saved custom report
Carries the lock_version it read: if the report was saved since, it is a 409 whose meta.current is the report as it now stands. Only the API key that created a report updates it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
savedReportrequired | path | string uuid |
Request bodyrequired
| Field | Type | Description |
|---|---|---|
namerequired | string max length: 120 | |
definitionrequired | object | |
lock_versionrequired | integer min: 1 |
Responses
200Saved
{
"success": true,
"data": {
"id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
"name": "Card payments over 100 last month",
"definition": {},
"lock_version": 0,
"created_by": null,
"updated_by": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
} 403Not the key that created it
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 404Not this ledger's, or unknown
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 409Saved by someone else since lock_version; meta.current is the report now
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 422A name in use, or a definition outside the rules or naming something not the ledger's
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} Examples
curl -X PUT https://ledga.io/api/v1/reports/custom/{savedReport} \
-H "Authorization: Bearer sk_xxxxxxxx_your_secret" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"definition": {},
"lock_version": 0
}'