Skip to content
gist.link ↗

Marketing types

Type definitions referenced by Marketing queries and mutations.

Object.

Field Type Description
id ID! —
adSetId String! —
externalId String! —
name String! —
creative Creative! —
status String! One of: active, paused, archived.
createdAt String! —
updatedAt String! —

Object.

Field Type Description
id ID! —
connectionId String! —
externalId String! —
name String! —
currency String! ISO 4217, 3 letters.
createdAt String! —
updatedAt String! —

Object.

Field Type Description
id ID! —
campaignId String! —
externalId String! —
name String! —
budget Int! Integer minor units (e.g. cents).
currency String! ISO 4217, 3 letters.
targeting JSON —
ads [Ad!]! —
createdAt String! —
updatedAt String! —

Object.

Field Type Description
id ID! —
organizationId String! —
platform Platform! —
definition JSON! —
externalId String —
createdAt String! —
updatedAt String! —

Scalar. The Boolean scalar type represents true or false.

Object.

Field Type Description
id ID! —
organizationId String! —
adAccountId String! —
externalId String! —
platform Platform! —
name String! —
objective String! —
status String! One of: active, paused, archived.
dailyBudget Int! Integer minor units (e.g. cents).
currency String! ISO 4217, 3 letters.
targeting JSON —
adSets [AdSet!]! —
createdAt String! —
updatedAt String! —

Object.

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

Object.

Field Type Description
node Campaign! —
cursor String! —

Input object.

Field Type Description
platform Platform —
status String One of: active, paused, archived.
adAccountId ID —

Input object.

Field Type Description
field CampaignSortField! —
direction SortDirection! —

Enum.

Value Description
CREATED_AT —
NAME —

Object.

Field Type Description
authorizeUrl String! URL to redirect the user’s browser to in order to begin the platform’s OAuth consent flow.
state String! The signed, opaque OAuth state the callback route will verify; also embedded as the authorizeUrl’s state query parameter.

Input object.

Field Type Description
adAccountId ID! —
platform Platform! —
name String! —
objective String! —
dailyBudget Int! Integer minor units (e.g. cents).
currency String! ISO 4217, 3 letters.
targeting JSON —

Input object.

Field Type Description
name String! —
headline String —
body String —
mediaUrls [String!] —
landingUrl String —

Object.

Field Type Description
id ID! —
organizationId String! —
name String! —
headline String —
body String —
mediaUrls [String!] CDN URLs (assets service), not raw binaries.
landingUrl String —
createdAt String! —
updatedAt String! —

Input object.

Field Type Description
startDate String! Inclusive, “Y-m-d”.
endDate String! Inclusive, “Y-m-d”.

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.

Object. One aggregated row of the insights query: SUM(spend)/SUM(impressions)/ SUM(clicks)/SUM(conversions) for one groupKey value, always scoped to a single currency. See InsightResolver for the multi-currency invariant this type exists to encode: a groupKey that has spend in two currencies (e.g. a PLATFORM bucket for an org running both USD and EUR ad accounts on the same platform) comes back as two separate InsightBucket rows, never one row with currencies summed together.

Field Type Description
groupKey String! The groupBy dimension’s value for this bucket, e.g. “meta” (PLATFORM), “2026-07-01” (DATE), “campaign” (ENTITY_TYPE).
currency String! ISO 4217, 3 letters. Never mixed within one bucket.
spend Int! Integer minor units (e.g. cents).
impressions Int! —
clicks Int! —
conversions Int! —

Enum.

Value Description
CAMPAIGN —
ADSET —
AD —
ACCOUNT —

Enum. Dimension insights are grouped by, in addition to the mandatory grouping by currency (see InsightBucket doc and InsightResolver — buckets are NEVER summed across currencies, regardless of groupBy).

Value Description
PLATFORM One bucket per platform (+ currency).
DATE One bucket per calendar date (+ currency).
ENTITY_TYPE One bucket per InsightSnapshot.entityType (campaign/adset/ad/account) (+ currency).

Input object.

Field Type Description
entityType InsightEntityType! —
ids [ID!] Local (this service’s) entity ids to scope the aggregation to; empty means all entities of entityType visible to the organization.

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
hasNextPage Boolean! —
hasPreviousPage Boolean! —
startCursor String —
endCursor String —

Enum. One entry per AdPlatformConnector registered in PlatformRegistry. Enum case names are the GraphQL-facing spelling; each case’s underlying connector platformKey() string (used everywhere internally: PlatformConnection.platform, Campaign.platform, connector lookups) is documented per case since the two spellings intentionally differ for META/GOOGLE_ADS (GraphQL convention favors SCREAMING_SNAKE_CASE enum members; platformKey() favors the platform’s own short lowercase slug — “meta” and “google_ads” specifically, see src/Platform//.php platformKey() implementations).

Value Description
META platformKey(): “meta”
GOOGLE_ADS platformKey(): “google_ads”
LINKEDIN platformKey(): “linkedin”
REDDIT platformKey(): “reddit”

Object.

Field Type Description
id ID! —
platform Platform! —
ownerUserId String! —
scopes [String!]! —
status String! One of: active, expired, revoked.
expiresAt String —
createdAt String! —
updatedAt String! —

Enum.

Value Description
ASC —
DESC —

Input object. Generic sort specifier (DataTable convention): 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 ID! —
connectionId String Null when this job was not tied to a specific connection at dispatch time.
kind String! e.g. token_refresh, insights_sync, campaign_push.
status String! One of: pending, running, succeeded, failed.
error String —
startedAt String —
finishedAt String —
createdAt String! —
updatedAt String! —

Object.

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

Object.

Field Type Description
node SyncJob! —
cursor String! —

Input object.

Field Type Description
name String —
objective String —
dailyBudget Int Integer minor units (e.g. cents).
targeting JSON —

Input object.

Field Type Description
name String —
headline String —
body String —
mediaUrls [String!] —
landingUrl String —