Create Report Template
POSThttps://api.confident-ai.com/v1/report-templates
Creates a report template. The description is the question the report answers; supply templateSections to fix its structure, and a cadence to control when it generates. Without one it repeats every 1 day.
curl -X POST "https://api.confident-ai.com/v1/report-templates" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Health Check",
"description": "Give me an overall health check for the last week: request volume, error rate, latency (average and p99), total cost, top models, and user activity."
}'{
"success": true,
"data": {
"id": "REPORT-TEMPLATE-ID"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
namestringRequiredThe template's name, also used as the report's title.
descriptionstringThe question the report should answer, written as a question. Supply this even when providing sections — it drives the single data retrieval that serves them all.
templateSectionslist of objectsThe report's exact sections, in render order. Omit to let the generator choose the structure from the description.
Show 7 propertiesHide 7 properties
idstringAn optional client-supplied id. Assigned automatically when omitted.
typeenumRequiredWhat this section renders as.
Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstringThe heading rendered above the section. Omit for an unheaded section.
useAIbooleanWhether the generator authors this section from
prompt. Defaults to false.promptstringRequired when
useAIis true — a single directive for what this section must cover.contentobjectThe static content of a hardcoded (non-AI) template section. Null for AI-authored sections.
Show 2 propertiesHide 2 properties
textstringThe section's literal text, written verbatim into every generated report.
severityenumADMONITION sections only. Defaults to INFO.
Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
enabledbooleanWhether to start generating on the schedule. Defaults to
true; passfalseto create the template without scheduling it.recurrenceenumINTERVALrepeats on therepeatEvery/repeatUnitcadence,ONCEgenerates a single report. Defaults toINTERVAL.Show 2 enum valuesHide 2 enum values
INTERVALONCE
repeatEveryintegerHow many
repeatUnits between runs. Required withrepeatUnitfor anINTERVALschedule; defaults to1.repeatUnitenumThe unit
repeatEverycounts in. Required withrepeatEveryfor anINTERVALschedule; defaults toDAY.Show 5 enum valuesHide 5 enum values
MINUTEHOURDAYWEEKMONTH
startAtstringWhen to first generate. Omit to start immediately.
maxRunsintegerStop after this many generations. Omit for no cap.
endAtstringStop generating after this time. Omit for no end date.
Response
The id of the created report template.
successbooleanIndicates if the request was successful.
dataobjectThe id of the affected report template.
Show 1 propertyHide 1 property
idstringThe id of the affected report template.
deprecatedbooleanIndicates if this endpoint is deprecated.