Skip to main content
POST
Save a report definition

Authorizations

Authorization
string
header
required

Passport bearer token authentication for legacy admin sessions.

Headers

Idempotency-Key
string

Optional 8-128 URL-safe characters. Reuse the key only for an identical actor, operation and payload; incompatible or in-progress replays return 409.

Required string length: 8 - 128

Body

application/json

Request fields accepted by this operation. Omitted optional properties retain the behavior described above.

name
string
required

Validation: required|string|max:255.

Maximum string length: 255
Example:

"Follow up with trip participants"

module_id
integer
required

One of the module IDs returned by reports/meta.

Example:

1

hysform_id
any
required

Required source context ID. For donor sources this is a donor form; for recipient and sponsorship sources it is a program. Some modules support all.

sponsorships
any | null

Optional compatibility source discriminator.

type
enum<string> | null

Validation: nullable|string|in:view,report.

Available options:
view,
report,
null
Example:

"view"

fields
object[] | null

Field/operator/value filters validated against the chosen module, context and operator capabilities. filterGroups takes precedence over fields.

filterGroups
object[] | null

Field/operator/value filters validated against the chosen module, context and operator capabilities. filterGroups takes precedence over fields.

column_fields
string[] | null
column_order
string[] | null
date_range
object | null

Saved date preset and optional custom range; validated by the report date-range contract.

sort_key
string | null

Validation: nullable|string.

sort_order
enum<string> | null

Validation: nullable|string|in:asc,desc.

Available options:
asc,
desc,
null
Example:

"asc"

search_query
string | null

Validation: nullable|string|max:1000.

Maximum string length: 1000
snapshot
boolean | null

Validation: nullable|boolean.

Example:

false

Response

Save a report definition response.

message
string
Example:

"Saved successfully."

data
object