Skip to content

Get Or Create Crm Audience

POST
/integrations/crm-sync/audiences

Get, or create, the graph8 audience a CRM import lands in.

IDEMPOTENT BY TITLE. Calling twice with the same list_name returns the same audience with created: false rather than making a second one, which is what makes it safe to call before every import. That is the difference from POST /lists, which always creates - and it is why this exists separately rather than being folded into it.

The audience is tagged with the CRM provider and the connection it came from, so a later sync can tell CRM-imported rows from graph8-native ones.

200, not 201: most calls return a list that already existed.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Get, or create, the graph8 audience a CRM import lands in.

Idempotent by TITLE: calling twice with the same list_name returns the same audience with created: false rather than making a second one. That is what makes it safe to call before every import, and it is why this is not POST /lists - that one always creates.

object
connection_id
required

The CRM connection this audience is for. Its provider is recorded on the audience as the source and as a crm-import tag, which is what lets a later sync tell CRM-imported rows from graph8-native ones.

string
entity_type
Any of:
string
list_name
required

Audience title. Matched exactly; reused when it exists.

string

Responses

200

Successful Response

object
data
required

The audience, and whether this call is what created it.

object
audience_id
Any of:
integer
created
Any of:
boolean
source
Any of:
string
title
Any of:
string
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string