Create report spaces
/report-spacesSave a space, or with RspcCmdDefault find or make the caller's default space. A shared one needs Reports_Manage as well.
RspcCmdCreateRspcCmdDefaultPermissions
reports:queryRequires 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.
typetype = "RspcCmdCreate"namestringrequiredExample Ada Lovelace
accessRspcAccessrequiredPrivate for the caller alone, or Shared for its tenant, which needs Reports_Manage.
PrivateSharedSystemUnknownparentReportSpaceIdRspcIdThe space to put it in, which must be the caller's to change and of the same access. Absent for the top.
Example rspc_9f2Kd8QpLzXw
curl -X POST https://api.tst.au.apgpay.dev/report-spaces \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "RspcCmdCreate",
"name": "Ada Lovelace",
"access": "Private",
"parentReportSpaceId": "rspc_9f2Kd8QpLzXw"
}'Responses
The response is a tagged shape: type is always "RspcCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.
typetype = "RspcCreateRspAttributes"The resource that was created.
typeenumrequiredRspcViewAttributesreportSpaceIdRspcIdrequiredIdentifier of a report space.
Example rspc_9f2Kd8QpLzXw
namestringrequiredExample Ada Lovelace
accessRspcAccessrequiredPrivateSharedSystemUnknownparentReportSpaceIdRspcIdThe space this one sits in, of the same tenant and access. Absent at the top.
Example rspc_9f2Kd8QpLzXw
typeThe tenant an item was saved under: the platform, or the enterprise, marketplace or merchant its saver signed in as.
enterpriseIdEntIdrequiredIdentifier of an enterprise.
Example ent_9f2Kd8QpLzXw
The tenant an item was saved under: the platform, or the enterprise, marketplace or merchant its saver signed in as.
marketplaceIdMktpIdrequiredIdentifier of a marketplace.
Example mktp_9f2Kd8QpLzXw
The tenant an item was saved under: the platform, or the enterprise, marketplace or merchant its saver signed in as.
merchantIdMchtIdrequiredIdentifier of a merchant.
Example mcht_9f2Kd8QpLzXw
The platform, which no enterprise, marketplace or merchant bounds.
The platform, which no enterprise, marketplace or merchant bounds.
ownedByCallerbooleanrequiredWhether the caller saved it.
Example true
editablebooleanrequiredWhether the caller may rename, move or delete it, and save or change what it holds.
Example true
isDefaultbooleanrequiredWhether it is its owner's default space, My reports until renamed: private, at the top, one per person per tenant. RspcCmdDefault finds it, and a private space deleted at the top hands what it held to it.
Example true
createdAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
updatedAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
iconstringThe picture a client shows beside a System section's heading: acquiring, lending or platform. Absent for any other space.
{
"type": "RspcCreateRspAttributes",
"created": {
"type": "RspcViewAttributes",
"reportSpaceId": "rspc_9f2Kd8QpLzXw",
"name": "Ada Lovelace",
"access": "Private",
"parentReportSpaceId": "rspc_9f2Kd8QpLzXw",
"tenant": {
"type": "RspcTenantEnterprise",
"enterpriseId": "ent_9f2Kd8QpLzXw"
},
"ownedByCaller": true,
"editable": true,
"isDefault": true,
"createdAt": "2026-08-19T04:21:07Z",
"updatedAt": "2026-08-19T04:21:07Z",
"icon": "string"
}
}Error responses
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}