CLIENT API / V1 GOOGLE ANALYTICS 4

Prepare an exact interval stored GA4 report

POST/sites/{site_id}/ga4/store/reports/{report_type}analytics:read, analytics:prepare

Requires analytics:read and site access. JSON accepts window (preset or start/end object), limit, offset and optional report_set_id. Preparation queues missing data; it never calls Google inline. Repeating a request reuses durable work. Retain report_set_id for stable pagination.

RequestPOST https://satelliteai.io/api/v1/sites/{site_id}/ga4/store/reports/{report_type}
Permissionanalytics:read, analytics:prepare
ResponseA single object: data is object.
Operation IDprepareGa4StoredReport

More context and worked examples are in the developer guide.

Example request

cURL · Bash
curl --fail-with-body --request POST \
  'https://satelliteai.io/api/v1/sites/123/ga4/store/reports/sessions_over_time' \
  -H 'Content-Type: application/json' \
  --data '{"window":{"start":"2026-01-01","end":"2026-10-25"},"limit":100,"offset":0}' \
  -H "Authorization: Bearer $SATELLITE_API_KEY"

Replace the example IDs with values returned by the discovery endpoints. Example values are placeholders, not real records.

Parameters

NameInTypeDescription
site_idrequiredpathinteger
report_typerequiredpathstring

Unknown or repeated query parameters return 400.

JSON request body

Send Content-Type: application/json. The request body is required. Fields below describe the request; response fields follow separately.

JSON request fields
FieldTypeDescription
windowstring | object
window.startstring (date)required
window.endstring (date)required
limitintegerMaximum records per page applied to this request.
default 100 · min 1 · max 500
offsetinteger
default 0 · min 0 · max 100000
report_set_idinteger
min 1

Data dictionary

Published report is ready

202: Preparation pending; retry the same request

[] marks an array element. nullable means the value can be null; treat it as unknown, not zero. always present means the key is always included in the object.

Fields in data
FieldTypeDescription
data.columnsarray of string
data.rowsarray of array of any
data.metadataobject
data.metadata.sourcestring
one of: stored
data.metadata.statestring
one of: ready, pending, partial, unsupported, empty_period
data.metadata.report_set_idintegernullable
data.metadata.binding_idinteger
data.metadata.startstring (date)
data.metadata.endstring (date)
data.metadata.timezonestring
data.metadata.qualityarray of object
data.metadata.next_offsetintegernullable
data.metadata.total_rowsinteger

Response metadata

Fields in meta
FieldTypeDescription
meta.request_idstringalways presentRequest identifier; also returned in X-Request-ID. Include it in support requests.
meta.api_versionstringalways presentAPI version that produced the response.
one of: v1
meta.limitintegerMaximum records per page applied to this request.
min 1 · max 100
meta.has_morebooleanTrue when another page is available.
meta.next_cursorstringnullableOpaque cursor for the next page; send as cursor. Null on the last page.
meta.availabilitystringavailable when stored data exists; not_available when it does not.
one of: available, not_available
meta.billingobjectPresent for paid live SERP requests; replayed receipts describe the original debit, not an additional charge.
meta.billing.operationstringalways present
one of: client_api_serp_refresh
meta.billing.credits_chargedintegeralways present
min 0
meta.billing.transaction_idintegeralways present
meta.billing.replayedbooleanalways present

Error responses

Errors return {"error": {"code", "message", "request_id"}}. See error handling for retry guidance.

HTTPWhen
503Store disabled or unavailable