Skip to content

Make an audience

POST
/api/v1/ads/audiences
curl --request POST \
--url https://digize.com/api/v1/ads/audiences \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "example", "source": "segment", "rule": "example", "lookalike": { "seedId": "example", "ratio": 1, "country": "example" }, "platforms": [ "google" ] }'

Makes an audience from a CRM segment, or a lookalike of one, and sends it to the platforms chosen, as hashed emails and phones. Segment audiences follow the CRM, synced again each day.

Needs the ads:write permission. It can’t be undone.

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
name
required
string
>= 1 characters <= 120 characters
source
required
string
Allowed values: segment lookalike
rule
Any of:
string
<= 140 characters
lookalike
Any of:
object
seedId
required

The segment audience it’s like.

string
>= 1 characters <= 64 characters
ratio
required

In percent.

integer
>= 1 <= 10
country
required
string
>= 2 characters <= 2 characters
platforms
required
Array<string>
>= 1 items <= 6 items
Allowed values: google meta tiktok linkedin microsoft pinterest

Done

Media typeapplication/json
object
id
required
string
name
required
string
source
required
string
Allowed values: segment lookalike
rule
required

Who’s in it, in plain words.

string
size
required

CRM contacts it holds, or for a lookalike, about how many the platform says it reaches.

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

The share of its people the platform matched, from 0 to 1; null until it says, and for lookalikes.

number | null
state
required
string
Allowed values: pending syncing synced failed
error
required
string | null
status
required
string
Allowed values: synced syncing failed
error
required

Why the last sync failed somewhere.

string | null
syncedAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
campaigns
required

The campaigns that target it.

Array<string>

Example

{
"source": "segment",
"platforms": [
{
"platform": "google",
"state": "pending"
}
],
"status": "synced"
}

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