> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/reports/publish-report.md).

# Publish Report

Publish a report (IN\_REVIEW -> PUBLISHED). A no-op if already PUBLISHED.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"ReportResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"blocks":{"items":{"oneOf":[{"$ref":"#/components/schemas/HeaderBlock"},{"$ref":"#/components/schemas/MarkdownBlock"},{"$ref":"#/components/schemas/DataTableBlock"},{"$ref":"#/components/schemas/MetricBlock"},{"$ref":"#/components/schemas/BarChartBlock"},{"$ref":"#/components/schemas/PieChartBlock"},{"$ref":"#/components/schemas/LineChartBlock"},{"$ref":"#/components/schemas/ActionItemsBlock"},{"$ref":"#/components/schemas/ColumnsBlock"},{"$ref":"#/components/schemas/ImageBlock"}],"discriminator":{"propertyName":"type","mapping":{"action_items":"#/components/schemas/ActionItemsBlock","bar_chart":"#/components/schemas/BarChartBlock","columns":"#/components/schemas/ColumnsBlock","data_table":"#/components/schemas/DataTableBlock","header":"#/components/schemas/HeaderBlock","image":"#/components/schemas/ImageBlock","line_chart":"#/components/schemas/LineChartBlock","markdown":"#/components/schemas/MarkdownBlock","metric":"#/components/schemas/MetricBlock","pie_chart":"#/components/schemas/PieChartBlock"}}},"type":"array","title":"Blocks"},"status":{"$ref":"#/components/schemas/ReportStatus"},"owner_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Id"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id"},"execution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","organisation_id","title","summary","blocks","status","owner_id","agent_id","execution_id","created_by","updated_by","created_at","updated_at"],"title":"ReportResponseSchema","description":"Response schema for a single report."},"HeaderBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"header","title":"Type"},"level":{"type":"integer","maximum":6,"minimum":1,"title":"Level","default":1},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","text"],"title":"HeaderBlock"},"MarkdownBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"markdown","title":"Type"},"content":{"type":"string","minLength":1,"title":"Content"}},"type":"object","required":["type","content"],"title":"MarkdownBlock"},"DataTableBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"data_table","title":"Type"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"data":{"items":{"items":{},"type":"array"},"type":"array","title":"Data"}},"type":"object","required":["type","columns","data"],"title":"DataTableBlock"},"MetricBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"metric","title":"Type"},"name":{"type":"string","title":"Name"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit","default":""},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["type","name","value"],"title":"MetricBlock"},"BarChartBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"bar_chart","title":"Type"},"title":{"type":"string","title":"Title"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"data":{"items":{"type":"number"},"type":"array","title":"Data"}},"type":"object","required":["type","title","labels","data"],"title":"BarChartBlock"},"PieChartBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"pie_chart","title":"Type"},"title":{"type":"string","title":"Title"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"data":{"items":{"type":"number"},"type":"array","title":"Data"}},"type":"object","required":["type","title","labels","data"],"title":"PieChartBlock"},"LineChartBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"line_chart","title":"Type"},"title":{"type":"string","title":"Title","description":"Chart title, e.g. 'Monthly Active Users'"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"Series names displayed in the legend — one entry per line on the chart. Example: ['Revenue'] for a single-line chart, ['Revenue', 'Costs'] for two lines. Do NOT put x-axis tick labels (dates, periods) here; those belong in data[i].x."},"data":{"items":{"items":{"$ref":"#/components/schemas/LineChartDataPoint"},"type":"array"},"type":"array","title":"Data","description":"One inner list per series; must have the same length as `labels`. Each element is an (x, y) point where x is the x-axis tick label (e.g. 'Jan 2024', 'Q1') and y is the numeric value."}},"type":"object","required":["type","title","labels","data"],"title":"LineChartBlock","description":"Line chart with one or more series.\n\n`labels` holds the SERIES NAMES shown in the legend (e.g. [\"Revenue\", \"Costs\"]),\nNOT the x-axis tick labels. X-axis values come from the `x` field of each data\npoint. For a single-line chart, `labels` has exactly one entry and `data` has\nexactly one inner list."},"LineChartDataPoint":{"properties":{"x":{"anyOf":[{"type":"string"},{"type":"number"}],"title":"X","description":"X-axis value, typically a date string or numeric index"},"y":{"type":"number","title":"Y","description":"Y-axis value"}},"type":"object","required":["x","y"],"title":"LineChartDataPoint"},"ActionItemsBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"action_items","title":"Type"},"actions":{"items":{"$ref":"#/components/schemas/ActionItem"},"type":"array","title":"Actions"}},"type":"object","required":["type","actions"],"title":"ActionItemsBlock"},"ActionItem":{"properties":{"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status"},"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee","description":"User ID of the assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["label","status"],"title":"ActionItem"},"ColumnsBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"columns","title":"Type"},"columns":{"type":"integer","maximum":12,"minimum":2,"title":"Columns","description":"Number of columns"},"weights":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Weights","description":"Optional proportional width per column as positive integers (e.g. [2, 1] for 2:1 ratio, [1, 1] for equal columns). Must have the same length as columns. Must be integers — do NOT use floats like [0.5, 0.5]."},"blocks":{"items":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/HeaderBlock"},{"$ref":"#/components/schemas/MarkdownBlock"},{"$ref":"#/components/schemas/DataTableBlock"},{"$ref":"#/components/schemas/MetricBlock"},{"$ref":"#/components/schemas/BarChartBlock"},{"$ref":"#/components/schemas/PieChartBlock"},{"$ref":"#/components/schemas/LineChartBlock"},{"$ref":"#/components/schemas/ActionItemsBlock"},{"$ref":"#/components/schemas/ColumnsBlock"},{"$ref":"#/components/schemas/ImageBlock"}],"discriminator":{"propertyName":"type","mapping":{"action_items":"#/components/schemas/ActionItemsBlock","bar_chart":"#/components/schemas/BarChartBlock","columns":"#/components/schemas/ColumnsBlock","data_table":"#/components/schemas/DataTableBlock","header":"#/components/schemas/HeaderBlock","image":"#/components/schemas/ImageBlock","line_chart":"#/components/schemas/LineChartBlock","markdown":"#/components/schemas/MarkdownBlock","metric":"#/components/schemas/MetricBlock","pie_chart":"#/components/schemas/PieChartBlock"}}},"type":"array"},{"oneOf":[{"$ref":"#/components/schemas/HeaderBlock"},{"$ref":"#/components/schemas/MarkdownBlock"},{"$ref":"#/components/schemas/DataTableBlock"},{"$ref":"#/components/schemas/MetricBlock"},{"$ref":"#/components/schemas/BarChartBlock"},{"$ref":"#/components/schemas/PieChartBlock"},{"$ref":"#/components/schemas/LineChartBlock"},{"$ref":"#/components/schemas/ActionItemsBlock"},{"$ref":"#/components/schemas/ColumnsBlock"},{"$ref":"#/components/schemas/ImageBlock"}],"discriminator":{"propertyName":"type","mapping":{"action_items":"#/components/schemas/ActionItemsBlock","bar_chart":"#/components/schemas/BarChartBlock","columns":"#/components/schemas/ColumnsBlock","data_table":"#/components/schemas/DataTableBlock","header":"#/components/schemas/HeaderBlock","image":"#/components/schemas/ImageBlock","line_chart":"#/components/schemas/LineChartBlock","markdown":"#/components/schemas/MarkdownBlock","metric":"#/components/schemas/MetricBlock","pie_chart":"#/components/schemas/PieChartBlock"}}}]},"type":"array","title":"Blocks","description":"One item per column, in column order. Each item is either a single block or a list of blocks for that column."}},"type":"object","required":["type","columns","blocks"],"title":"ColumnsBlock"},"ImageBlock":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"image","title":"Type"},"url":{"type":"string","title":"Url"},"size":{"type":"string","enum":["sm","md","lg","full"],"title":"Size","description":"Display size of the image: sm, md, lg, or full (full container width).","default":"md"}},"type":"object","required":["type","url"],"title":"ImageBlock"},"ReportStatus":{"type":"string","enum":["DRAFT","IN_REVIEW","PUBLISHED"],"title":"ReportStatus","description":"Enum representing the status of a report.\n\nState machine with four operations:\n- submit_for_review: DRAFT -> IN_REVIEW\n- publish: IN_REVIEW -> PUBLISHED\n- unpublish: PUBLISHED -> IN_REVIEW\n- return_to_draft: IN_REVIEW -> DRAFT, or PUBLISHED -> DRAFT\n\nStatus flow: DRAFT <-> IN_REVIEW <-> PUBLISHED, with a direct\nPUBLISHED -> DRAFT shortcut via return_to_draft.\n\n- DRAFT: Report is being authored and not yet submitted for review\n- IN_REVIEW: Report is under review before publication\n- PUBLISHED: Report is published"}}},"paths":{"/api/v1/reports/{report_id}/publish":{"post":{"tags":["reports","public"],"summary":"Publish Report","description":"Publish a report (IN_REVIEW -> PUBLISHED). A no-op if already PUBLISHED.","operationId":"reports-publish_report","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
