Skip to content

Change Ads settings

PATCH
/api/v1/ads/settings
curl --request PATCH \
--url https://digize.com/api/v1/ads/settings \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "conversionApis": [ { "platform": "google", "enabled": true } ], "attributionWindow": "1d_click", "utmTemplate": "example", "protection": { "mode": "off", "repeatClicks": 1, "windowHours": 1, "blockDays": 1, "blockNetworks": true, "blockAutomation": true, "allowedCountries": [ "example" ], "response": "page", "shield": "off", "syncGoogleAds": true }, "alerts": { "enabled": true, "monthlyCap": 1, "threshold": 1, "overspend": true, "rejections": true, "recipients": [ "example" ] }, "approval": { "required": true, "above": 1, "approvers": [ "example" ] } }'

Changes some sections of the Ads settings and keeps the rest. Click protection reaches every site within a minute.

Needs the ads:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
conversionApis
Array<object>
<= 6 items
object
platform
required
string
Allowed values: google meta tiktok linkedin microsoft pinterest
enabled
required
boolean
attributionWindow
string
Allowed values: 1d_click 7d_click 7d_click_1d_view 28d_click
utmTemplate
string
<= 500 characters
protection
object
mode
string
Allowed values: off monitor block
repeatClicks
integer
>= 2 <= 50
windowHours
integer
>= 1 <= 168
blockDays
integer
>= 1 <= 90
blockNetworks
boolean
blockAutomation
boolean
allowedCountries
Array<string>
<= 50 items
response
string
Allowed values: page not_found server_error
shield

Scripted traffic on every page: strict turns away all of it, safe only what comes from VPNs and data centers.

string
Allowed values: off safe strict
syncGoogleAds

Adds blocked addresses to Google Ads campaigns as IP exclusions.

boolean
alerts
object
enabled
boolean
monthlyCap
Any of:

In the workspace currency’s minor unit: 3000 is $30.00.

integer
<= 100000000
threshold
integer
>= 10 <= 100
overspend
boolean
rejections
boolean
recipients
Array<string>
<= 50 items
approval
object
required
boolean
above
Any of:

In the workspace currency’s minor unit: 3000 is $30.00.

integer
<= 100000000
approvers
Array<string>
<= 50 items

Done

Media typeapplication/json
object
conversionApis
required
Array<object>
object
platform
required
string
Allowed values: google meta tiktok linkedin microsoft pinterest
name
required
string
enabled
required
boolean
events
required
number
lastEventAt
required
Any of:
string format: date-time
matchQuality
required
string | null
attributionWindow
required
string
Allowed values: 1d_click 7d_click 7d_click_1d_view 28d_click
utmTemplate
required
string
protection
required
object
mode
required
string
Allowed values: off monitor block
repeatClicks
required
integer
>= 2 <= 50
windowHours
required
integer
>= 1 <= 168
blockDays
required
integer
>= 1 <= 90
blockNetworks
required
boolean
blockAutomation
required
boolean
allowedCountries
required
Array<string>
<= 50 items
response
required
string
Allowed values: page not_found server_error
shield
required

Scripted traffic on every page: strict turns away all of it, safe only what comes from VPNs and data centers.

string
Allowed values: off safe strict
syncGoogleAds
required

Adds blocked addresses to Google Ads campaigns as IP exclusions.

boolean
alerts
required
object
enabled
required
boolean
monthlyCap
required
Any of:

In the workspace currency’s minor unit: 3000 is $30.00.

integer
<= 100000000
threshold
required
integer
>= 10 <= 100
overspend
required
boolean
rejections
required
boolean
recipients
required
Array<string>
<= 50 items
approval
required
object
required
required
boolean
above
required
Any of:

In the workspace currency’s minor unit: 3000 is $30.00.

integer
<= 100000000
approvers
required
Array<string>
<= 50 items
shortLinkDomain
required

The workspace’s own short link domain; null for the platform’s.

string | null

Example

{
"conversionApis": [
{
"platform": "google"
}
],
"attributionWindow": "1d_click",
"protection": {
"mode": "off",
"response": "page",
"shield": "off"
}
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}