Update Report Template
(v2)PUT
Updates a report template and returns it. Only the fields you send are changed, and templateSections replaces the whole list. Set enabled to false to pause generation, or send cadence fields to retime it.
curl -X PUT "https://api.confident-ai.com/v2/report-templates/{reportTemplateId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Production Health",
"description": "How did production do this week compared with the week before?",
"templateSections": [
{
"id": "<REPORT-TEMPLATE-SECTION-ID>",
"type": "CONTENT",
"heading": "What'\''s Failing",
"useAI": true,
"prompt": "Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
"content": {
"text": "Generated daily for the platform team.",
"severity": "INFO"
},
"startOnNewPage": false
}
],
"enabled": false,
"recurrence": "ONCE",
"repeatEvery": 1,
"repeatUnit": "MINUTE",
"startAt": "2025-02-01T09:00:00Z",
"maxRuns": 12,
"endAt": "2025-12-31T23:59:59Z"
}'{
"success": true,
"data": {
"id": "<REPORT-TEMPLATE-ID>",
"name": "Weekly Health Check",
"description": "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity.",
"type": "RISK_ASSESSMENT_REPORT",
"enabled": true,
"createdAt": "2025-01-01T00:00:00.000Z",
"schedule": {
"recurrence": "ONCE",
"repeatEvery": 1,
"repeatUnit": "MINUTE",
"startAt": "2025-01-08T09:00:00.000Z",
"maxRuns": 12,
"endAt": null,
"runCount": 3,
"lastRunAt": "2025-01-22T09:00:00.000Z"
},
"templateSections": [
{
"id": "<REPORT-TEMPLATE-SECTION-ID>",
"type": "CONTENT",
"heading": "What's Failing",
"order": 0,
"useAI": true,
"prompt": "Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
"content": {
"text": "Generated daily for the platform team.",
"severity": "INFO"
},
"startOnNewPage": false
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
reportTemplateIdstringRequiredThe id of the report template.
Request body
namestringThe template's new name, also used as the report's title.
descriptionstring | nullThe question the report should answer, which drives what data the generator retrieves. Send
nullto clear it.templateSectionslist of objectsThe report's exact sections, in render order. The list replaces the template's current sections, so a section you leave out is removed; omit the field to leave them alone.
Show 7 propertiesHide 7 properties
idstringThe id of the section. Send the id a section was read back with to keep its creation time across a rewrite; omit it and Confident AI assigns one.
typeenumRequiredWhat a section renders as.
STAT_CARDS,TABLEandGRAPHmust be AI-authored;CONTENTandADMONITIONcan be either AI-authored or hardcoded.Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
useAIbooleanWhether the generator authors this section from
prompt. Defaults tofalse, which renderscontentverbatim instead.promptstring | nullRequired when
useAIistrue: a single directive for what this section must cover.contentobject | nullThe static content of a hardcoded (non-AI) template section. Null for AI-authored sections, which are written by the generator from their prompt.
Show 2 propertiesHide 2 properties
textstring | nullThe section's literal text, written verbatim into every generated report.
severityenum | nullThe callout style of an
ADMONITIONsection, from an informational note to a danger warning.Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to
false.
enabledbooleanWhether scheduled generation runs. False pauses it while keeping past reports readable. A schedule that has hit its
maxRunsorendAtcan only be re-enabled by a request that also raises or clears them.recurrenceenumHow often a schedule fires:
ONCEruns a single time atstartAt,INTERVALrepeats everyrepeatEveryrepeatUnits.Show 2 enum valuesHide 2 enum values
ONCEINTERVAL
repeatEveryinteger | nullHow many
repeatUnits apart the runs are, for anINTERVALschedule. Sendnullto clear it.repeatUnitenum | nullThe unit
repeatEverycounts for anINTERVALschedule.Show 5 enum valuesHide 5 enum values
MINUTEHOURDAYWEEKMONTH
startAtstring | nullWhen the schedule first runs, as an ISO 8601 datetime. Send
nullto start it immediately.maxRunsinteger | nullHow many times the schedule runs before it stops. Send
nullto let it run indefinitely.endAtstring | nullWhen the schedule stops running, as an ISO 8601 datetime. Send
nullto leave it open-ended.
Response
Update Report Template succeeded.
successbooleanIndicates if the request was successful.
dataobjectA recurring report definition, generated on the schedule you set — every 1 day unless you say otherwise.
Show 8 propertiesHide 8 properties
idstringThe id of the report template, generated by Confident AI.
namestringThe template's name, also used as the report's title.
descriptionstring | nullThe question the generated report answers, which drives what data the generator retrieves.
typeenum | nullThe kind of report a template generates. Templates you create over the API generate executive reports;
RISK_ASSESSMENT_REPORTbelongs to the reports Confident AI generates for a risk assessment.Show 2 enum valuesHide 2 enum values
RISK_ASSESSMENT_REPORTEXECUTIVE_REPORT
enabledbooleanWhether scheduled generation is running. A disabled template generates nothing.
createdAtstringWhen the report template was created.
scheduleobject | nullWhen a report template generates, and how far it has got: the cadence you set, plus the read-only progress against it.
Show 8 propertiesHide 8 properties
recurrenceenumHow often a schedule fires:
ONCEruns a single time atstartAt,INTERVALrepeats everyrepeatEveryrepeatUnits.Show 2 enum valuesHide 2 enum values
ONCEINTERVAL
repeatEveryinteger | nullHow many
repeatUnits pass between runs — the 2 in "every 2 weeks". Always set on anINTERVALschedule,nullon aONCEone.repeatUnitenum | nullThe unit
repeatEverycounts for anINTERVALschedule.Show 5 enum valuesHide 5 enum values
MINUTEHOURDAYWEEKMONTH
startAtstring | nullWhen the first run was scheduled for, or
nullwhen it started immediately.maxRunsinteger | nullThe number of generations after which the schedule stops, or
nullfor no cap.endAtstring | nullThe time after which the schedule stops, or
nullfor no end date.runCountintegerHow many reports this template has generated, counted against
maxRuns.lastRunAtstring | nullWhen the template last generated a report, or
nullwhen it never has.
templateSectionslist of objectsThe template's sections, in render order. Empty when the generator chooses the structure from
description.Show 8 propertiesHide 8 properties
idstringThe id of the template section.
typeenumWhat a section renders as.
STAT_CARDS,TABLEandGRAPHmust be AI-authored;CONTENTandADMONITIONcan be either AI-authored or hardcoded.Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstring | nullThe heading rendered above the section, or
nullwhen it has none.orderintegerThe section's position in the report, starting at 0.
useAIbooleanWhether the generator authors this section from
prompt.promptstring | nullThe directive handed to the generator for this section, or
nullwhen the section is hardcoded.contentobject | nullThe static content of a hardcoded (non-AI) template section. Null for AI-authored sections, which are written by the generator from their prompt.
Show 2 propertiesHide 2 properties
textstring | nullThe section's literal text, written verbatim into every generated report.
severityenum | nullThe callout style of an
ADMONITIONsection, from an informational note to a danger warning.Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
startOnNewPagebooleanWhether the section starts on a new page in the exported report.
deprecatedbooleanIndicates if this endpoint is deprecated.