Skip to content

List goals sent to ads

GET
/api/v1/ads/goals
curl --request GET \
--url https://digize.com/api/v1/ads/goals \
--header 'x-api-key: <x-api-key>'

The form goals sent to the ad platforms (Analytics › Settings › Goals, with an ad category) and, for each platform whose conversion tracking is on, whether its conversion goal is made and how many conversions went there this week.

Needs the ads:read permission.

Done

Media typeapplication/json
Array<object>
object
id
required
string
name
required
string
form
required

The form whose posts count.

string
category
required
string
Allowed values: lead signup contact appointment quote other
value
required
number | null
createdAt
required
string format: date-time
platforms
required

Each platform whose conversion tracking is on.

Array<object>
object
platform
required
string
Allowed values: google meta tiktok linkedin microsoft pinterest
state
required

ready: its conversion goal is made, or the platform needs none; making: it’s being made; refused: the platform wouldn’t, and error says why.

string
Allowed values: ready making refused
error
required
string | null
sent
required

Conversions sent over the last 7 days.

number

Example

[
{
"category": "lead",
"platforms": [
{
"platform": "google",
"state": "ready"
}
]
}
]

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