Endpoints
Call these through the okoro proxy at https://okoro.ai/p/google-ads
| Action | Method | Path | Min scope |
|---|---|---|---|
| List accessible customers | GET | read | |
| Read customer | GET | read | |
| Search ads data | POST | read | |
| Stream search results | POST | read | |
| Mutate campaigns | POST | read | |
| Mutate ad groups | POST | read | |
| Mutate ads | POST | read | |
| Mutate keywords | POST | read | |
| Mutate budgets | POST | read |
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-ads", "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 Ads and logs the action.
List accessible customers
curl -X GET "https://okoro.ai/p/google-ads/customers:listAccessibleCustomers" \
-H "Authorization: Bearer $TOKEN"Read customer
curl -X GET "https://okoro.ai/p/google-ads/customers/{id}" \
-H "Authorization: Bearer $TOKEN"Search ads data
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/googleAds:search" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Stream search results
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/googleAds:searchStream" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Mutate campaigns
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/campaigns:mutate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Mutate ad groups
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/adGroups:mutate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Mutate ads
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/ads:mutate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Mutate keywords
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/keywords:mutate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Mutate budgets
curl -X POST "https://okoro.ai/p/google-ads/customers/{id}/budgets:mutate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Scopes
Your service token must be configured with at least the required scope level.
readGET
POST/customers:listAccessibleCustomers
/customers/*
/customers/*/googleAds:search
/customers/*/googleAds:searchStreamwriteGET
POST/customers:listAccessibleCustomers
/customers/*
/customers/*/googleAds:search
/customers/*/googleAds:searchStream
/customers/*/campaigns:mutate
/customers/*/adGroups:mutate
/customers/*/ads:mutate
/customers/*/keywords:mutate
/customers/*/budgets:mutateupdateGET
POST/customers:listAccessibleCustomers
/customers/*
/customers/*/googleAds:search
/customers/*/googleAds:searchStream
/customers/*/campaigns:mutate
/customers/*/adGroups:mutate
/customers/*/ads:mutate
/customers/*/keywords:mutate
/customers/*/budgets:mutatedeleteGET
POST/customers/*
/customers/*/googleAds:search
/customers/*/campaigns:mutate
/customers/*/adGroups:mutate
/customers/*/ads:mutate
/customers/*/keywords:mutateallGET
POST/**