Get a campaign
const url = 'https://api.infiniteaudience.ai/v1/campaigns/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.infiniteaudience.ai/v1/campaigns/example \ --header 'Authorization: Bearer <token>'Returns full campaign details including an expanded audiences array with resolved segment names and record counts for each linked audience.
Requires ‘discovery’ scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Campaign ID returned by POST /v1/campaigns.
Responses
Section titled “Responses”Campaign with expanded audience list.
A named workspace grouping related audiences and deliveries. There is no audience_ids[] field — audiences[] (below) is the only audience-linkage field the handler ever returns.
object
Unique campaign identifier.
Display name of the campaign.
User-authored campaign brief, intended market, goals, and constraints.
Lifecycle state of the campaign.
Audiences linked to this campaign — expanded on GET /v1/campaigns/{id}; empty array on list responses.
object
IDs of include-role segments in this audience.
IDs of exclude-role segments in this audience.
Constituent segments; audiences can combine multiple subtypes.
Constituent segment summary and saved filter definition. Audiences may combine multiple segment subtypes; there is no primary segment or audience subtype.
object
Segment document ID.
Segment display name.
Cached record count of the segment. Null if never counted.
Subtype of the constituent segment.
Matched subtype only. Count of records in the uploaded identity file. Null otherwise.
Matched subtype only. Count of records successfully matched. Null otherwise.
A group of Filter conditions. All filters within a single group are always ANDed together — there is no per-group intra-operator. The combinator attribute is an inter-group operator: it controls how this group is joined to the immediately preceding group in the array. The combinator on the first group (index 0) is always ignored.
Example — (city = "NYC" AND state = "NY") OR (state = "CA"):
{ "id": "g1", "filters": [{"field":"city","op":"=","value":"NYC"},
{"field":"state","op":"=","value":"NY"}],
"combinator": "AND" },
{ "id": "g2", "filters": [{"field":"state","op":"=","value":"CA"}],
"combinator": "OR" }
] ```
Group g1's `combinator` is irrelevant (it is the first group). Group g2's `combinator: "OR"` means the result is `(g1) OR (g2)`.
object
Stable identifier (UUID or NanoID). Used to track groups across edits.
One or more filter conditions. All conditions in this array are combined with AND. Provide at least one filter per group.
A single filter condition for audience discovery or job execution
object
Canonical catalog field_name (e.g. age or state). ZIP5 also accepts zip, zip_code, or postal_code as input aliases; saved responses use zip5.
Comparison operator
Optional STRING comparison mode for =, !=, IN, NOT IN, and LIKE, or ARRAY
Optionally trim leading and trailing whitespace on both sides of a STRING or ARRAY
Inter-group operator. Joins this group to the previous group in the array. AND narrows the result; OR broadens it. Ignored on the first group (index 0) — that group has no predecessor to join.
Expanded summaries of the exclude-role segments, same semantics as segments.
Constituent segment summary and saved filter definition. Audiences may combine multiple segment subtypes; there is no primary segment or audience subtype.
object
Segment document ID.
Segment display name.
Cached record count of the segment. Null if never counted.
Subtype of the constituent segment.
Matched subtype only. Count of records in the uploaded identity file. Null otherwise.
Matched subtype only. Count of records successfully matched. Null otherwise.
A group of Filter conditions. All filters within a single group are always ANDed together — there is no per-group intra-operator. The combinator attribute is an inter-group operator: it controls how this group is joined to the immediately preceding group in the array. The combinator on the first group (index 0) is always ignored.
Example — (city = "NYC" AND state = "NY") OR (state = "CA"):
{ "id": "g1", "filters": [{"field":"city","op":"=","value":"NYC"},
{"field":"state","op":"=","value":"NY"}],
"combinator": "AND" },
{ "id": "g2", "filters": [{"field":"state","op":"=","value":"CA"}],
"combinator": "OR" }
] ```
Group g1's `combinator` is irrelevant (it is the first group). Group g2's `combinator: "OR"` means the result is `(g1) OR (g2)`.
object
Stable identifier (UUID or NanoID). Used to track groups across edits.
One or more filter conditions. All conditions in this array are combined with AND. Provide at least one filter per group.
A single filter condition for audience discovery or job execution
object
Canonical catalog field_name (e.g. age or state). ZIP5 also accepts zip, zip_code, or postal_code as input aliases; saved responses use zip5.
Comparison operator
Optional STRING comparison mode for =, !=, IN, NOT IN, and LIKE, or ARRAY
Optionally trim leading and trailing whitespace on both sides of a STRING or ARRAY
Inter-group operator. Joins this group to the previous group in the array. AND narrows the result; OR broadens it. Ignored on the first group (index 0) — that group has no predecessor to join.
When this audience was linked to the campaign.
Example
{ "status": "active", "audiences": [ { "status": "active", "segments": [ { "subtype": "filter", "filter_groups": [ { "filters": [ { "op": "=", "text_comparison": "exact" } ], "combinator": "AND" } ] } ], "excluded_segments": [ { "subtype": "filter", "filter_groups": [ { "filters": [ { "op": "=", "text_comparison": "exact" } ], "combinator": "AND" } ] } ], "set_logic": "union" } ]}Missing or invalid Bearer token. Obtain one via POST /v1/auth/token. When a token was supplied but rejected, code distinguishes TOKEN_EXPIRED (the token’s lifetime has passed — request a new one via POST /v1/auth/token and retry) from TOKEN_INVALID (malformed or revoked — re-authenticate).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Public action for correcting the request or retrying later.
object
JSON path to the invalid filter field or value.
Examples
{ "error": "Unauthorized: Missing or invalid Authorization header"}{ "error": "Unauthorized", "code": "TOKEN_EXPIRED", "message": "Your session has expired. Please sign in again."}Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Public action for correcting the request or retrying later.
object
JSON path to the invalid filter field or value.
Examples
{ "error": "SCOPE_REQUIRED", "message": "This endpoint requires the creator scope."}Resource not found or not accessible to the calling org.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Public action for correcting the request or retrying later.
object
JSON path to the invalid filter field or value.
Examples
{ "error": "Audience not found"}