Skip to content
gist.link ↗

Campaigns types

Type definitions referenced by Campaigns queries and mutations.

Object.

Field Type Description
id String! —
name String! —
query JSON! The persisted structured query: {dataSourceId, root: {operator, children}, fieldMap}.
data_source_id String —
last_materialized_at String —
estimated_size Int —
created_at String! —
updated_at String! —

Object.

Field Type Description
edges [AudienceEdge!]! —
pageInfo PageInfo! —
totalCount Int! —

Object.

Field Type Description
node Audience! —
cursor String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the audience name.

Object.

Field Type Description
sample [AudiencePreviewContact!]! A small sample of matching contacts (bounded by first).
estimatedCount Int! Matching contact count (unique emails). A lower bound when exactCount is false.
exactCount Boolean! False when the source was too large to scan fully for a preview; estimatedCount is then a lower bound.

Object.

Field Type Description
email String! —
name String —
attributes JSON —

Scalar. The Boolean scalar type represents true or false.

Object.

Field Type Description
id String! —
name String! —
template Template! —
audience Audience! —
status String! One of: draft, scheduled, sending, sent, cancelled.
scheduled_at String —
from_name String! —
from_email String! —
settings JSON —
type String! One of: standard, event.
date_query JSON Event campaigns: {field, quantity, unit(days|weeks|months), include_historical} — matches contacts whose date field falls exactly that long ago; include_historical (default false) widens the window to ALL past dates.
published Boolean! Event campaigns only: the cron scheduler skips unpublished campaigns.
email_category String! Email category machine name; transactional bypasses recipient category preferences.
signature Signature —
exclusion_lists [ExclusionList!]! —
sent_at String —
created_at String! —
updated_at String! —
analytics CampaignAnalytics! —

Object.

Field Type Description
sent Int! —
opens Int! —
clicks Int! —
bounces Int! —
unsubscribes Int! —
complaints Int! —
failed Int! —
openRate Float! opens / sent, 0..1.
clickRate Float! clicks / sent, 0..1.
bounceRate Float! bounces / sent, 0..1.
unsubscribeRate Float! unsubscribes / sent, 0..1.

Object.

Field Type Description
edges [CampaignEdge!]! —
pageInfo PageInfo! —
totalCount Int! —

Object.

Field Type Description
node Campaign! —
cursor String! —

Input object.

Field Type Description
status String —
search String Case-insensitive substring match on the campaign name.

Input object. Connection credentials, shape depends on kind: - sql: {dsn, table} - http: {baseUrl, listPath, authHeader, authValue, fields, pageParam, dataPath} - internal_graphql: {resource: “support_requesters” | “shop_customers”} or, for a CRM segment: {resource: “crm_contacts”, segmentUuid: “<crm segment uuid>”} - hubspot: {accessToken, refreshToken, expiresAt, portalId} - salesforce: {accessToken, refreshToken, instanceUrl} - shopify: {accessToken, shopDomain} - gistlink_sheets: {worksheetId, emailColumn, firstNameColumn?, lastNameColumn?} (the server shares the worksheet with Campaigns and stores only {grantId}) Always encrypted at rest server-side; never returned by any query.

Field Type Description
kind String! —
name String! —
credentials JSON! —

Object. One field in a DataSource’s normalized contact schema.

Field Type Description
name String! —
kind String! —
role String One of: email, name, null — a hint for auto-mapping into the normalized contact model.
label String! —

Input object.

Field Type Description
name String! —
query JSON! —

Input object.

Field Type Description
name String! —
templateId String! —
audienceId String! —
from_name String! —
from_email String! —
settings JSON —
type String standard (default) or event.
date_query JSON —
email_category String —
signatureId String —
exclusionListIds [String!] —

Input object.

Field Type Description
name String! —
subject String! —
html String! —
text String —
builder String Serialized visual-builder state (JSON).

Object. A CRM segment offered as a data source in the connect-source picker.

Field Type Description
uuid ID! —
name String! —
targetType String! contact | company
mode String! dynamic (rule-based) | static (manually managed members)
isDefault Boolean! The organization’s default segment, where new CRM contacts land when no segment is chosen.

Object.

