Campaigns types
Type definitions referenced by Campaigns queries and mutations.
Audience
Section titled “Audience”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! |
— |
AudienceConnection
Section titled “AudienceConnection”Object.
| Field | Type | Description |
|---|---|---|
edges |
[AudienceEdge!]! |
— |
pageInfo |
PageInfo! |
— |
totalCount |
Int! |
— |
AudienceEdge
Section titled “AudienceEdge”Object.
| Field | Type | Description |
|---|---|---|
node |
Audience! |
— |
cursor |
String! |
— |
AudienceFilter
Section titled “AudienceFilter”Input object.
| Field | Type | Description |
|---|---|---|
search |
String |
Case-insensitive substring match on the audience name. |
AudiencePreview
Section titled “AudiencePreview”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. |
AudiencePreviewContact
Section titled “AudiencePreviewContact”Object.
| Field | Type | Description |
|---|---|---|
email |
String! |
— |
name |
String |
— |
attributes |
JSON |
— |
Boolean
Section titled “Boolean”Scalar. The Boolean scalar type represents true or false.
Campaign
Section titled “Campaign”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! |
— |
CampaignAnalytics
Section titled “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. |
CampaignConnection
Section titled “CampaignConnection”Object.
| Field | Type | Description |
|---|---|---|
edges |
[CampaignEdge!]! |
— |
pageInfo |
PageInfo! |
— |
totalCount |
Int! |
— |
CampaignEdge
Section titled “CampaignEdge”Object.
| Field | Type | Description |
|---|---|---|
node |
Campaign! |
— |
cursor |
String! |
— |
CampaignFilter
Section titled “CampaignFilter”Input object.
| Field | Type | Description |
|---|---|---|
status |
String |
— |
search |
String |
Case-insensitive substring match on the campaign name. |
ConnectDataSourceInput
Section titled “ConnectDataSourceInput”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! |
— |
ContactSchemaField
Section titled “ContactSchemaField”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! |
— |
CreateAudienceInput
Section titled “CreateAudienceInput”Input object.
| Field | Type | Description |
|---|---|---|
name |
String! |
— |
query |
JSON! |
— |
CreateCampaignInput
Section titled “CreateCampaignInput”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!] |
— |
CreateTemplateInput
Section titled “CreateTemplateInput”Input object.
| Field | Type | Description |
|---|---|---|
name |
String! |
— |
subject |
String! |
— |
html |
String! |
— |
text |
String |
— |
builder |
String |
Serialized visual-builder state (JSON). |
CrmSegment
Section titled “CrmSegment”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. |
DataSource
Section titled “DataSource”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! |
— |
DataSourceFilter
Section titled “DataSourceFilter”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. |
DataSourceKind
Section titled “DataSourceKind”Object.
| Field | Type | Description |
|---|---|---|
kind |
String! |
— |
label |
String! |
— |
DeliveryPreference
Section titled “DeliveryPreference”Object.
| Field | Type | Description |
|---|---|---|
id |
String! |
— |
email |
String! |
— |
subscribed_categories |
[String!]! |
— |
created_at |
String! |
— |
updated_at |
String! |
— |
DeliveryPreferencePage
Section titled “DeliveryPreferencePage”Object.
| Field | Type | Description |
|---|---|---|
items |
[DeliveryPreference!]! |
— |
totalCount |
Int! |
— |
EmailCategory
Section titled “EmailCategory”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! |
— |
EmailCategoryInput
Section titled “EmailCategoryInput”Input object.
| Field | Type | Description |
|---|---|---|
name |
String |
— |
label |
String |
— |
description |
String |
— |
ExclusionList
Section titled “ExclusionList”Object.
| Field | Type | Description |
|---|---|---|
id |
String! |
— |
name |
String! |
— |
emails |
[String!]! |
— |
email_count |
Int! |
— |
source_audience_id |
String |
— |
created_at |
String! |
— |
updated_at |
String! |
— |
ExclusionListFilter
Section titled “ExclusionListFilter”Input object.
| Field | Type | Description |
|---|---|---|
search |
String |
Case-insensitive substring match on the exclusion list name. |
ExclusionListInput
Section titled “ExclusionListInput”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.
OAuthConnection
Section titled “OAuthConnection”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! |
— |
PageInfo
Section titled “PageInfo”Object.
| Field | Type | Description |
|---|---|---|
hasNextPage |
Boolean! |
— |
hasPreviousPage |
Boolean! |
— |
startCursor |
String |
— |
endCursor |
String |
— |
SenderEmail
Section titled “SenderEmail”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! |
— |
SheetsCatalogWorkbook
Section titled “SheetsCatalogWorkbook”Object.
| Field | Type | Description |
|---|---|---|
id |
String! |
— |
title |
String! |
— |
updatedAt |
String! |
— |
worksheets |
[SheetsCatalogWorksheet!]! |
— |
SheetsCatalogWorksheet
Section titled “SheetsCatalogWorksheet”Object.
| Field | Type | Description |
|---|---|---|
id |
String! |
— |
title |
String! |
— |
dataRowCount |
Int! |
Number of data rows below the header row. |
SheetsPreviewColumn
Section titled “SheetsPreviewColumn”Object.
| Field | Type | Description |
|---|---|---|
index |
Int! |
— |
label |
String! |
— |
suggestedRole |
String |
Auto-detected role: email, first_name, or last_name. |
SheetsWorksheetPreview
Section titled “SheetsWorksheetPreview”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. |
Signature
Section titled “Signature”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! |
— |
SignatureFilter
Section titled “SignatureFilter”Input object.
| Field | Type | Description |
|---|---|---|
search |
String |
Case-insensitive substring match on the signature name. |
SignatureInput
Section titled “SignatureInput”Input object.
| Field | Type | Description |
|---|---|---|
name |
String |
— |
content |
String |
— |
SortDirection
Section titled “SortDirection”Enum. Sort direction for list queries.
| Value | Description |
|---|---|
ASC |
— |
DESC |
— |
SortInput
Section titled “SortInput”Input object. Generic sort specifier: a whitelisted field name plus a direction.
| Field | Type | Description |
|---|---|---|
field |
String! |
— |
direction |
SortDirection! |
— |
String
Section titled “String”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.
Suppression
Section titled “Suppression”Object.
| Field | Type | Description |
|---|---|---|
id |
Int! |
— |
email |
String! |
— |
reason |
String! |
One of: unsubscribe, bounce, complaint, manual. |
created_at |
String! |
— |
SuppressionConnection
Section titled “SuppressionConnection”Object.
| Field | Type | Description |
|---|---|---|
edges |
[SuppressionEdge!]! |
— |
pageInfo |
PageInfo! |
— |
totalCount |
Int! |
— |
SuppressionEdge
Section titled “SuppressionEdge”Object.
| Field | Type | Description |
|---|---|---|
node |
Suppression! |
— |
cursor |
String! |
— |
SuppressionFilter
Section titled “SuppressionFilter”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. |
Template
Section titled “Template”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! |
— |
TemplateFilter
Section titled “TemplateFilter”Input object.
| Field | Type | Description |
|---|---|---|
search |
String |
Case-insensitive substring match on the template name or subject. |
UpdateAudienceInput
Section titled “UpdateAudienceInput”Input object.
| Field | Type | Description |
|---|---|---|
name |
String |
— |
query |
JSON |
— |
UpdateCampaignInput
Section titled “UpdateCampaignInput”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!] |
— |
UpdateTemplateInput
Section titled “UpdateTemplateInput”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. |