Reference
Errors
Every public error code, what it means, and whether retrying will help.
One envelope, everywhere:
{ "error": { "code": "data_not_ready", "message": "No complete data has been published for this window." } }Match on code. Messages are fixed strings chosen per code and may be reworded;
they never carry SQL, provider text, ciphertext or reflected header values, so they
will not tell you more than the code does.
data_not_ready and data_incomplete add missingDates. The 409 timezone_conflict and
attribution_conflict responses have only code and message. A 400 the query validator
raised adds detail, and one refusal adds suggestedDimensionSets; see Query.
Quote the request id when you ask for help. Responses the gateway produces, success or error,
carry an X-Request-Id header holding a UUID the gateway generated for that request. A query
result repeats it as requestId in its body, and an MCP query tool result carries it the
same way. A value you send in X-Request-Id is ignored, not echoed.
Authentication and transport (REST)
Section titled “Authentication and transport (REST)”| Status | Code | Meaning | Retry |
|---|---|---|---|
| 401 | unauthorized | Missing, unknown, expired or revoked key — including revoked during the request. | Not with the same key. |
| 403 | forbidden | Valid key, but wrong scope, a workspaceId that is not the key’s, or a workspace with no plan at all. With no plan, every request with the key is refused, reads included. | No. |
| 404 | not_found | No such route — and the deliberately opaque /health route with a query delimiter (including bare ?) or a non-GET method. | No. |
| 405 | method_not_allowed | Wrong method. Applies to the /v1 routes, where it is checked before the key, and to /mcp, where it is checked after the key: a non-POST request to /mcp with a missing or invalid key is 401. Allow names the right one. | No. |
| 413 | request_too_large | REST bodies cap at 4 KiB, MCP at 16 KiB. | No — send less. |
| 415 | unsupported_media_type / unsupported_encoding | Body must be application/json, Content-Encoding: identity. MCP returns json_required for both. | No. |
| 400 | invalid_json | The body is absent, not valid JSON, or not valid UTF-8. MCP returns invalid_request instead. | No. |
| 400 | invalid_query | A URL query delimiter (including bare ?) was present on an original /v1 route or /mcp; pilot routes use invalid_request. | No. |
| 429 | rate_limited | The plan’s request allowance for this workspace or key is used up for the current minute. Retry-After gives the seconds to wait. See Rate limits. | Yes, after Retry-After. |
| 503 | auth_unavailable | The authorization store could not be reached. Applies to the original REST and MCP routes; pilot routes return automation_unavailable. | Yes, with backoff. |
| Status | Code | Meaning | Retry |
|---|---|---|---|
| 400 | invalid_query | Unsupported body: unknown field, malformed date, a window outside the profile’s bounds, a metric, dimension or filter the profile does not offer, a limit outside 1–10,000, a workspaceId (the workspace is the key’s, never the body’s), or a body with no profile, which is what the removed legacy GA4 body is. Nothing is read. | No. |
| 403 | forbidden | On /v1/query, the key lacks query:read. On /v1/query/ads, the body’s workspace is not the key’s. On either, the key’s workspace has no plan at all. | No. |
| 403 | history_not_entitled | The window starts before the first day of the oldest month your plan includes. On the query routes (/v1/query, /v1/query/ads, /v1/query/search-console) the error carries earliestDate (YYYY-MM-01), absent for a custom allowance. Nothing is read and the window is never clamped. | Narrow the window to start on or after earliestDate, or change plan. |
| 404 | connection_unavailable | No active connection for this workspace, connection and property — or it was disconnected mid-read. | Only after reconnecting. |
| 409 | data_not_ready | Nothing in the window is published. missingDates lists the window. | After a successful sync. |
| 409 | data_incomplete | Some days are published, some are not. missingDates names them. | Narrow the window, or sync and retry. |
| 409 | timezone_conflict | Published dates use different property timezones. Over several sources summed by date, the accounts are in different time zones. No analytics read occurs. | Re-sync every requested date using the property’s current timezone. Over several sources, the message says “The summed accounts publish in different time zones. Group by account.”: group by account. |
| 409 | attribution_conflict | The published data of the window was attributed under more than one provider setting (the pinned report heads carry two attribution fingerprints). Raised after the connection check and the publication pin, before any analytics read. | Narrow the window to dates published under one setting. |
| 422 | cross_provider_query_unsupported | On /v1/query/ads, the accounts belong to more than one ad provider (connectors names them). One query reads one provider. | No. Send one query per provider. |
| 503 | query_unavailable | A backend is unreachable, or a stored row failed an integrity check. | Yes, with backoff. |
A 400 the query validator raised (invalid_query, non_additive_metric, window_too_large,
cursor_invalid) also carries detail, one member of a closed vocabulary that names the rule that
refused the request (unknown_metric, unknown_dimension_set, distinct_dimension_set,
snapshot_over_time, mixed_attribution and the rest of the list in the OpenAPI document), and a
distinct_dimension_set refusal carries suggestedDimensionSets, the dimension sets the metric is
readable at. Neither repeats anything you sent.
Connections
Section titled “Connections”GET /v1/connections and GET /v1/connections/{connectionId} (see
Reading data). Authentication, scope, method and rate-limit
refusals are as in Authentication and transport.
| Status | Code | Meaning | Retry |
|---|---|---|---|
| 400 | invalid_query | A URL query delimiter was present. Neither route reads a query parameter. | No. |
| 404 | connection_not_found | On the single read: no connection of the key’s workspace has this id. A connection of another workspace, a revoked one and an id that never existed are the same answer. | No. |
| 404 | not_found | On the single read: the id is longer than 128 characters or has a character outside A-Z, a-z, 0-9, _ and -, so the path matches no route. | No. |
| 413 | result_too_large | The workspace has more than 500 selected accounts. Nothing is returned, never a cut list. | No. |
| 503 | query_unavailable | The connections could not be read. | Yes, with backoff. |
| 503 | auth_unavailable | The authorization store could not be reached. | Yes, with backoff. |
Export create and status
Section titled “Export create and status”These codes are answered by POST /v1/query/export and GET /v1/exports/{exportId}; see Exports.
Create takes the query validator’s codes from Query in the export’s own vocabulary, and a query-layer
failure the export vocabulary does not list is 503 export_unavailable.
| Status | Code | Meaning | Retry |
|---|---|---|---|
| 400 | invalid_json | The body is absent, not valid JSON, or not valid UTF-8. | No. |
| 400 | invalid_query | The query is not supported by POST /v1/query, or a URL query delimiter was present (the status route reads no query parameters). | No. |
| 400 | invalid_export_request | The file options are not supported: an unknown field, a format other than csv, or a csv.bom that is not a boolean. | No. |
| 400 | invalid_idempotency_key | The Idempotency-Key, when sent, is not 8–128 characters from A-Za-z0-9._:-. | No. |
| 403 | forbidden | The key lacks query:read, the profile is not served for this workspace, or the workspace has no entitlement to export. | No. |
| 404 | connection_unavailable | No connection of this workspace, or it is not available to query. A connection of another workspace is the same answer. | Only after reconnecting. |
| 404 | export_not_found | No such export in the key’s workspace (status route). | No. |
| 409 | data_not_ready / data_incomplete | As on the query route: nothing, or only some days, of the window are published. missingDates names them (at most 31; missingDatesTruncated is true when there are more). | After a successful sync. |
| 409 | timezone_conflict | Published dates use different source timezones, or several sources summed by date are in different time zones. | Re-sync, as for a query; for several sources, group by account. |
| 409 | currency_conflict | A money metric over several sources summed by date spans more than one currency. | No. Group by account. |
| 409 | idempotency_conflict | The Idempotency-Key was used for a different request. | No. Use a new key. |
| 409 | export_limit_reached | The workspace already has one export running and three waiting. | Yes, once one finishes. |
| 413 | request_too_large | The request body is over 4 KiB. | No. |
| 415 | unsupported_media_type / unsupported_encoding | The body must be application/json with Content-Encoding: identity. | No. |
| 429 | rate_limited | The workspace’s or the key’s export creations for the minute are used up. See Rate limits. | Yes, after Retry-After. |
| 503 | export_unavailable | The export could not be planned or read. | Yes, with backoff. |
The contract also lists workspace_paused, field_not_enabled and history_not_entitled for create. This
version returns none of them: a pause for a trial or subscription does not stop an export, and an operator’s
pause is refused at authentication as 401.
An export that is accepted and then fails shows the reason in the status as errorCode, not as an HTTP
error: export_too_large, data_superseded, query_unavailable, export_unavailable, forbidden or
export_integrity_failed. See Exports.
Export files and links
Section titled “Export files and links”These codes are answered by GET /v1/exports/{exportId}/file, the export link routes
(POST and DELETE /v1/exports/{exportId}/links) and GET /v1/export-links/{token}.
| Status | Code | Meaning | Retry |
|---|---|---|---|
| 400 | invalid_query | A URL query delimiter was present on a key route. On the link download a query delimiter is 404 link_not_found, so a token is never read from a query string. | No. |
| 400 | invalid_json | A link request body that is present and is not valid JSON or not valid UTF-8. | No. |
| 400 | invalid_export_request | A link request body with an unknown field or a ttlSeconds that is not a whole number of seconds inside the allowed range. | No. |
| 403 | forbidden | The key lacks query:read, or the workspace has no entitlement to download exports. | No. |
| 404 | export_not_found | No such export in the key’s workspace. An export of another workspace is the same answer. | No. |
| 404 | link_not_found | The link is unknown, expired or revoked, its issuing key was revoked or expired, or the export is no longer reachable through it. Every one of these is the same answer. | No. Ask the key holder for a new link. |
| 409 | export_not_ready | The export has no file yet: it is still queued or running, or it failed. | Poll the export’s status until it is succeeded. |
| 410 | export_expired | On the file route: the file has passed its retention period, the export was erased, or its connection was changed. A deleted connection (for Shopify and Google Ads, also a disconnected one) stops its exports for good; a Shopify store whose SignalBraid app was uninstalled or whose access was revoked stops them until the app is installed again; a connection set up in SignalBraid that is paused or being set up again stops them only until it is active again, and so does a paused GA4 connection or an account that is paused or cancelled. A connection change is answered before the export’s own progress, so an unfinished export of such a connection is 410, not 409 export_not_ready. Through a link none of these is 410: a link never outlives its file, and it does not work while one of these connection changes holds, so each is 404 link_not_found. (Issuing a link for such a file is also 410.) | For an expired or erased file: no, run the export again. For a deleted connection, or a disconnected Shopify or Google Ads connection: no, the export cannot be recovered. For an uninstalled Shopify app, a paused connection or a paused or cancelled account: yes, once the app is installed again or the connection or account is active again. |
| 429 | rate_limited | The download allowance of the workspace or of the issuing key is used up for the minute. Through a link it counts against the key that issued it. See Rate limits. | Yes, after Retry-After. |
| 413 / 415 | request_too_large / unsupported_media_type / unsupported_encoding | A link request body over 4 KiB, or not application/json with Content-Encoding: identity. | No. |
| 503 | export_unavailable | The file could not be read, or the download could not be recorded. No byte is sent. | Yes, with backoff. |
A download that has started can still stop: the key or link is checked again before each part of a large file, so revoking it, erasing the export or deleting its connection ends the transfer with an error rather than a complete file.
400 — the request is wrong. invalid_json, invalid_request, invalid_window,
invalid_idempotency_key, invalid_provider_request, and incomplete_day when the
window includes a day still in progress in the property’s timezone; invalid_query
means the URL carried a query delimiter. Do not retry unchanged.
403 — not allowed to start a synchronization. forbidden means the key lacks sync:write,
the window’s workspace is not the key’s, or the workspace has no plan at all. workspace_paused means the workspace is paused, so a new
synchronization is not started; subscription_lapsed means the subscription has lapsed and the
workspace is in its retention period. Reading is not affected: GET /v1/syncs/{runId} still answers
for a run that was started earlier. Do not retry unchanged; the workspace owner resolves it in the app.
404 — polling run not found. run_not_found when GET /v1/syncs/{runId}
cannot find that run in the key’s workspace. Router-level not_found is separate.
409 — conflict. idempotency_conflict (that key was used for a different
window — use a new key), lease_lost (another worker took over), or
publication_rejected. window_in_progress means another key owns the exact
window’s live lease; retry the same key after that owner finishes or expires.
500 — misconfiguration. invalid_lease_config: the sync service’s lease duration
is outside the permitted range. Classified and documented for completeness, but the
deployed service does not override the default lease, so this should not appear; if
it does, it needs an operator, not a retry.
502 — upstream data could not be trusted. The run published nothing.
| Code | Meaning |
|---|---|
provider_auth_failed | The stored credential was rejected. Reconnect. |
provider_unavailable / provider_error | The provider failed or was unreachable. |
malformed_report / malformed_metadata / malformed_row / unexpected_schema | The response did not match the expected shape. |
restricted_report | The provider declared active metric restrictions on the request — the metric itself was refused. Note this is not thresholding: a thresholded report is accepted and produces a partial run that publishes nothing. |
empty_report_reason | The provider reported an empty result with a reason. |
changing_report | The result changed between pages — it cannot be treated as one snapshot. |
row_count_limit / row_count_mismatch / page_limit | Row or page bounds were exceeded or disagreed. |
incomplete_report / incomplete_extraction / invalid_extraction | The extraction did not complete. |
duplicate_date | The provider returned a date twice. |
raw_integrity_failure / raw_identity_mismatch / raw_missing / raw_commit_failed | Stored raw evidence failed its checksum or identity check, or could not be written. |
analytics_load_failed | The load into the analytics store failed. |
Most 502s are worth one retry with the same idempotency key;
provider_auth_failed and the malformed_* family are not, since they will repeat
until something changes.
503 — temporarily unavailable. sync_unavailable, auth_unavailable,
credential_unavailable, credential_configuration_unavailable (the credential
keyring could not be parsed — needs an operator, not a retry), credential_busy
(another run holds the credential lease), provider_rate_limited,
ledger_unavailable, analytics_load_unavailable, invalid_clickhouse_config.
Retry with backoff, same key.
If the gateway receives a response it cannot classify, it returns
503 sync_unavailable rather than forwarding an unknown code. An unrecognised code
stored on an old run is replaced with sync_unavailable when read back.
The allowlist is operation-specific: polling does not release create-only extraction
or contention failures, and create does not release run_not_found. json_required
is classified for create but should not arise from the current gateway/Worker pairing.
Transport failures use the same HTTP statuses as REST but not always the same codes:
| Status | Code | Cause |
|---|---|---|
| 401 | unauthorized | Missing, unknown, expired or revoked key after the request reaches the pinned private URL/Host/Origin boundary. |
| 403 | forbidden | A disallowed URL, Host or Origin (checked before authentication), or a key lacking query:read. |
| 405 | method_not_allowed | Not POST, after authentication: a non-POST request without a valid key is 401. |
| 406 | JSON-RPC -32000 | Accept did not explicitly allow both application/json and text/event-stream. |
| 415 | json_required | Covers both halves REST splits into unsupported_media_type and unsupported_encoding. |
| 413 | request_too_large | Over 16 KiB. |
| 400 | invalid_query | A URL query delimiter was present, including a bare ?. |
| 400 | invalid_request | Body is not bounded, valid JSON. REST returns invalid_json. |
| 503 | query_unavailable / auth_unavailable | Exchange failed or deadline exceeded; authorization store unreachable. |
Protocol failures are different: they are returned with HTTP 200 and a JSON-RPC
error object, because that is what the protocol requires. A 200 from /mcp does not
mean the call succeeded.
| JSON-RPC code | Meaning |
|---|---|
-32600 | Invalid request — malformed envelope, or an id that is not a bounded string or non-negative integer. |
-32601 | Unsupported request method when the JSON-RPC object carries an id. |
-32602 | Unsupported tool, or arguments that fail the tool’s strict schema. |
-32603 | Internal error, and the fallback the boundary substitutes when a relayed frame carries no usable code. When it sanitises a diagnostic it keeps the original code and replaces only the message. |
Tool-level failures come back as a result with isError: true carrying the same
fixed error envelope, including bounded missingDates for data_not_ready and
data_incomplete, so a query failure inside MCP reads the same as it does over REST.
A valid notification omits id, receives an empty HTTP 202, and never receives a
JSON-RPC error. Unknown notification methods and id-less tools/call are also
acknowledged this way without dispatching a tool.
Controlled pilot automation
Section titled “Controlled pilot automation”A failed source or export is visible in the schedule status, separately from the last successful delivery.
| Status | Code | Action |
|---|---|---|
| 400 | invalid_request, invalid_json, invalid_schedule | Use the closed body for that route. Only 15, 60 or 1440 minutes and 1–31 dates are supported. |
| 403 | source_permission_required, destination_permission_required | Restore the corresponding runtime grant. |
| 400 | cadence_below_source_floor | The requested cadence is faster than the source refreshes. GA4 refreshes hourly at most, so 15 minutes is refused on every plan; choose 60 or 1440. Nothing is written. |
| 403 | cadence_not_entitled | The requested cadence is faster than the workspace plan’s refresh floor. Choose a slower cadence; nothing is written. |
| 403 | workspace_paused, subscription_lapsed, forbidden | Returned by every entitlement-guarded write of the Google Search Console, Ads, Dataset and Shopify Sheet APIs: destination setup (POST /v1/<family>-sheet/destinations) and schedule create, update, enable and redrive. The workspace is paused (workspace_paused), its paid term has ended (subscription_lapsed), or it has no plan that allows the write (forbidden, which also covers an API key that lacks the required scope). Disabling a schedule (enabled: false with no other change) stays allowed while paused, but not when the workspace has no plan at all: then every request with the key is forbidden. If the workspace was already paused when setup started, no workbook is created and the destination is not changed; a pause that lands after the destination is reserved and before the first provider call answers 409 destination_creation_unconfirmed, and one that lands partway through setup can leave a workbook already created. The workspace owner resolves it in the app; do not retry unchanged. |
| 403 | schedule_enable_forbidden, schedule_inactive | Check current connection, destination and schedule authorization. |
| 404 | destination_not_found, schedule_not_found, pipeline_not_found, connection_unavailable, dataset_unavailable | Check identifiers in the key’s own workspace. dataset_unavailable is a dataset that is not readable in it (a draft, a deleted or an unknown one). |
| 409 | timezone_unverified, timezone_conflict | Publish source data in one verified property timezone before configuring or enabling. |
| 409 | destination_creation_unconfirmed | Review the creation outcome with an operator. Setup will not blindly create another workbook. |
| 409 | destination_conflict, destination_unavailable, schedule_conflict, redrive_conflict | Check current state; one schedule may be enabled per destination, and redrive requires a failed occurrence. |
| 409 | sheet_capacity_exhausted, sheet_layout_conflict | Resolve capacity or restore the reserved workbook layout. |
| 502 | provider_auth_failed, provider_unavailable | Reconnect a rejected grant or investigate provider availability. |
| 503 | credential_configuration_unavailable, automation_configuration_unavailable, credential_unavailable, credential_busy, provider_rate_limited, automation_unavailable | Resolve configuration or permission problems; retry transient failures with backoff. |
Schedule status preserves fixed operational codes such as attempts_exhausted,
retry_after_exceeds_policy, destination_capacity_exhausted,
source_not_fully_published, property_timezone_changed,
sheet_verification_failed, export_query_forbidden, export_query_superseded and
export integrity failures.
These are status fields, not additional HTTP status codes. Unknown stored text is
replaced with automation_unavailable; provider bodies and credentials never appear.
Retry etiquette
Section titled “Retry etiquette”Per-plan request limits are being introduced. A refused request gets 429 rate_limited with Retry-After; limits are approximate and their values are not published yet (see Rate limits). That is not permission to hammer the API — a sync
retry loop without backoff spends provider quota, and GA4’s quota is per property,
not per caller. Use the same idempotency key so retries resume rather than duplicate.