← providers

Google Analytics Admin

Manage GA4 accounts, properties, and user permissions

Endpoints

Call these through the okoro proxy at https://okoro.ai/p/google-analytics-admin

ActionMethodPathMin scope
List account summariesGETread
List accountsGETread
Read accountGETread
Delete accountDELETEdelete
List propertiesGETread
Read propertyGETread
Create propertyPOSTwrite
Update propertyPATCHupdate
Delete propertyDELETEdelete
List account user accessGETread
Add account user accessPOSTwrite
Remove account user accessDELETEdelete
List property user accessGETread
Add property user accessPOSTwrite
Remove property user accessDELETEdelete

Examples

Every request requires a short-lived operation token scoped to a single action.

1. Get an operation token

Exchange your service token for a short-lived operation token scoped to a single action.

TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
  -H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "google-analytics-admin", "scope": "read", "intent": "describe what you are doing"}' \
  | jq -r '.token')

2. Call the API

Use the operation token as a Bearer token. The proxy forwards the request to Google Analytics Admin and logs the action.

List account summaries
curl -X GET "https://okoro.ai/p/google-analytics-admin/accountSummaries" \
  -H "Authorization: Bearer $TOKEN"
List accounts
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts" \
  -H "Authorization: Bearer $TOKEN"
Read account
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts/{id}" \
  -H "Authorization: Bearer $TOKEN"
Delete account
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/accounts/{id}" \
  -H "Authorization: Bearer $TOKEN"
List properties
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties" \
  -H "Authorization: Bearer $TOKEN"
Read property
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
  -H "Authorization: Bearer $TOKEN"
Create property
curl -X POST "https://okoro.ai/p/google-analytics-admin/properties" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Update property
curl -X PATCH "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Delete property
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
  -H "Authorization: Bearer $TOKEN"
List account user access
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings" \
  -H "Authorization: Bearer $TOKEN"
Add account user access
curl -X POST "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Remove account user access
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings/{id}" \
  -H "Authorization: Bearer $TOKEN"
List property user access
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings" \
  -H "Authorization: Bearer $TOKEN"
Add property user access
curl -X POST "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Remove property user access
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings/{id}" \
  -H "Authorization: Bearer $TOKEN"

Scopes

Your service token must be configured with at least the required scope level.

read
GET
/accountSummaries /accounts /accounts/** /properties /properties/**
write
GET POST
/accountSummaries /accounts /accounts/** /properties /properties/**
update
GET POST PATCH
/accountSummaries /accounts /accounts/** /properties /properties/**
delete
GET POST PATCH DELETE
/accountSummaries /accounts /accounts/** /properties /properties/**
all
GET POST PATCH DELETE
/**