Google Analytics
Connect GA4 and read referral, conversion, and landing-page analytics.
advanced.google_analytics_enabled to true. Analytics reads require analytics:read; connection and configuration operations require analytics:write.https://api.signal.ceyo.ai/v1/projects/{project_id}/analytics for a standard project or /projects/{project_id}/locations/{location_id}/analytics for a location. IDs may be Signal UUIDs or partner external IDs.POST /analytics/connect at the selected scope and send the user to the returned authorization_url.PUT /analytics/select_property. To use partner-managed credentials instead, configure a token source and call PUT /analytics/external_source.POST /analytics/sync.GETGet analytics overview
{scope}/analyticsReturns the GA4 overview for a project or location.
Get analytics overview
{scope}/analyticsProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
daysintegerReporting window. Values are clamped to 7–90 days.
Response body
summary:objectdaily_series:object[]platforms:object[]conversion_summary:objectaction_markers:object[]connection:objectdays:integersummaryobjectTraffic and conversion totals with trends.
daily_seriesobject[]Daily analytics points.
platformsobject[]AI platform breakdown.
conversion_summaryobjectConversion totals.
action_markersobject[]Completed action markers in the window.
connectionobjectCurrent GA4 connection summary.
daysintegerApplied reporting window.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETGet analytics referrals
{scope}/analytics/referralsReturns earned referral sources and their GA4 traffic.
Get analytics referrals
{scope}/analytics/referralsProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
daysintegerReporting window. Values are clamped to 7–90 days.
pageinteger1-based page number. Each page contains 25 records.
Response body
sources:object[]sources_pagination:Paginationhero:objectsummary:string | nulldays:integersourcesobject[]Referral sources for the requested page.
sources_paginationPagination25-item pagination metadata.
heroobjectHeadline referral metrics.
summarystring | nullGenerated referral summary when available.
daysintegerApplied reporting window.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETGet analytics conversions
{scope}/analytics/conversionsReturns conversion performance, optionally filtered by GA4 key event.
Get analytics conversions
{scope}/analytics/conversionsProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
daysintegerReporting window. Values are clamped to 7–90 days.
event_namesstring | string[]Comma-separated or repeated key event names. Maximum: 50.
Response body
hero:objectrate_by_source:object[]by_platform:object[]summary:string | nulldays:integerapplied_event_names:string[]heroobjectHeadline conversion metrics.
rate_by_sourceobject[]Conversion rates by source.
by_platformobject[]Conversion metrics by channel.
summarystring | nullGenerated conversion summary when available.
daysintegerApplied reporting window.
applied_event_namesstring[]Normalized event filter.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETGet analytics conversion events
{scope}/analytics/conversion_eventsLists observed GA4 key events for conversion filtering.
Get analytics conversion events
{scope}/analytics/conversion_eventsProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
daysintegerReporting window. Values are clamped to 7–180 days.
Response body
events:{ name, total_key_events }[]days:integerlimit:integerevents{ name, total_key_events }[]Up to 200 key events, ordered by count.
daysintegerApplied reporting window.
limitintegerMaximum returned event count.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETGet analytics landing pages
{scope}/analytics/landing_pagesReturns AI landing-page performance and platform distribution.
Get analytics landing pages
{scope}/analytics/landing_pagesProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
daysintegerReporting window. Values are clamped to 7–90 days.
pageinteger1-based page number. Each page contains 25 records.
matrix_pageinteger1-based page for the 25-item platform matrix.
Response body
pages:object[]pages_pagination:Paginationhero:objectplatform_matrix:objectmatrix_pagination:Paginationdays:integerpagesobject[]Landing-page metrics.
pages_paginationPaginationLanding-page pagination.
heroobjectHeadline landing-page metrics.
platform_matrixobjectPlatform names, colors, and paged rows.
matrix_paginationPaginationPlatform matrix pagination.
daysintegerApplied reporting window.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETGet analytics connection
{scope}/analytics/connectionReturns the current connection for a project or location.
Get analytics connection
{scope}/analytics/connectionProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Response body
project_id:uuidlocation_id:uuidconnection:Connectionproject_iduuidResolved project ID.
location_iduuidResolved location ID when location-scoped.
connectionConnectionConnection details, or disconnected status.
Connection
iduuidConnection identifier.
statusconnected | disconnected | revoked | errorCurrent connection status.
auth_strategyceyo_oauth | external_token_sourceCredential strategy.
account_idstring | nullSelected GA4 account.
property_idstring | nullSelected GA4 property.
last_synced_atdatetime | nullMost recent completed sync.
syncing_sincedatetime | nullStart time of the active sync.
error_messagestring | nullMost recent connection error.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
POSTConnect Google Analytics
{scope}/analytics/connectCreates a short-lived Google OAuth authorization URL.
Connect Google Analytics
{scope}/analytics/connectProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Response body
authorization_url:URLGoogle authorization URL.
/v1/google_analytics/oauth/callback, which completes the exchange. Poll the connection endpoint after the browser reports success.ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
POSTExchange authorization code
{scope}/analytics/exchangeExchanges a Google authorization code for a scoped connection.
Exchange authorization code
{scope}/analytics/exchangeProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Request body
codestringAuthorization code returned by Google.
statestringUnmodified state from the authorization flow.
Response body
connected:trueconnection_id:uuidstatus:stringconnectedtrueConfirms that credentials were stored.
connection_iduuidConnection identifier.
statusstringCurrent connection status.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETList analytics accounts
{scope}/analytics/accountsLists Google Analytics accounts available to the connection.
List analytics accounts
{scope}/analytics/accountsProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Response body
accounts:object[]Available GA4 account summaries.
analytics:write.ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETList analytics properties
{scope}/analytics/propertiesLists GA4 properties for an available account.
List analytics properties
{scope}/analytics/propertiesProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Query parameters
account_idstringGoogle Analytics account identifier.
Response body
properties:object[]GA4 properties in the account.
analytics:write.ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
PUTSelect analytics property
{scope}/analytics/select_propertySelects the GA4 property and queues an initial sync.
Select analytics property
{scope}/analytics/select_propertyProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Request body
property_idstringGA4 property identifier.
property_namestringProperty display name.
account_idstringParent account identifier.
account_namestringParent account display name.
Response body
selected:trueconnection:ConnectionselectedtrueConfirms the selection.
connectionConnectionUpdated connection.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
PUTSet external analytics source
{scope}/analytics/external_sourceConnects a scope through a workspace token source.
Set external analytics source
{scope}/analytics/external_sourceProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Request body
token_source_iduuidEnabled workspace token source.
external_resource_idstringResource ID sent to the partner endpoint.
property_idstringGA4 property ID. Required before syncing.
property_namestringGA4 property display name.
account_idstringGA4 account ID.
account_namestringGA4 account display name.
Response body
connected:trueconnection:ConnectionconnectedtrueConfirms the external connection.
connectionConnectionUpdated connection.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
POSTSync Google Analytics
{scope}/analytics/syncQueues GA4 collection for the selected property.
Sync Google Analytics
{scope}/analytics/syncProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Request body
force_fullJSON booleanRequests a full refresh instead of an incremental sync; strings are rejected.
202 response body
queued:trueReturned with 202 Accepted.
409 sync_in_progress.ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
409sync_in_progressA Google Analytics sync is already in progress.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
DELETEDisconnect Google Analytics
{scope}/analytics/connectionDisconnects GA4 and removes all stored analytics for the scope.
Disconnect Google Analytics
{scope}/analytics/connectionProject path parameters
project_idproject UUID | project external IDProject identifier.
Location path parameters
project_idproject UUID | project external IDProject identifier.
location_idlocation UUID | location external IDLocation identifier belonging to the project.
Response body
disconnected:trueConfirms the connection was removed.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbidden | analytics_unavailableThe key lacks access or GA4 is not enabled by the package.
404not_foundThe scope or requested analytics resource was not found.
422validation_failed | analytics_not_connectedInput is invalid or the connection is not ready.
429google_rate_limitedGoogle Analytics temporarily rate limited the request.
502google_unavailable | external_token_unavailable | external_token_unauthorizedGoogle or an external token provider is temporarily unavailable.
GETList Google Analytics token sources
/google_analytics_token_sourcesLists external token sources in the API key workspace.
List Google Analytics token sources
/google_analytics_token_sourcesResponse body
token_sources:TokenSource[]Workspace token sources ordered by name.
TokenSource
iduuidToken source identifier.
namestringWorkspace-unique display name.
strategyexternal_token_endpointCredential strategy.
enabledbooleanWhether new token requests are allowed.
endpoint_urlURLPartner endpoint that returns a Google access token.
http_methodGET | POSTHTTP method used to request a token.
service_key_headerstringHeader used to send the service key.
has_service_keybooleanWhether an encrypted service key is stored.
header_namesstring[]Configured custom header names; values are never returned.
request_resource_id_keystringRequest field used for the external resource identifier.
attached_scope_countintegerNumber of attached project or location scopes.
analytics:write.ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbiddenThe key lacks workspace analytics:write access.
404not_foundThe token source was not found in this workspace.
422validation_failed | limit_reachedInput is invalid or the workspace limit was reached.
POSTCreate Google Analytics token source
/google_analytics_token_sourcesCreates an external token endpoint configuration.
Create Google Analytics token source
/google_analytics_token_sourcesRequest body
namestringWorkspace-unique display name.
strategyexternal_token_endpointToken source strategy.
endpoint_urlURLHTTPS endpoint that returns a Google access token.
http_methodGET | POSTMethod used to call the endpoint.
service_key_headerstringHeader name for the service key.
service_keystringOptional secret value. It is encrypted and never returned.
request_resource_id_keystringRequest field for external_resource_id.
enabledbooleanEnables or disables the source.
headersobjectOptional request headers with scalar values.
201 response body
token_source:TokenSourceCreated token source. Returns 201.
TokenSource
iduuidToken source identifier.
namestringWorkspace-unique display name.
strategyexternal_token_endpointCredential strategy.
enabledbooleanWhether new token requests are allowed.
endpoint_urlURLPartner endpoint that returns a Google access token.
http_methodGET | POSTHTTP method used to request a token.
service_key_headerstringHeader used to send the service key.
has_service_keybooleanWhether an encrypted service key is stored.
header_namesstring[]Configured custom header names; values are never returned.
request_resource_id_keystringRequest field used for the external resource identifier.
attached_scope_countintegerNumber of attached project or location scopes.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbiddenThe key lacks workspace analytics:write access.
404not_foundThe token source was not found in this workspace.
422validation_failed | limit_reachedInput is invalid or the workspace limit was reached.
PATCHUpdate Google Analytics token source
/google_analytics_token_sources/{id}Updates a workspace token source.
Update Google Analytics token source
/google_analytics_token_sources/{id}Path parameters
iduuidToken source identifier.
Request body
namestringWorkspace-unique display name.
strategyexternal_token_endpointToken source strategy.
endpoint_urlURLHTTPS endpoint that returns a Google access token.
http_methodGET | POSTMethod used to call the endpoint.
service_key_headerstringHeader name for the service key.
service_keystringReplacement secret. Omit or send blank to keep the existing value.
request_resource_id_keystringRequest field for external_resource_id.
enabledbooleanEnables or disables the source.
headersobjectOptional request headers with scalar values.
Response body
token_source:TokenSourceUpdated token source.
TokenSource
iduuidToken source identifier.
namestringWorkspace-unique display name.
strategyexternal_token_endpointCredential strategy.
enabledbooleanWhether new token requests are allowed.
endpoint_urlURLPartner endpoint that returns a Google access token.
http_methodGET | POSTHTTP method used to request a token.
service_key_headerstringHeader used to send the service key.
has_service_keybooleanWhether an encrypted service key is stored.
header_namesstring[]Configured custom header names; values are never returned.
request_resource_id_keystringRequest field used for the external resource identifier.
attached_scope_countintegerNumber of attached project or location scopes.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbiddenThe key lacks workspace analytics:write access.
404not_foundThe token source was not found in this workspace.
422validation_failed | limit_reachedInput is invalid or the workspace limit was reached.
DELETEDelete Google Analytics token source
/google_analytics_token_sources/{id}Deletes an unused workspace token source.
Delete Google Analytics token source
/google_analytics_token_sources/{id}Path parameters
iduuidToken source identifier.
Response body
deleted:trueConfirms deletion.
ErrorsResponse format and status codes
Error response envelope
errorErrorStructured error payload.
Error
codestringStable snake_case code suitable for programmatic handling.
messagestringHuman-readable explanation of the failure.
detailsobject | array | nullStructured validation or request context when available.
request_idstringIdentifier to provide when requesting support.
{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid.",
"details": [
{
"field": "name",
"message": "must be present"
}
],
"request_id": "req_01K1GP6J8QQFZ4D2B6C5A9V3TS"
}
}Status codes
401invalid_api_keyThe API key is absent or invalid.
403forbiddenThe key lacks workspace analytics:write access.
404not_foundThe token source was not found in this workspace.
409token_source_in_useAttached analytics scopes must be disconnected first.
422validation_failed | limit_reachedInput is invalid or the workspace limit was reached.