Field Type Description
id String! —
kind String! One of: sql, http, internal_graphql, hubspot, salesforce, shopify.
name String! —
built_in Boolean! True for the built-in “CRM contacts” source campaigns provisions for every organization (support/shop/pay facts are read through onto it). Not removable; hidden from Connections.
built_in_key String Stable identifier of a built-in source (currently only crm_contacts_all); null otherwise.
status String! One of: pending, connected, error.
last_error String —
schema [ContactSchemaField!]! The normalized contact-field schema this source exposes (cached at connect/test time).
created_at String! —
updated_at String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the data source name.
kind String Filter by connector kind (sql, http, hubspot, …).
status String Filter by connection status: connected, error, pending.
connectionsOnly Boolean Only user-managed connections: excludes the built-in CRM source and other suite-app (internal_graphql) sources.

Object.

Field Type Description
kind String! —
label String! —

Object.

Field Type Description
id String! —
email String! —
subscribed_categories [String!]! —
created_at String! —
updated_at String! —

Object.

Field Type Description
items [DeliveryPreference!]! —
totalCount Int! —

Object.

Field Type Description
id String! —
name String! Machine name (slug), e.g. product_update. Immutable after creation.
label String! —
description String —
created_at String! —
updated_at String! —

Input object.

Field Type Description
name String —
label String —
description String —

Object.

Field Type Description
id String! —
name String! —
emails [String!]! —
email_count Int! —
source_audience_id String —
created_at String! —
updated_at String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the exclusion list name.

Input object.

Field Type Description
name String —
emails [String!] —

Scalar. The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Scalar. The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Scalar. The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Scalar. Arbitrary JSON value (objects, arrays, scalars). Serialized as-is.

Object.

Field Type Description
id String! —
provider String! e.g. google.
account String Connected account email, when known.
expires_at String —
created_at String! —
updated_at String! —

Object.

Field Type Description
hasNextPage Boolean! —
hasPreviousPage Boolean! —
startCursor String —
endCursor String —

Object. A usable campaign sender address: the org-wide default (from the settings app) and/or a mailbox assigned to the caller in the mail service.

Field Type Description
address String! —
display_name String! —
is_default Boolean! —

Object.

Field Type Description
id String! —
title String! —
updatedAt String! —
worksheets [SheetsCatalogWorksheet!]! —

Object.

Field Type Description
id String! —
title String! —
dataRowCount Int! Number of data rows below the header row.

Object.

Field Type Description
index Int! —
label String! —
suggestedRole String Auto-detected role: email, first_name, or last_name.

Object.

Field Type Description
worksheetId String! —
workbookTitle String! —
worksheetTitle String! —
totalDataRows Int! —
columns [SheetsPreviewColumn!]! —
rows [[String]!]! Sample data rows (stringified values), one entry per column.

Object.

Field Type Description
id String! —
name String! —
content String! HTML, merge-rendered and appended to the campaign body before the footer. Max 10,000 chars.
created_at String! —
updated_at String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the signature name.

Input object.

Field Type Description
name String —
content String —

Enum. Sort direction for list queries.

Value Description
ASC —
DESC —

Input object. Generic sort specifier: a whitelisted field name plus a direction.

Field Type Description
field String! —
direction SortDirection! —

Scalar. The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Object.

Field Type Description
id Int! —
email String! —
reason String! One of: unsubscribe, bounce, complaint, manual.
created_at String! —

Object.

Field Type Description
edges [SuppressionEdge!]! —
pageInfo PageInfo! —
totalCount Int! —

Object.

Field Type Description
node Suppression! —
cursor String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the suppressed email address.
reason String Filter by reason: unsubscribe, bounce, complaint, manual.

Object.

Field Type Description
id String! —
name String! —
subject String! —
html String! —
text String —
builder String Serialized visual-builder state (JSON) when the template was authored with the drag-and-drop builder; null for raw-HTML templates.
created_at String! —
updated_at String! —

Input object.

Field Type Description
search String Case-insensitive substring match on the template name or subject.

Input object.

Field Type Description
name String —
query JSON —

Input object.

Field Type Description
name String —
templateId String —
audienceId String —
from_name String —
from_email String —
settings JSON —
type String —
date_query JSON —
published Boolean Event campaigns only — toggles the cron scheduler on/off for this campaign.
email_category String —
signatureId String Pass an empty string to clear the signature.
exclusionListIds [String!] —

Input object.

Field Type Description
name String —
subject String —
html String —
text String —
builder String Serialized visual-builder state (JSON). Pass null to detach the visual builder.