Launch Week 02 wrapped — explore all five launches

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.

POST/v1/report-templates
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."
}'
200
{
  "success": true,
  "data": {
    "id": "REPORT-TEMPLATE-ID"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Request body

  • namestringRequired

    The template's name, also used as the report's title.

  • descriptionstring

    The 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 objects

    The report's exact sections, in render order. Omit to let the generator choose the structure from the description.

    Show 7 propertiesHide 7 properties
    • idstring

      An optional client-supplied id. Assigned automatically when omitted.

    • typeenumRequired

      What this section renders as.

      Show 5 enum valuesHide 5 enum values
      • CONTENT
      • STAT_CARDS
      • TABLE
      • GRAPH
      • ADMONITION
    • headingstring

      The heading rendered above the section. Omit for an unheaded section.

    • useAIboolean

      Whether the generator authors this section from prompt. Defaults to false.

    • promptstring

      Required when useAI is true — a single directive for what this section must cover.

    • contentobject

      The static content of a hardcoded (non-AI) template section. Null for AI-authored sections.

      Show 2 propertiesHide 2 properties
      • textstring

        The section's literal text, written verbatim into every generated report.

      • severityenum

        ADMONITION sections only. Defaults to INFO.

        Show 4 enum valuesHide 4 enum values
        • INFO
        • SUCCESS
        • WARNING
        • DANGER
    • startOnNewPageboolean

      Whether the section starts on a new page in the exported report. Defaults to false.

  • enabledboolean

    Whether to start generating on the schedule. Defaults to true; pass false to create the template without scheduling it.

  • recurrenceenum

    INTERVAL repeats on the repeatEvery/repeatUnit cadence, ONCE generates a single report. Defaults to INTERVAL.

    Show 2 enum valuesHide 2 enum values
    • INTERVAL
    • ONCE
  • repeatEveryinteger

    How many repeatUnits between runs. Required with repeatUnit for an INTERVAL schedule; defaults to 1.

  • repeatUnitenum

    The unit repeatEvery counts in. Required with repeatEvery for an INTERVAL schedule; defaults to DAY.

    Show 5 enum valuesHide 5 enum values
    • MINUTE
    • HOUR
    • DAY
    • WEEK
    • MONTH
  • startAtstring

    When to first generate. Omit to start immediately.

  • maxRunsinteger

    Stop after this many generations. Omit for no cap.

  • endAtstring

    Stop generating after this time. Omit for no end date.

Response

The id of the created report template.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The id of the affected report template.

    Show 1 propertyHide 1 property
    • idstring

      The id of the affected report template.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI