APG PayAPG Paydocs

Reporting

Create report notebooks

POST/report-notebooks

Save a notebook, or a copy of one. Saving in a shared space needs Reports_Manage as well.

2 actionsRnbkCmdCopyRnbkCmdCreate

Permissions

Required permission
reports:query

Requires the `query` action on `reports` for the supplied runtime context

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "RnbkCmdCopy"
copyOfRnbkIdrequired

The notebook to copy.

Example rnbk_9f2Kd8QpLzXw

reportSpaceIdRspcId

Where to save the copy. Absent for the original's space, or for the caller's default space when the original is in the System space.

Example rspc_9f2Kd8QpLzXw

titlestring

Absent for the original's title with (copy) after it.

curl -X POST https://api.tst.au.apgpay.dev/report-notebooks \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "RnbkCmdCopy",
  "copyOf": "rnbk_9f2Kd8QpLzXw",
  "reportSpaceId": "rspc_9f2Kd8QpLzXw",
  "title": "string"
}'

Responses

The response is a tagged shape: type is always "RnbkCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "RnbkCreateRspAttributes"

The resource that was created.

Example
{
  "type": "RnbkCreateRspAttributes",
  "created": {
    "type": "RnbkViewAttributes",
    "reportNotebookId": "rnbk_9f2Kd8QpLzXw",
    "reportSpaceId": "rspc_9f2Kd8QpLzXw",
    "title": "string",
    "cells": [
      {
        "type": "RnbkCellHidden",
        "cellId": "string"
      }
    ],
    "access": "Private",
    "tenant": {
      "type": "RspcTenantEnterprise",
      "enterpriseId": "ent_9f2Kd8QpLzXw"
    },
    "ownedByCaller": true,
    "editable": true,
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses