Create Custom Report
POST/api/v2/custom-reports
Create a new saved custom report.
reports:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Required fields:
name(string, max 255): Report namedomain(string, max 50): Domain category (e.g., sales, inventory)base_entity(string, max 100): Primary entity for the reportdefinition(object): Full report definition containing columns, filters, sorts, etc.
Optional fields:
description(string, max 1000): Report descriptionvisibility(string): "private" (default) or "shared"definition.version(integer): Schema version numberdefinition.domain(string): Domain within the definitiondefinition.filters(object): Filter tree with conjunction and childrendefinition.sorts(array): Sort rulesdefinition.limit(integer, 1-5000): Default row limit
Column requirements:
id(string, required): Unique column identifier (e.g., "entity.field")kind(string, required): "dimension" or "measure"entity(string, required): Entity the column belongs tofield(string, required): Field name on the entitylabel(string, optional): Display labelgranularity(string, optional): Time granularity for date dimensions (e.g., day, month, year)aggregation(string, optional): Aggregation function for measures (e.g., sum, count, avg)
Returns 201 with the created custom report object.
Request
Responses
- 200
- 401
- 403
- 422
- 429
Successful response
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.