Ads · Ad Campaigns
Pauses or enables a Search keyword. Works with Google Ads.
https://api.pozy.ai/v1/ads/keywords/{keywordId}Guide: Google Ads
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the ads resource group disabled get 403 resource_group_disabled. Authentication
Path parameters
| Name | Type | Notes |
|---|---|---|
keywordIdrequired | string |
Request body
application/json, required
statusstringrequiredOne of
active,paused.
Example
curl -X PATCH "https://api.pozy.ai/v1/ads/keywords/60156aec0ea6dde737c0c631" \
-H "Authorization: Bearer $POZY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "active"
}'const res = await fetch("https://api.pozy.ai/v1/ads/keywords/60156aec0ea6dde737c0c631", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POZY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
status: "active"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.patch(
"https://api.pozy.ai/v1/ads/keywords/60156aec0ea6dde737c0c631",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
json={
"status": "active",
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
keywordobject21 child fields
idstringplatformCriterionIdstringresourceNamestringaccountIdstringprofileIdstringplatformstringOne of
google.adAccountIdstringcampaignIdstringcampaignNamestringCan be null.
campaignStatusstringCan be null.
adSetIdstringadSetNamestringCan be null.
adSetStatusstringCan be null.
keywordstringmatchTypestringOne of
exact,phrase,broad,unknown.statusstringOne of
active,paused.negativebooleanqualityScoreintegerCan be null.
qualityobject4 child fields
scoreintegerCan be null.
expectedCtrstringOne of
BELOW_AVERAGE,AVERAGE,ABOVE_AVERAGE. Can be null.adRelevancestringOne of
BELOW_AVERAGE,AVERAGE,ABOVE_AVERAGE. Can be null.landingPageExperiencestringOne of
BELOW_AVERAGE,AVERAGE,ABOVE_AVERAGE. Can be null.
syncedAtstring (date-time)Can be null.
metricsobjectCan be null.
7 child fields
windowDaysintegerclicksintegerimpressionsintegercostnumberconversionsnumberfirstPageCpcnumberCan be null.
firstPositionCpcnumberCan be null.
{
"keyword": {
"id": "6bfebd43ddc270f6d2c56fc5",
"platformCriterionId": "6882078ac440c35a806f87dc",
"resourceName": "Acme",
"accountId": "696e0b682d0a31188e7a2ba9",
"profileId": "6a0b6573846efc28aaa9a3ff",
"platform": "google",
"adAccountId": "666219aad7bab67ace411e4f",
"campaignId": "65a3737dd8b11ea61f199e6e",
"campaignName": "Acme",
"campaignStatus": "active",
"adSetId": "60484b408d44e7c2492bfec5",
"adSetName": "Acme",
"adSetStatus": "active",
"keyword": "string",
"matchType": "exact",
"status": "active",
"negative": true,
"qualityScore": 1,
"quality": {
"score": 1,
"expectedCtr": "BELOW_AVERAGE",
"adRelevance": "BELOW_AVERAGE",
"landingPageExperience": "BELOW_AVERAGE"
},
"syncedAt": "2026-10-02T09:00:00.000Z",
"metrics": {
"windowDays": 1,
"clicks": 1,
"impressions": 1,
"cost": 12.5,
"conversions": 12.5,
"firstPageCpc": 12.5,
"firstPositionCpc": 12.5
}
}
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is read-only, scoped to other profiles, or has this resource group disabled. |
| 404 | not_found | Nothing with that id exists in your workspace. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.