Skip to main content
PATCH
/
api
/
public
/
v1
/
reports
/
{id}
Update report
curl --request PATCH \
  --url https://app.msportal.ai/api/public/v1/reports/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "reportTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dateStart": "<string>",
  "dateEnd": "<string>",
  "reportStructure": {
    "blocks": [
      {
        "id": "<string>",
        "type": "<string>",
        "params": {},
        "layout": {
          "x": 1,
          "y": 1,
          "w": 2,
          "h": 2
        }
      }
    ],
    "metadata": {
      "title": "<string>",
      "subtitle": "<string>",
      "showHeader": true,
      "showFooter": true,
      "showPageNumbers": true
    },
    "pagePreset": "<string>",
    "displaySettings": {
      "pageSize": "<string>",
      "orientation": "<string>",
      "margins": {}
    }
  },
  "status": "draft",
  "isShared": true
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "description": "<string>",
    "status": "draft",
    "isShared": true,
    "version": 123,
    "coverImageUrl": "<string>",
    "dateStart": "<string>",
    "dateEnd": "<string>",
    "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "companyName": "<string>",
    "reportTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "reportTypeName": "<string>",
    "reportTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "authorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Path Parameters

id
string<uuid>
required

Report ID

Body

application/json
title
string

Report title

Required string length: 1 - 500
description
string | null

Report description (null to clear)

Maximum string length: 2000
companyId
string<uuid> | null

Company ID (null to clear)

reportTypeId
string<uuid> | null

Report type ID (null to clear)

dateStart
string | null

Report date range start (null to clear)

dateEnd
string | null

Report date range end (null to clear)

reportStructure
object

Report content structure

status
enum<string>

Report status

Available options:
draft,
published
isShared
boolean

Whether report is shared

Response

Report updated successfully

data
object
required