API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · campaigns

Campaign Schema

Schema-ID
campaign
Collection
campaigns
Permissions
  • Lesencampaign_view
  • Anlegencampaign_create
  • Änderncampaign_edit
  • Löschencampaign_delete

Felder

Campaign Schema

campaigns4 Permissions

Generic campaign (newsletter, sales outreach, tech rollout, …). Produces a dynamic work list of campaign_items from a segment query. See ADR 0040.

namestringerforderlich
1–200 Zeichen
descriptionstringoptional
max 2000 Zeichennullable
typestringerforderlich
NEWSLETTERSALES_OUTREACHACCOUNT_REVIEWTECH_ROLLOUTRETENTIONUPSELLSURVEYCOMPLIANCEGENERIC
statusstringerforderlich
DRAFTREADYRUNNINGPAUSEDENDED_PENDING_TASKSCOMPLETEDARCHIVEDFAILED
Default: "DRAFT"
ownerIduuidoptional
nullable
assignedTeamIduuidoptional
nullable
memberIdsuuid[]optional

Ad-hoc team members of this campaign (internal user UUIDs). Independent of assignedTeamId, used for collaboration, task filtering and assignee strategies like RANDOM_MEMBER.

Default: []nullable
baseEntitystringerforderlich

Schema id of the target entity (e.g. "party", "asset", "contact", "newsletter_subscriber").

1–64 Zeichen
segmentIduuidoptional

Reference to a reusable campaign_segment.

nullable
segmentQueryobjectoptional

Inline SegmentQuery tree. Used when no campaign_segment is referenced. See segment-evaluator.ts.

nullable
segmentModestringoptional
STATICDYNAMIC_PERIODICDYNAMIC_EVENT
Default: "STATIC"
segmentRefreshIntervalMinintegeroptional

Re-evaluation interval for DYNAMIC_PERIODIC mode (minutes).

5 – 1440nullable
onLeaveSegmentstringoptional

What happens to items whose target entity no longer matches the segment after refresh.

KEEPSKIP
Default: "KEEP"
recipientResolverobjectoptional
nullable
strategystringoptional
BY_FUNCTION_ROLEBY_RELATIONSHIP_FLAGEXPLICIT_CONTACTSALL_CONTACTS
rolesstring[]optional

FunctionRole slugs, evaluated in priority order.

Default: []
sendToAllMatchingbooleanoptional
Default: false
fallbackStrategystringoptional
PRIMARY_CONTACTCOMPANY_EMAILSKIPWARN
Default: "SKIP"
requireOptInbooleanoptional
Default: false
optInCategoriesstring[]optional
nullable
emailFieldstringoptional
workEmailprivateEmailanyAvailable
Default: "anyAvailable"
explicitContactIdsuuid[]optional
nullable
actionsobject[]erforderlich
Default: []
idstringerforderlich
1–64 Zeichen
typestringerforderlich
SEND_EMAILSEND_EMAIL_SEQUENCESEND_NEWSLETTERCREATE_TASKCREATE_TICKETCREATE_OPPORTUNITYSTART_WORKFLOWWEBHOOK
triggerstringerforderlich
ON_ITEM_CREATEDON_DEMANDDELAYEDCONDITIONAL
delayHoursintegeroptional
0 – 2160nullable
conditionsobject[]optional
Default: []
fieldstringerforderlich
1–200 Zeichen
opstringerforderlich
containsexactregexeqneqgtegtlteltexistsany
valuestring | number | booleanoptional
nullable
valueTypestringoptional
stringnumberversionbooleandate
conditionsModestringoptional
ANDOR
Default: "AND"
nextIdsstring[]optional
max 20 ItemsDefault: []
configobjectoptional

Type-specific config (subject/htmlContent for SEND_EMAIL, title/dueInDays for CREATE_TASK, etc.).

enabledbooleanoptional
Default: true
scheduledStartAtdatetimeoptional
nullable
scheduledEndAtdatetimeoptional
nullable
startedAtdatetimeoptional
read-onlynullable
completedAtdatetimeoptional
read-onlynullable
pausedAtdatetimeoptional
read-onlynullable
dailySendLimitintegeroptional
≥ 1nullable
frequencyCapMinHoursintegeroptional
≥ 0nullable
approvalRequiredbooleanoptional
Default: false
approvedByuuidoptional
read-onlynullable
approvedAtdatetimeoptional
read-onlynullable
mandatoryVisibilitybooleanoptional

If true, user campaign-mute settings are ignored in /tasks (e.g. for compliance campaigns).

Default: false
configobjectoptional

Type-specific config. For NEWSLETTER: { subject, htmlContent, tiptapContent, abTest, fromName, fromEmail, replyTo, emailAccountId, listIds, excludeListIds }.

nullable
statsobjectoptional
read-onlynullable
itemsTotalintegeroptional
≥ 0Default: 0
itemsPendingintegeroptional
≥ 0Default: 0
itemsInProgressintegeroptional
≥ 0Default: 0
itemsDoneintegeroptional
≥ 0Default: 0
itemsSkippedintegeroptional
≥ 0Default: 0
itemsFailedintegeroptional
≥ 0Default: 0
emailsSentintegeroptional
≥ 0Default: 0
emailsDeliveredintegeroptional
≥ 0Default: 0
emailsOpenedintegeroptional
≥ 0Default: 0
emailsClickedintegeroptional
≥ 0Default: 0
emailsBouncedintegeroptional
≥ 0Default: 0
emailsUnsubscribedintegeroptional
≥ 0Default: 0
emailsComplainedintegeroptional
≥ 0Default: 0
tasksCreatedintegeroptional
≥ 0Default: 0
ticketsCreatedintegeroptional
≥ 0Default: 0
opportunitiesCreatedintegeroptional
≥ 0Default: 0
lastAggregatedAtdatetimeoptional
nullable
lastSegmentEvaluatedAtdatetimeoptional
read-onlynullable
tagsstring[]optional
Default: []

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/campaigns — Liste, paginiert + filterbar
  • GET /api/v1/campaigns/<id> — Einzelne Entity
  • POST /api/v1/campaigns — Anlegen
  • PATCH /api/v1/campaigns/<id> — Teil-Update
  • DELETE /api/v1/campaigns/<id> — Soft-Delete
  • GET /api/v1/campaigns/<id>/timeline — Audit + Aktivitäten

Suche