Skip to content
View as Markdown

GET Contact Growth​

GET
/reports/subscribers

Retrieve subscriber growth statistics over a date range. Returns a date-keyed object where each key is a date (or month label) and the value is the count of new subscribed contacts on that date. The frequency (daily, weekly, monthly) is automatically determined by the length of the date range.

The response is chart-ready: data_sets holds one series per range, and each series' data is a map keyed by period label, not an array. A second series is appended only when compare_type is set to something other than no_comparison and resolves to a valid window.

Required capability: fcrm_view_dashboard

Enforced by ReportPolicy::verifyRequest(), the policy default for this route group.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Parameters​

Query Parameters

date_range

Date range as a two-element array [from, to] in YYYY-MM-DD format. Defaults to the last 30 days if omitted.

Type
array
Min Items
2
Max Items
2
tag_id

Restrict growth to contacts carrying this tag.

Type
integer
Default
0
list_id

Restrict growth to contacts on this list.

Type
integer
Default
0
compare_type

Adds a second comparison series. custom additionally requires compare_range; no_comparison and unrecognised values return a single series.

Type
string
Valid values
"no_comparison""previous_period""previous_month""previous_quarter""previous_year""custom"
compare_range[]

Explicit [from, to] comparison window. Used only when compare_type is custom, and ignored unless both entries are present.

Type
array

Responses​

Contact growth stats retrieved successfully.

application/json
JSON
{
"data_sets": [
{
"label": "string",
"data": {
"additionalProperties": 0
},
"range": [
"string"
],
"backgroundColor": "string",
"borderColor": "string",
"fill": true
}
],
"current_range": [
"string"
]
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI