Skip to content

List a platform's campaigns

GET
/api/v1/ads/accounts/{platform}/campaigns
curl --request GET \
--url https://digize.com/api/v1/ads/accounts/google/campaigns \
--header 'x-api-key: <x-api-key>'

The campaigns in a platform’s connected ad account, asked of the platform now, with their last 30 days and whether each is in Digize already. For choosing ones to import.

Needs the ads:read permission.

platform
required
string
Allowed values: google meta tiktok linkedin microsoft pinterest

Done

Media typeapplication/json
object
data
required
Array<object>
object
externalId
required

Its id on the platform.

string
name
required
string
type
required

The platform’s name for its type, such as Search or Display.

string
format
required
Any of:
string
Allowed values: google_search google_pmax google_demand_gen facebook_feed instagram_feed instagram_story instagram_reels tiktok_feed linkedin_feed microsoft_search pinterest_pin
status
required
string
Allowed values: active paused ended
dailyBudget
required
number
impressions
required

Last 30 days.

number
clicks
required

Last 30 days.

number
spend
required

Last 30 days.

number
campaignId
required

Digize’s id for it once it’s here, imported or published from Digize.

string | null
reason
required

Why it can’t be imported; null when it can.

string | null

Example

{
"data": [
{
"format": "google_search",
"status": "active"
}
]
}

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"
}
}

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"
}
}