@epilot/sdk 2.19.3 → 2.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +835 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5743 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5557 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2386 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7718 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +19945 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11517 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +539 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1524 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +3905 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +12769 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2640 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +11569 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2222 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2365 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-UC3IKFHD.js → chunk-HWPPR3IM.js} +2 -2
- package/dist/{chunk-QWWGJOYR.cjs → chunk-VB6VABGZ.cjs} +2 -2
- package/dist/customer-portal-CDFQM72A.js +7 -0
- package/dist/customer-portal-MS6WNXAO.cjs +7 -0
- package/dist/{customer-portal.d-DTnk0yQf.d.cts → customer-portal.d-DJHJY-vb.d.cts} +51 -8
- package/dist/{customer-portal.d-DTnk0yQf.d.ts → customer-portal.d-DJHJY-vb.d.ts} +51 -8
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/targeting-5U4XGOXY.cjs +7 -0
- package/dist/targeting-R3G32HI4.js +7 -0
- package/dist/{targeting.d-16SvPyj4.d.cts → targeting.d-KcawmWBB.d.cts} +8 -0
- package/dist/{targeting.d-16SvPyj4.d.ts → targeting.d-KcawmWBB.d.ts} +8 -0
- package/docs/customer-portal.md +13 -4
- package/docs/targeting.md +9 -1
- package/package.json +1 -1
- package/dist/customer-portal-FCUPDA7V.cjs +0 -7
- package/dist/customer-portal-GRWXQYKT.js +0 -7
- package/dist/targeting-BTVCLYFW.cjs +0 -7
- package/dist/targeting-NWYDE3E7.js +0 -7
|
@@ -0,0 +1,2222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Targeting API",
|
|
5
|
+
"description": "API for Targeting",
|
|
6
|
+
"version": "1.1.0"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Campaign",
|
|
11
|
+
"description": "Campaign Endpoints"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Campaign Recipient",
|
|
15
|
+
"description": "Campaign Recipient Endpoints"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Campaign Delivery",
|
|
19
|
+
"description": "Campaign Delivery Endpoints"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Target",
|
|
23
|
+
"description": "Target Endpoints"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"security": [
|
|
27
|
+
{
|
|
28
|
+
"EpilotAuth": []
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"servers": [
|
|
32
|
+
{
|
|
33
|
+
"url": "https://targeting.sls.epilot.io"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"paths": {
|
|
37
|
+
"/v1/campaign/{campaign_id}/status": {
|
|
38
|
+
"post": {
|
|
39
|
+
"operationId": "changeCampaignStatus",
|
|
40
|
+
"summary": "changeCampaignStatus",
|
|
41
|
+
"description": "Change the status of a campaign to a desired status.\n\nThe status can be one of the following: active, inactive.\n\nStatus transition is accompanied by side effects, e.g., automation execution.\n",
|
|
42
|
+
"tags": [
|
|
43
|
+
"Campaign"
|
|
44
|
+
],
|
|
45
|
+
"security": [
|
|
46
|
+
{
|
|
47
|
+
"EpilotAuth": []
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"parameters": [
|
|
51
|
+
{
|
|
52
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"responses": {
|
|
56
|
+
"200": {
|
|
57
|
+
"$ref": "#/components/responses/CampaignResponse"
|
|
58
|
+
},
|
|
59
|
+
"400": {
|
|
60
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
61
|
+
},
|
|
62
|
+
"500": {
|
|
63
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"/v1/campaign/{campaign_id}/job": {
|
|
69
|
+
"get": {
|
|
70
|
+
"operationId": "getCampaignJobStatus",
|
|
71
|
+
"description": "Get the status of a campaign's automation job",
|
|
72
|
+
"summary": "getCampaignJobStatus",
|
|
73
|
+
"tags": [
|
|
74
|
+
"Campaign"
|
|
75
|
+
],
|
|
76
|
+
"security": [
|
|
77
|
+
{
|
|
78
|
+
"EpilotAuth": []
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"parameters": [
|
|
82
|
+
{
|
|
83
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"responses": {
|
|
87
|
+
"200": {
|
|
88
|
+
"$ref": "#/components/responses/JobStatusResponse"
|
|
89
|
+
},
|
|
90
|
+
"400": {
|
|
91
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
92
|
+
},
|
|
93
|
+
"500": {
|
|
94
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"/v1/campaign/{campaign_id}/portals": {
|
|
100
|
+
"get": {
|
|
101
|
+
"operationId": "getCampaignPortals",
|
|
102
|
+
"summary": "getCampaignPortals",
|
|
103
|
+
"description": "Get the list of portals and its widgets where the campaign is used.\n",
|
|
104
|
+
"tags": [
|
|
105
|
+
"Campaign"
|
|
106
|
+
],
|
|
107
|
+
"security": [
|
|
108
|
+
{
|
|
109
|
+
"EpilotAuth": []
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"parameters": [
|
|
113
|
+
{
|
|
114
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"responses": {
|
|
118
|
+
"200": {
|
|
119
|
+
"$ref": "#/components/responses/CampaignPortalsResponse"
|
|
120
|
+
},
|
|
121
|
+
"400": {
|
|
122
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
123
|
+
},
|
|
124
|
+
"500": {
|
|
125
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"/v1/campaign/{campaign_id}/automations:retrigger": {
|
|
131
|
+
"post": {
|
|
132
|
+
"operationId": "retriggerCampaignAutomations",
|
|
133
|
+
"summary": "retriggerCampaignAutomations",
|
|
134
|
+
"description": "Retrigger automation executions for specific campaign recipients that have failed.\n\nThis endpoint starts new automation executions for the specified recipients\nusing the campaign's associated automation flow. Only recipients with\nautomation_status 'failed' will be processed. Recipients with other statuses\n(success, pending, in_progress, cancelled) will be skipped to prevent\naccidentally retriggering successful or ongoing automations.\n",
|
|
135
|
+
"tags": [
|
|
136
|
+
"Campaign Delivery"
|
|
137
|
+
],
|
|
138
|
+
"security": [
|
|
139
|
+
{
|
|
140
|
+
"EpilotAuth": []
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"parameters": [
|
|
144
|
+
{
|
|
145
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"requestBody": {
|
|
149
|
+
"required": true,
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"$ref": "#/components/schemas/RetriggerAutomationsRequest"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"responses": {
|
|
159
|
+
"200": {
|
|
160
|
+
"$ref": "#/components/responses/RetriggerAutomationsResponse"
|
|
161
|
+
},
|
|
162
|
+
"400": {
|
|
163
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
164
|
+
},
|
|
165
|
+
"404": {
|
|
166
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
167
|
+
},
|
|
168
|
+
"500": {
|
|
169
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"/v1/campaign:setup": {
|
|
175
|
+
"post": {
|
|
176
|
+
"operationId": "setupCampaign",
|
|
177
|
+
"summary": "setupCampaign",
|
|
178
|
+
"description": "Creates a `campaign` entity together with its related entities and configurations in a single call.\nUsed by the campaign wizard UI, but not restricted to it.\n",
|
|
179
|
+
"tags": [
|
|
180
|
+
"Campaign"
|
|
181
|
+
],
|
|
182
|
+
"security": [
|
|
183
|
+
{
|
|
184
|
+
"EpilotAuth": []
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"requestBody": {
|
|
188
|
+
"required": true,
|
|
189
|
+
"content": {
|
|
190
|
+
"application/json": {
|
|
191
|
+
"schema": {
|
|
192
|
+
"$ref": "#/components/schemas/SetupCampaignRequest"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"responses": {
|
|
198
|
+
"201": {
|
|
199
|
+
"$ref": "#/components/responses/SetupCampaignResponse"
|
|
200
|
+
},
|
|
201
|
+
"400": {
|
|
202
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
203
|
+
},
|
|
204
|
+
"500": {
|
|
205
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"/v1/campaign:match": {
|
|
211
|
+
"post": {
|
|
212
|
+
"operationId": "matchCampaigns",
|
|
213
|
+
"summary": "matchCampaigns",
|
|
214
|
+
"description": "Match campaigns based on target entities.\n\nThis endpoint returns the list of campaigns where the provided entities are part of the target.\n",
|
|
215
|
+
"tags": [
|
|
216
|
+
"Campaign"
|
|
217
|
+
],
|
|
218
|
+
"security": [
|
|
219
|
+
{
|
|
220
|
+
"EpilotAuth": []
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"requestBody": {
|
|
224
|
+
"required": true,
|
|
225
|
+
"content": {
|
|
226
|
+
"application/json": {
|
|
227
|
+
"schema": {
|
|
228
|
+
"$ref": "#/components/schemas/MatchCampaignParams"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"responses": {
|
|
234
|
+
"200": {
|
|
235
|
+
"$ref": "#/components/responses/MatchCampaignsResponse"
|
|
236
|
+
},
|
|
237
|
+
"400": {
|
|
238
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
239
|
+
},
|
|
240
|
+
"500": {
|
|
241
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"/v1/campaign:discover": {
|
|
247
|
+
"post": {
|
|
248
|
+
"operationId": "discoverCampaigns",
|
|
249
|
+
"summary": "discoverCampaigns",
|
|
250
|
+
"description": "Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.\n\nEnumerates the organization's **active** campaigns that carry a valid Entity-UI Next Best\nAction, live-matches each against the entity using the existing match engine, and returns\nthe matching NBAs priority-sorted (one per campaign).\n\nThis is a pure read: it writes nothing. An entity that matches no campaigns returns an\nempty list, not an error.\n",
|
|
251
|
+
"tags": [
|
|
252
|
+
"Campaign"
|
|
253
|
+
],
|
|
254
|
+
"security": [
|
|
255
|
+
{
|
|
256
|
+
"EpilotAuth": []
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"requestBody": {
|
|
260
|
+
"required": true,
|
|
261
|
+
"content": {
|
|
262
|
+
"application/json": {
|
|
263
|
+
"schema": {
|
|
264
|
+
"$ref": "#/components/schemas/DiscoverCampaignsParams"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"responses": {
|
|
270
|
+
"200": {
|
|
271
|
+
"$ref": "#/components/responses/DiscoverCampaignsResponse"
|
|
272
|
+
},
|
|
273
|
+
"400": {
|
|
274
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
275
|
+
},
|
|
276
|
+
"500": {
|
|
277
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"/v1/target:match": {
|
|
283
|
+
"post": {
|
|
284
|
+
"operationId": "matchTargets",
|
|
285
|
+
"summary": "matchTargets",
|
|
286
|
+
"description": "Find targets from the provided list that include the provide entities.\n",
|
|
287
|
+
"tags": [
|
|
288
|
+
"Target"
|
|
289
|
+
],
|
|
290
|
+
"security": [
|
|
291
|
+
{
|
|
292
|
+
"EpilotAuth": []
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"requestBody": {
|
|
296
|
+
"required": true,
|
|
297
|
+
"content": {
|
|
298
|
+
"application/json": {
|
|
299
|
+
"schema": {
|
|
300
|
+
"$ref": "#/components/schemas/MatchTargetParams"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"responses": {
|
|
306
|
+
"200": {
|
|
307
|
+
"$ref": "#/components/responses/MatchTargetsResponse"
|
|
308
|
+
},
|
|
309
|
+
"400": {
|
|
310
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
311
|
+
},
|
|
312
|
+
"500": {
|
|
313
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"/v1/target/queries": {
|
|
319
|
+
"post": {
|
|
320
|
+
"operationId": "getTargetQueries",
|
|
321
|
+
"summary": "getTargetQueries",
|
|
322
|
+
"description": "Transform target filters into Lucene queries for the provided target IDs.\nReturns the transformed query string for each target along with any errors encountered.\n",
|
|
323
|
+
"tags": [
|
|
324
|
+
"Target"
|
|
325
|
+
],
|
|
326
|
+
"security": [
|
|
327
|
+
{
|
|
328
|
+
"EpilotAuth": []
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"requestBody": {
|
|
332
|
+
"required": true,
|
|
333
|
+
"content": {
|
|
334
|
+
"application/json": {
|
|
335
|
+
"schema": {
|
|
336
|
+
"$ref": "#/components/schemas/GetTargetQueriesParams"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"responses": {
|
|
342
|
+
"200": {
|
|
343
|
+
"$ref": "#/components/responses/GetTargetQueriesResponse"
|
|
344
|
+
},
|
|
345
|
+
"400": {
|
|
346
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
347
|
+
},
|
|
348
|
+
"500": {
|
|
349
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"/v1/campaign/{campaign_id}/recipient": {
|
|
355
|
+
"post": {
|
|
356
|
+
"operationId": "createRecipient",
|
|
357
|
+
"summary": "createRecipient",
|
|
358
|
+
"description": "Creates a new recipient associated with a campaign.",
|
|
359
|
+
"tags": [
|
|
360
|
+
"Campaign Recipient"
|
|
361
|
+
],
|
|
362
|
+
"security": [
|
|
363
|
+
{
|
|
364
|
+
"EpilotAuth": []
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"parameters": [
|
|
368
|
+
{
|
|
369
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"requestBody": {
|
|
373
|
+
"required": true,
|
|
374
|
+
"content": {
|
|
375
|
+
"application/json": {
|
|
376
|
+
"schema": {
|
|
377
|
+
"$ref": "#/components/schemas/CreateRecipientPayload"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"responses": {
|
|
383
|
+
"201": {
|
|
384
|
+
"$ref": "#/components/responses/RecipientResponse"
|
|
385
|
+
},
|
|
386
|
+
"400": {
|
|
387
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
388
|
+
},
|
|
389
|
+
"500": {
|
|
390
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"/v1/campaign/{campaign_id}/recipient/{recipient_id}": {
|
|
396
|
+
"patch": {
|
|
397
|
+
"operationId": "updateRecipient",
|
|
398
|
+
"summary": "updateRecipient",
|
|
399
|
+
"description": "Updates a recipient's attributes.",
|
|
400
|
+
"tags": [
|
|
401
|
+
"Campaign Recipient"
|
|
402
|
+
],
|
|
403
|
+
"security": [
|
|
404
|
+
{
|
|
405
|
+
"EpilotAuth": []
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
"parameters": [
|
|
409
|
+
{
|
|
410
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"$ref": "#/components/parameters/RecipientIdPathParam"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"requestBody": {
|
|
417
|
+
"required": true,
|
|
418
|
+
"content": {
|
|
419
|
+
"application/json": {
|
|
420
|
+
"schema": {
|
|
421
|
+
"$ref": "#/components/schemas/UpdateRecipientPayload"
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"responses": {
|
|
427
|
+
"200": {
|
|
428
|
+
"$ref": "#/components/responses/RecipientResponse"
|
|
429
|
+
},
|
|
430
|
+
"400": {
|
|
431
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
432
|
+
},
|
|
433
|
+
"500": {
|
|
434
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"/v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status": {
|
|
440
|
+
"patch": {
|
|
441
|
+
"operationId": "updateRecipientPortalStatus",
|
|
442
|
+
"summary": "updateRecipientPortalStatus",
|
|
443
|
+
"description": "Updates the portal status for a specific campaign recipient.\nThe portal_status_updated_at timestamp is automatically set when the status changes.\n\nStatus transition rules:\n- From 'sent': can change to 'seen', 'dismissed', or 'clicked'\n- From 'seen': can change to 'dismissed' or 'clicked'\n- From 'dismissed' or 'clicked': cannot be changed (final states)\n",
|
|
444
|
+
"tags": [
|
|
445
|
+
"Campaign Recipient"
|
|
446
|
+
],
|
|
447
|
+
"security": [
|
|
448
|
+
{
|
|
449
|
+
"EpilotAuth": []
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"parameters": [
|
|
453
|
+
{
|
|
454
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"$ref": "#/components/parameters/RecipientIdPathParam"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"requestBody": {
|
|
461
|
+
"required": true,
|
|
462
|
+
"content": {
|
|
463
|
+
"application/json": {
|
|
464
|
+
"schema": {
|
|
465
|
+
"$ref": "#/components/schemas/UpdatePortalStatusRequest"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"responses": {
|
|
471
|
+
"200": {
|
|
472
|
+
"$ref": "#/components/responses/RecipientResponse"
|
|
473
|
+
},
|
|
474
|
+
"400": {
|
|
475
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
476
|
+
},
|
|
477
|
+
"404": {
|
|
478
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
479
|
+
},
|
|
480
|
+
"409": {
|
|
481
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
482
|
+
},
|
|
483
|
+
"500": {
|
|
484
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"/v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status": {
|
|
490
|
+
"patch": {
|
|
491
|
+
"operationId": "updateRecipientEntityUiStatus",
|
|
492
|
+
"summary": "updateRecipientEntityUiStatus",
|
|
493
|
+
"description": "Records a Next Best Action interaction for a recipient on the Entity-UI channel.\n\nUnlike the portal channel, an NBA recipient is created lazily: the first `seen` creates\nthe recipient record (and requires `entity_schema`). `seen` is idempotent — re-viewing an\nNBA that is already seen/clicked/dismissed is a no-op success and never regresses the status.\n\nStatus transition rules:\n- `seen`: lazily creates the recipient; a no-op success if a status already exists\n- From `seen`: can change to `clicked` or `dismissed`\n- From `clicked`: can change to `dismissed`\n- From `dismissed`: cannot be changed via this operation — use `entity_ui:restore`\n\n`dismissed` and `clicked` require an existing recipient (404 otherwise, since an NBA is\nborn at `seen`) and reject invalid transitions (409).\n\nThe entity_ui_status_updated_at timestamp is automatically set when the status changes.\n",
|
|
494
|
+
"tags": [
|
|
495
|
+
"Campaign Recipient"
|
|
496
|
+
],
|
|
497
|
+
"security": [
|
|
498
|
+
{
|
|
499
|
+
"EpilotAuth": []
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
"parameters": [
|
|
503
|
+
{
|
|
504
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"$ref": "#/components/parameters/RecipientIdPathParam"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"requestBody": {
|
|
511
|
+
"required": true,
|
|
512
|
+
"content": {
|
|
513
|
+
"application/json": {
|
|
514
|
+
"schema": {
|
|
515
|
+
"$ref": "#/components/schemas/UpdateEntityUiStatusRequest"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"responses": {
|
|
521
|
+
"200": {
|
|
522
|
+
"$ref": "#/components/responses/RecipientResponse"
|
|
523
|
+
},
|
|
524
|
+
"400": {
|
|
525
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
526
|
+
},
|
|
527
|
+
"404": {
|
|
528
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
529
|
+
},
|
|
530
|
+
"409": {
|
|
531
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
532
|
+
},
|
|
533
|
+
"500": {
|
|
534
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"/v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:restore": {
|
|
540
|
+
"post": {
|
|
541
|
+
"operationId": "restoreRecipientEntityUiStatus",
|
|
542
|
+
"summary": "Undo a dismissal on the Entity-UI (Next Best Action) channel",
|
|
543
|
+
"description": "Reverses a dismissal so the Next Best Action becomes visible to the entity again. This is\nthe only way out of `dismissed` — `entity_ui:status` cannot leave that state.\n\nThe recipient's status is restored to whatever it was immediately before the dismissal\n(recorded in `entity_ui_status_before_dismiss`), so a `clicked` NBA that was dismissed\nreturns to `clicked` and does not lose its recorded click. Falls back to `seen` when no\nprevious status was recorded.\n\nScoped to the Entity-UI channel only: the recipient's portal and automation state is never\ntouched. Takes no request body — the recipient's current state fully determines the result.\n\nReturns 404 when the recipient has no Entity-UI status at all, and 409 when it has one but\nis not currently `dismissed` (there is nothing to undo).\n",
|
|
544
|
+
"tags": [
|
|
545
|
+
"Campaign Recipient"
|
|
546
|
+
],
|
|
547
|
+
"security": [
|
|
548
|
+
{
|
|
549
|
+
"EpilotAuth": []
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"parameters": [
|
|
553
|
+
{
|
|
554
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"$ref": "#/components/parameters/RecipientIdPathParam"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"responses": {
|
|
561
|
+
"200": {
|
|
562
|
+
"$ref": "#/components/responses/RecipientResponse"
|
|
563
|
+
},
|
|
564
|
+
"404": {
|
|
565
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
566
|
+
},
|
|
567
|
+
"409": {
|
|
568
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
569
|
+
},
|
|
570
|
+
"500": {
|
|
571
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"/v1/campaign/{campaign_id}/recipients": {
|
|
577
|
+
"get": {
|
|
578
|
+
"operationId": "getRecipients",
|
|
579
|
+
"summary": "getRecipients",
|
|
580
|
+
"description": "Get a paginated list of recipients for a campaign.",
|
|
581
|
+
"tags": [
|
|
582
|
+
"Campaign Recipient"
|
|
583
|
+
],
|
|
584
|
+
"security": [
|
|
585
|
+
{
|
|
586
|
+
"EpilotAuth": []
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"parameters": [
|
|
590
|
+
{
|
|
591
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "limit",
|
|
595
|
+
"in": "query",
|
|
596
|
+
"description": "Number of items to return",
|
|
597
|
+
"schema": {
|
|
598
|
+
"type": "integer",
|
|
599
|
+
"default": 25
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "next",
|
|
604
|
+
"in": "query",
|
|
605
|
+
"description": "Cursor for pagination",
|
|
606
|
+
"schema": {
|
|
607
|
+
"type": "string"
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "q",
|
|
612
|
+
"in": "query",
|
|
613
|
+
"description": "Search by recipient title",
|
|
614
|
+
"schema": {
|
|
615
|
+
"type": "string"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "automation_status",
|
|
620
|
+
"in": "query",
|
|
621
|
+
"description": "Filter by automation status. Repeat the parameter to match multiple\nstatuses in one request\n(e.g. automation_status=failed&automation_status=cancelled).\n",
|
|
622
|
+
"style": "form",
|
|
623
|
+
"explode": true,
|
|
624
|
+
"schema": {
|
|
625
|
+
"type": "array",
|
|
626
|
+
"items": {
|
|
627
|
+
"$ref": "#/components/schemas/AutomationStatus"
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "portal_status",
|
|
633
|
+
"in": "query",
|
|
634
|
+
"description": "Filter by portal status",
|
|
635
|
+
"schema": {
|
|
636
|
+
"$ref": "#/components/schemas/PortalStatus"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "email_status",
|
|
641
|
+
"in": "query",
|
|
642
|
+
"description": "Filter by email delivery status (e.g. bounced, delivered). The response total reflects the count for the filtered status.",
|
|
643
|
+
"schema": {
|
|
644
|
+
"$ref": "#/components/schemas/EmailStatus"
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
],
|
|
648
|
+
"responses": {
|
|
649
|
+
"200": {
|
|
650
|
+
"$ref": "#/components/responses/RecipientsResponse"
|
|
651
|
+
},
|
|
652
|
+
"400": {
|
|
653
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
654
|
+
},
|
|
655
|
+
"500": {
|
|
656
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"/v1/campaign/{campaign_id}/email-stats": {
|
|
662
|
+
"get": {
|
|
663
|
+
"operationId": "getEmailStats",
|
|
664
|
+
"summary": "getEmailStats",
|
|
665
|
+
"description": "Aggregate email delivery counts for a campaign, for the KPI summary on the campaign UI.\nCounts cover the email (automation) channel only; `total_emailed` is the number of\nrecipients with a recorded email status. `delivered` is derivable as\n`total_emailed - bounced - complained - failed`.\n",
|
|
666
|
+
"tags": [
|
|
667
|
+
"Campaign Recipient"
|
|
668
|
+
],
|
|
669
|
+
"security": [
|
|
670
|
+
{
|
|
671
|
+
"EpilotAuth": []
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
"parameters": [
|
|
675
|
+
{
|
|
676
|
+
"$ref": "#/components/parameters/CampaignIdPathParam"
|
|
677
|
+
}
|
|
678
|
+
],
|
|
679
|
+
"responses": {
|
|
680
|
+
"200": {
|
|
681
|
+
"$ref": "#/components/responses/EmailStatsResponse"
|
|
682
|
+
},
|
|
683
|
+
"400": {
|
|
684
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
685
|
+
},
|
|
686
|
+
"500": {
|
|
687
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"components": {
|
|
694
|
+
"schemas": {
|
|
695
|
+
"BaseError": {
|
|
696
|
+
"type": "object",
|
|
697
|
+
"properties": {
|
|
698
|
+
"status": {
|
|
699
|
+
"type": "integer",
|
|
700
|
+
"example": 404
|
|
701
|
+
},
|
|
702
|
+
"message": {
|
|
703
|
+
"type": "string",
|
|
704
|
+
"example": "Entity not found"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"required": [
|
|
708
|
+
"status",
|
|
709
|
+
"message"
|
|
710
|
+
]
|
|
711
|
+
},
|
|
712
|
+
"ServerError": {
|
|
713
|
+
"$ref": "#/components/schemas/BaseError"
|
|
714
|
+
},
|
|
715
|
+
"ClientError": {
|
|
716
|
+
"oneOf": [
|
|
717
|
+
{
|
|
718
|
+
"type": "object",
|
|
719
|
+
"title": "MessageError",
|
|
720
|
+
"description": "An error object containing a human-readable message.",
|
|
721
|
+
"properties": {
|
|
722
|
+
"message": {
|
|
723
|
+
"type": "string",
|
|
724
|
+
"description": "A descriptive error message.",
|
|
725
|
+
"example": "The provided input was invalid."
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"required": [
|
|
729
|
+
"message"
|
|
730
|
+
],
|
|
731
|
+
"additionalProperties": false
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"type": "object",
|
|
735
|
+
"title": "CodeError",
|
|
736
|
+
"description": "An error object containing a specific machine-readable error code.",
|
|
737
|
+
"properties": {
|
|
738
|
+
"code": {
|
|
739
|
+
"type": "string",
|
|
740
|
+
"description": "A specific machine-readable error code indicating a known error condition.",
|
|
741
|
+
"enum": [
|
|
742
|
+
"CAMPAIGN_NOT_FOUND",
|
|
743
|
+
"CAMPAIGN_HAS_NO_TARGET",
|
|
744
|
+
"CAMPAIGN_HAS_NO_DELIVERY_METHOD",
|
|
745
|
+
"INVALID_NEXT_BEST_ACTION",
|
|
746
|
+
"CAMPAIGN_HAS_JOB_IN_PROGRESS",
|
|
747
|
+
"CAMPAIGN_HAS_UNEXPECTED_STATUS",
|
|
748
|
+
"JOB_TOKEN_MISSING",
|
|
749
|
+
"TARGET_WITHOUT_FILTERS"
|
|
750
|
+
],
|
|
751
|
+
"example": "CAMPAIGN_NOT_FOUND"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"required": [
|
|
755
|
+
"code"
|
|
756
|
+
],
|
|
757
|
+
"additionalProperties": false
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"type": "object",
|
|
761
|
+
"title": "StatusedError",
|
|
762
|
+
"description": "An error object containing a message and an explicit status, typically from a more generic error handler.",
|
|
763
|
+
"properties": {
|
|
764
|
+
"error": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"description": "A descriptive error message.",
|
|
767
|
+
"example": "An unexpected error occurred during processing."
|
|
768
|
+
},
|
|
769
|
+
"status": {
|
|
770
|
+
"type": "integer",
|
|
771
|
+
"description": "An explicit status code in the body, often mirroring the HTTP status but provided for programmatic access.",
|
|
772
|
+
"example": 400
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"required": [
|
|
776
|
+
"error",
|
|
777
|
+
"status"
|
|
778
|
+
],
|
|
779
|
+
"additionalProperties": false
|
|
780
|
+
}
|
|
781
|
+
],
|
|
782
|
+
"description": "Describes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a 'message' field for general descriptive errors.\n2. `CodeError`: Contains a 'code' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains 'error' and 'status' fields.\nThe HTTP status code of the response itself (e.g., 400, 404, 409) will always indicate the overall error category.\n"
|
|
783
|
+
},
|
|
784
|
+
"BaseUUID": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"format": "uuid",
|
|
787
|
+
"example": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
|
|
788
|
+
},
|
|
789
|
+
"BaseNanoID": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"example": "xHcOoJCa07eysJ1GaQeSb"
|
|
792
|
+
},
|
|
793
|
+
"BaseTags": {
|
|
794
|
+
"type": "array",
|
|
795
|
+
"nullable": true,
|
|
796
|
+
"items": {
|
|
797
|
+
"type": "string"
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
"BaseRelation": {
|
|
801
|
+
"type": "object",
|
|
802
|
+
"properties": {
|
|
803
|
+
"$relation": {
|
|
804
|
+
"type": "array",
|
|
805
|
+
"items": {
|
|
806
|
+
"type": "object",
|
|
807
|
+
"properties": {
|
|
808
|
+
"entity_id": {
|
|
809
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
810
|
+
},
|
|
811
|
+
"_tags": {
|
|
812
|
+
"$ref": "#/components/schemas/BaseTags"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
"BaseSystemId": {
|
|
820
|
+
"type": "object",
|
|
821
|
+
"readOnly": true,
|
|
822
|
+
"properties": {
|
|
823
|
+
"_id": {
|
|
824
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"required": [
|
|
828
|
+
"_id"
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
"BaseEntityOwner": {
|
|
832
|
+
"description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
|
|
833
|
+
"type": "object",
|
|
834
|
+
"properties": {
|
|
835
|
+
"org_id": {
|
|
836
|
+
"type": "string",
|
|
837
|
+
"example": "123"
|
|
838
|
+
},
|
|
839
|
+
"user_id": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"example": "123"
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"required": [
|
|
845
|
+
"org_id"
|
|
846
|
+
]
|
|
847
|
+
},
|
|
848
|
+
"BaseEntityAcl": {
|
|
849
|
+
"type": "object",
|
|
850
|
+
"description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
|
|
851
|
+
"additionalProperties": true,
|
|
852
|
+
"readOnly": true,
|
|
853
|
+
"properties": {
|
|
854
|
+
"view": {
|
|
855
|
+
"type": "array",
|
|
856
|
+
"items": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"example": "org:456"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"edit": {
|
|
862
|
+
"type": "array",
|
|
863
|
+
"items": {
|
|
864
|
+
"type": "string",
|
|
865
|
+
"example": "org:456"
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
"delete": {
|
|
869
|
+
"type": "array",
|
|
870
|
+
"items": {
|
|
871
|
+
"type": "string",
|
|
872
|
+
"example": "org:456"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"BaseSystemFields": {
|
|
878
|
+
"type": "object",
|
|
879
|
+
"properties": {
|
|
880
|
+
"_id": {
|
|
881
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
882
|
+
},
|
|
883
|
+
"_org": {
|
|
884
|
+
"type": "string",
|
|
885
|
+
"description": "Organization Id the entity belongs to",
|
|
886
|
+
"readOnly": true
|
|
887
|
+
},
|
|
888
|
+
"_owners": {
|
|
889
|
+
"type": "array",
|
|
890
|
+
"readOnly": true,
|
|
891
|
+
"items": {
|
|
892
|
+
"$ref": "#/components/schemas/BaseEntityOwner"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"_schema": {
|
|
896
|
+
"readOnly": true,
|
|
897
|
+
"type": "string"
|
|
898
|
+
},
|
|
899
|
+
"_title": {
|
|
900
|
+
"readOnly": true,
|
|
901
|
+
"type": "string"
|
|
902
|
+
},
|
|
903
|
+
"_tags": {
|
|
904
|
+
"$ref": "#/components/schemas/BaseTags"
|
|
905
|
+
},
|
|
906
|
+
"_created_at": {
|
|
907
|
+
"readOnly": true,
|
|
908
|
+
"type": "string",
|
|
909
|
+
"format": "date-time"
|
|
910
|
+
},
|
|
911
|
+
"_updated_at": {
|
|
912
|
+
"readOnly": true,
|
|
913
|
+
"type": "string",
|
|
914
|
+
"format": "date-time"
|
|
915
|
+
},
|
|
916
|
+
"_acl": {
|
|
917
|
+
"$ref": "#/components/schemas/BaseEntityAcl"
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
"BaseSystemFieldsRequired": {
|
|
922
|
+
"type": "object",
|
|
923
|
+
"required": [
|
|
924
|
+
"_org",
|
|
925
|
+
"_owners",
|
|
926
|
+
"_schema",
|
|
927
|
+
"_title",
|
|
928
|
+
"_tags",
|
|
929
|
+
"_created_at",
|
|
930
|
+
"_updated_at",
|
|
931
|
+
"_acl"
|
|
932
|
+
]
|
|
933
|
+
},
|
|
934
|
+
"CampaignStatus": {
|
|
935
|
+
"type": "string",
|
|
936
|
+
"default": "draft",
|
|
937
|
+
"enum": [
|
|
938
|
+
"draft",
|
|
939
|
+
"activating",
|
|
940
|
+
"active",
|
|
941
|
+
"inactive"
|
|
942
|
+
]
|
|
943
|
+
},
|
|
944
|
+
"ExecutionSummaryItem": {
|
|
945
|
+
"type": "object",
|
|
946
|
+
"properties": {
|
|
947
|
+
"execution_id": {
|
|
948
|
+
"type": "string"
|
|
949
|
+
},
|
|
950
|
+
"execution_status": {
|
|
951
|
+
"type": "string"
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
"JobStatus": {
|
|
956
|
+
"type": "object",
|
|
957
|
+
"properties": {
|
|
958
|
+
"status": {
|
|
959
|
+
"type": "string",
|
|
960
|
+
"description": "The status of the automation job",
|
|
961
|
+
"enum": [
|
|
962
|
+
"queued",
|
|
963
|
+
"processing",
|
|
964
|
+
"finished",
|
|
965
|
+
"failed",
|
|
966
|
+
"cancelled",
|
|
967
|
+
"send_report"
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
"execution_summary": {
|
|
971
|
+
"type": "array",
|
|
972
|
+
"items": {
|
|
973
|
+
"$ref": "#/components/schemas/ExecutionSummaryItem"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"Campaign": {
|
|
979
|
+
"allOf": [
|
|
980
|
+
{
|
|
981
|
+
"$ref": "#/components/schemas/BaseSystemFields"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"type": "object",
|
|
985
|
+
"properties": {
|
|
986
|
+
"name": {
|
|
987
|
+
"type": "string"
|
|
988
|
+
},
|
|
989
|
+
"goal": {
|
|
990
|
+
"type": "string"
|
|
991
|
+
},
|
|
992
|
+
"status": {
|
|
993
|
+
"$ref": "#/components/schemas/CampaignStatus"
|
|
994
|
+
},
|
|
995
|
+
"start_date": {
|
|
996
|
+
"type": "string",
|
|
997
|
+
"format": "date"
|
|
998
|
+
},
|
|
999
|
+
"end_date": {
|
|
1000
|
+
"type": "string",
|
|
1001
|
+
"format": "date"
|
|
1002
|
+
},
|
|
1003
|
+
"flow_id": {
|
|
1004
|
+
"type": "string"
|
|
1005
|
+
},
|
|
1006
|
+
"job_id": {
|
|
1007
|
+
"type": "string"
|
|
1008
|
+
},
|
|
1009
|
+
"target": {
|
|
1010
|
+
"$ref": "#/components/schemas/BaseRelation"
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
]
|
|
1015
|
+
},
|
|
1016
|
+
"Target": {
|
|
1017
|
+
"allOf": [
|
|
1018
|
+
{
|
|
1019
|
+
"$ref": "#/components/schemas/BaseSystemFields"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"type": "object",
|
|
1023
|
+
"properties": {
|
|
1024
|
+
"name": {
|
|
1025
|
+
"type": "string"
|
|
1026
|
+
},
|
|
1027
|
+
"description": {
|
|
1028
|
+
"type": "string"
|
|
1029
|
+
},
|
|
1030
|
+
"entity_schema": {
|
|
1031
|
+
"type": "string"
|
|
1032
|
+
},
|
|
1033
|
+
"entity_filters": {
|
|
1034
|
+
"type": "object",
|
|
1035
|
+
"additionalProperties": true
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
]
|
|
1040
|
+
},
|
|
1041
|
+
"MatchCampaignParams": {
|
|
1042
|
+
"type": "object",
|
|
1043
|
+
"properties": {
|
|
1044
|
+
"entity_refs": {
|
|
1045
|
+
"type": "array",
|
|
1046
|
+
"description": "List of entities (e.g. Contacts or Contracts) that should be part of the campaign target.",
|
|
1047
|
+
"items": {
|
|
1048
|
+
"type": "object",
|
|
1049
|
+
"properties": {
|
|
1050
|
+
"entity_id": {
|
|
1051
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1052
|
+
},
|
|
1053
|
+
"entity_schema": {
|
|
1054
|
+
"type": "string"
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"required": [
|
|
1058
|
+
"entity_id",
|
|
1059
|
+
"entity_schema"
|
|
1060
|
+
],
|
|
1061
|
+
"additionalProperties": false
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"campaign_ids": {
|
|
1065
|
+
"type": "array",
|
|
1066
|
+
"description": "List of campaign IDs to check.",
|
|
1067
|
+
"items": {
|
|
1068
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1069
|
+
},
|
|
1070
|
+
"example": [
|
|
1071
|
+
"b8c01433-5556-4e2b-aad4-6f5348d1df84"
|
|
1072
|
+
],
|
|
1073
|
+
"minItems": 1,
|
|
1074
|
+
"maxItems": 100,
|
|
1075
|
+
"uniqueItems": true
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"required": [
|
|
1079
|
+
"entity_refs",
|
|
1080
|
+
"campaign_ids"
|
|
1081
|
+
],
|
|
1082
|
+
"additionalProperties": false
|
|
1083
|
+
},
|
|
1084
|
+
"NextBestAction": {
|
|
1085
|
+
"type": "object",
|
|
1086
|
+
"description": "A Next Best Action configured on a campaign's Entity-UI channel.\nThis is the canonical NBA contract shared by discovery (this API), authoring, and rendering.\nNBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.\n",
|
|
1087
|
+
"properties": {
|
|
1088
|
+
"category": {
|
|
1089
|
+
"type": "string",
|
|
1090
|
+
"maxLength": 30,
|
|
1091
|
+
"description": "Light category label shown above the title. Free-form text."
|
|
1092
|
+
},
|
|
1093
|
+
"icon": {
|
|
1094
|
+
"type": "object",
|
|
1095
|
+
"description": "Curated icon for the NBA.",
|
|
1096
|
+
"properties": {
|
|
1097
|
+
"name": {
|
|
1098
|
+
"type": "string",
|
|
1099
|
+
"description": "Icon name from \"@epilot360/icons\"."
|
|
1100
|
+
},
|
|
1101
|
+
"color": {
|
|
1102
|
+
"type": "string",
|
|
1103
|
+
"description": "Optional icon color."
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
"required": [
|
|
1107
|
+
"name"
|
|
1108
|
+
]
|
|
1109
|
+
},
|
|
1110
|
+
"title": {
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"maxLength": 60,
|
|
1113
|
+
"description": "Bold action title. Required. Supports `{{placeholders}}`."
|
|
1114
|
+
},
|
|
1115
|
+
"body": {
|
|
1116
|
+
"type": "string",
|
|
1117
|
+
"maxLength": 140,
|
|
1118
|
+
"description": "Optional description. Supports `{{placeholders}}` (incl. relative dates)."
|
|
1119
|
+
},
|
|
1120
|
+
"priority": {
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"enum": [
|
|
1123
|
+
"low",
|
|
1124
|
+
"medium",
|
|
1125
|
+
"high"
|
|
1126
|
+
],
|
|
1127
|
+
"default": "medium",
|
|
1128
|
+
"description": "Display priority. NBAs are shown highest-priority first."
|
|
1129
|
+
},
|
|
1130
|
+
"is_dismissable": {
|
|
1131
|
+
"type": "boolean",
|
|
1132
|
+
"default": true,
|
|
1133
|
+
"description": "Whether the agent can dismiss the NBA."
|
|
1134
|
+
},
|
|
1135
|
+
"cta": {
|
|
1136
|
+
"type": "object",
|
|
1137
|
+
"description": "The NBA's single call-to-action.",
|
|
1138
|
+
"properties": {
|
|
1139
|
+
"type": {
|
|
1140
|
+
"type": "string",
|
|
1141
|
+
"enum": [
|
|
1142
|
+
"journey",
|
|
1143
|
+
"workflow",
|
|
1144
|
+
"flow"
|
|
1145
|
+
]
|
|
1146
|
+
},
|
|
1147
|
+
"target": {
|
|
1148
|
+
"type": "string",
|
|
1149
|
+
"description": "Journey id, workflow definition id, or flow template id, depending on `type`."
|
|
1150
|
+
},
|
|
1151
|
+
"context_params": {
|
|
1152
|
+
"type": "array",
|
|
1153
|
+
"description": "Journey context parameters (journey CTA only). Maps the journey's declared\ncontext parameters so the journey knows which entity it is about. Discovery\nreturns them verbatim; they are passed to the journey when it launches.\n",
|
|
1154
|
+
"items": {
|
|
1155
|
+
"type": "object",
|
|
1156
|
+
"properties": {
|
|
1157
|
+
"key": {
|
|
1158
|
+
"type": "string"
|
|
1159
|
+
},
|
|
1160
|
+
"value": {
|
|
1161
|
+
"type": "string"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"required": [
|
|
1165
|
+
"key",
|
|
1166
|
+
"value"
|
|
1167
|
+
]
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
"required": [
|
|
1172
|
+
"type",
|
|
1173
|
+
"target"
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
"required": [
|
|
1178
|
+
"title",
|
|
1179
|
+
"cta"
|
|
1180
|
+
]
|
|
1181
|
+
},
|
|
1182
|
+
"DiscoverCampaignsParams": {
|
|
1183
|
+
"type": "object",
|
|
1184
|
+
"properties": {
|
|
1185
|
+
"entity_id": {
|
|
1186
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1187
|
+
},
|
|
1188
|
+
"entity_schema": {
|
|
1189
|
+
"type": "string",
|
|
1190
|
+
"description": "The schema slug of the entity (e.g. \"contact\" or \"account\")."
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
"required": [
|
|
1194
|
+
"entity_id",
|
|
1195
|
+
"entity_schema"
|
|
1196
|
+
],
|
|
1197
|
+
"additionalProperties": false
|
|
1198
|
+
},
|
|
1199
|
+
"DiscoverResult": {
|
|
1200
|
+
"type": "object",
|
|
1201
|
+
"description": "One discovered Next Best Action, plus this entity's interaction state for it.",
|
|
1202
|
+
"properties": {
|
|
1203
|
+
"campaign_id": {
|
|
1204
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1205
|
+
},
|
|
1206
|
+
"nba": {
|
|
1207
|
+
"$ref": "#/components/schemas/NextBestAction"
|
|
1208
|
+
},
|
|
1209
|
+
"status": {
|
|
1210
|
+
"allOf": [
|
|
1211
|
+
{
|
|
1212
|
+
"$ref": "#/components/schemas/EntityUiStatus"
|
|
1213
|
+
}
|
|
1214
|
+
],
|
|
1215
|
+
"description": "The recipient's current Entity-UI status for this campaign, present only when a\nrecipient record already exists (i.e. the entity has previously seen, clicked or\ndismissed this NBA). Absent when the entity has not yet interacted with it.\n\nIn `results` this is only ever `seen` or `clicked`; in `dismissed` it is always\n`dismissed`. Lets the client skip a redundant `seen` call for NBAs already seen.\n"
|
|
1216
|
+
},
|
|
1217
|
+
"status_updated_at": {
|
|
1218
|
+
"type": "string",
|
|
1219
|
+
"format": "date-time",
|
|
1220
|
+
"description": "When `status` was last written. Present whenever `status` is. Lets the client show how\nlong ago an NBA was dismissed.\n"
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
"required": [
|
|
1224
|
+
"campaign_id",
|
|
1225
|
+
"nba"
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
"MatchTargetParams": {
|
|
1229
|
+
"type": "object",
|
|
1230
|
+
"properties": {
|
|
1231
|
+
"entity_refs": {
|
|
1232
|
+
"type": "array",
|
|
1233
|
+
"description": "List of entities (e.g. Contacts or Contracts) that should be part of the targets.",
|
|
1234
|
+
"items": {
|
|
1235
|
+
"type": "object",
|
|
1236
|
+
"properties": {
|
|
1237
|
+
"entity_id": {
|
|
1238
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1239
|
+
},
|
|
1240
|
+
"entity_schema": {
|
|
1241
|
+
"type": "string"
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"required": [
|
|
1245
|
+
"entity_id",
|
|
1246
|
+
"entity_schema"
|
|
1247
|
+
],
|
|
1248
|
+
"additionalProperties": false
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"target_ids": {
|
|
1252
|
+
"type": "array",
|
|
1253
|
+
"description": "List of target IDs to check.",
|
|
1254
|
+
"items": {
|
|
1255
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1256
|
+
},
|
|
1257
|
+
"example": [
|
|
1258
|
+
"b8c01433-5556-4e2b-aad4-6f5348d1df84"
|
|
1259
|
+
],
|
|
1260
|
+
"minItems": 1,
|
|
1261
|
+
"maxItems": 100,
|
|
1262
|
+
"uniqueItems": true
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
"required": [
|
|
1266
|
+
"entity_refs",
|
|
1267
|
+
"target_ids"
|
|
1268
|
+
],
|
|
1269
|
+
"additionalProperties": false
|
|
1270
|
+
},
|
|
1271
|
+
"GetTargetQueriesParams": {
|
|
1272
|
+
"type": "object",
|
|
1273
|
+
"properties": {
|
|
1274
|
+
"target_ids": {
|
|
1275
|
+
"type": "array",
|
|
1276
|
+
"description": "List of target IDs to transform into queries.",
|
|
1277
|
+
"items": {
|
|
1278
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1279
|
+
},
|
|
1280
|
+
"example": [
|
|
1281
|
+
"b8c01433-5556-4e2b-aad4-6f5348d1df84"
|
|
1282
|
+
],
|
|
1283
|
+
"minItems": 1,
|
|
1284
|
+
"uniqueItems": true
|
|
1285
|
+
}
|
|
1286
|
+
},
|
|
1287
|
+
"required": [
|
|
1288
|
+
"target_ids"
|
|
1289
|
+
],
|
|
1290
|
+
"additionalProperties": false
|
|
1291
|
+
},
|
|
1292
|
+
"TargetQueryResult": {
|
|
1293
|
+
"type": "object",
|
|
1294
|
+
"properties": {
|
|
1295
|
+
"target_id": {
|
|
1296
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1297
|
+
},
|
|
1298
|
+
"query": {
|
|
1299
|
+
"type": "string",
|
|
1300
|
+
"description": "Transformed query string, or null if transformation failed.",
|
|
1301
|
+
"nullable": true
|
|
1302
|
+
},
|
|
1303
|
+
"error": {
|
|
1304
|
+
"type": "string",
|
|
1305
|
+
"description": "Error message if query transformation failed."
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"required": [
|
|
1309
|
+
"target_id",
|
|
1310
|
+
"query"
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
"AutomationStatus": {
|
|
1314
|
+
"type": "string",
|
|
1315
|
+
"enum": [
|
|
1316
|
+
"pending",
|
|
1317
|
+
"in_progress",
|
|
1318
|
+
"success",
|
|
1319
|
+
"failed",
|
|
1320
|
+
"cancelled"
|
|
1321
|
+
]
|
|
1322
|
+
},
|
|
1323
|
+
"PortalStatus": {
|
|
1324
|
+
"type": "string",
|
|
1325
|
+
"enum": [
|
|
1326
|
+
"sent",
|
|
1327
|
+
"seen",
|
|
1328
|
+
"dismissed",
|
|
1329
|
+
"clicked"
|
|
1330
|
+
]
|
|
1331
|
+
},
|
|
1332
|
+
"EntityUiStatus": {
|
|
1333
|
+
"type": "string",
|
|
1334
|
+
"description": "Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal\nchannel there is no `sent` state: an NBA recipient is born at `seen`, the moment the\naction is first rendered to an agent.\n",
|
|
1335
|
+
"enum": [
|
|
1336
|
+
"seen",
|
|
1337
|
+
"dismissed",
|
|
1338
|
+
"clicked"
|
|
1339
|
+
]
|
|
1340
|
+
},
|
|
1341
|
+
"EmailStatus": {
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"description": "Delivery status of the email a campaign's automation sends to a recipient. Set to `sent`\nonce the automation hands the email off, then updated asynchronously as SES notifications\narrive (`bounced` / `complained`; an SES Reject maps to `bounced`). `failed` is a send-time\nfailure (the automation execution could not send at all), distinct from an asynchronous\nbounce. `delivered` is reserved for when Delivery events are published.\n",
|
|
1344
|
+
"enum": [
|
|
1345
|
+
"sent",
|
|
1346
|
+
"delivered",
|
|
1347
|
+
"bounced",
|
|
1348
|
+
"complained",
|
|
1349
|
+
"failed"
|
|
1350
|
+
]
|
|
1351
|
+
},
|
|
1352
|
+
"EmailBounceType": {
|
|
1353
|
+
"type": "string",
|
|
1354
|
+
"description": "SES bounce classification: `permanent` (hard) or `transient` (soft).",
|
|
1355
|
+
"enum": [
|
|
1356
|
+
"permanent",
|
|
1357
|
+
"transient"
|
|
1358
|
+
]
|
|
1359
|
+
},
|
|
1360
|
+
"Recipient": {
|
|
1361
|
+
"type": "object",
|
|
1362
|
+
"properties": {
|
|
1363
|
+
"entity_id": {
|
|
1364
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1365
|
+
},
|
|
1366
|
+
"entity_schema": {
|
|
1367
|
+
"type": "string"
|
|
1368
|
+
},
|
|
1369
|
+
"title": {
|
|
1370
|
+
"type": "string"
|
|
1371
|
+
},
|
|
1372
|
+
"automation_status": {
|
|
1373
|
+
"$ref": "#/components/schemas/AutomationStatus"
|
|
1374
|
+
},
|
|
1375
|
+
"automation_execution_id": {
|
|
1376
|
+
"type": "string"
|
|
1377
|
+
},
|
|
1378
|
+
"portal_status": {
|
|
1379
|
+
"$ref": "#/components/schemas/PortalStatus"
|
|
1380
|
+
},
|
|
1381
|
+
"portal_status_updated_at": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"format": "date-time"
|
|
1384
|
+
},
|
|
1385
|
+
"portal_state": {
|
|
1386
|
+
"type": "object",
|
|
1387
|
+
"additionalProperties": true
|
|
1388
|
+
},
|
|
1389
|
+
"entity_ui_status": {
|
|
1390
|
+
"$ref": "#/components/schemas/EntityUiStatus"
|
|
1391
|
+
},
|
|
1392
|
+
"entity_ui_status_updated_at": {
|
|
1393
|
+
"type": "string",
|
|
1394
|
+
"format": "date-time"
|
|
1395
|
+
},
|
|
1396
|
+
"entity_ui_status_before_dismiss": {
|
|
1397
|
+
"allOf": [
|
|
1398
|
+
{
|
|
1399
|
+
"$ref": "#/components/schemas/EntityUiStatus"
|
|
1400
|
+
}
|
|
1401
|
+
],
|
|
1402
|
+
"description": "The Entity-UI status the recipient held immediately before it was dismissed, so\n`entity_ui:restore` can put it back without losing a recorded click.\n\nServer-managed — never send this from a client; it is ignored on write. Meaningful\n**only while** `entity_ui_status` is `dismissed`: a restore intentionally leaves the\nvalue behind rather than clearing it, so a stale value after a restore is expected and\nmust not be read.\n"
|
|
1403
|
+
},
|
|
1404
|
+
"message_entity_id": {
|
|
1405
|
+
"type": "string",
|
|
1406
|
+
"description": "The message entity id of the email sent to this recipient by the campaign's automation\n(not the SES/provider message id), used to correlate SES delivery notifications back to\nthe recipient. Server-managed.\n"
|
|
1407
|
+
},
|
|
1408
|
+
"email_status": {
|
|
1409
|
+
"$ref": "#/components/schemas/EmailStatus"
|
|
1410
|
+
},
|
|
1411
|
+
"email_status_updated_at": {
|
|
1412
|
+
"type": "string",
|
|
1413
|
+
"format": "date-time"
|
|
1414
|
+
},
|
|
1415
|
+
"email_bounce_type": {
|
|
1416
|
+
"$ref": "#/components/schemas/EmailBounceType"
|
|
1417
|
+
},
|
|
1418
|
+
"email_bounce_subtype": {
|
|
1419
|
+
"type": "string",
|
|
1420
|
+
"description": "SES bounce sub-type (e.g. `General`, `NoEmail`, `MailboxFull`)."
|
|
1421
|
+
},
|
|
1422
|
+
"email_complaint_type": {
|
|
1423
|
+
"type": "string",
|
|
1424
|
+
"description": "SES complaint feedback type (e.g. `abuse`, `fraud`), set for complaints."
|
|
1425
|
+
},
|
|
1426
|
+
"email_bounce_reason": {
|
|
1427
|
+
"type": "string",
|
|
1428
|
+
"description": "Human-readable failure reason — the SES bounce `diagnosticCode`, the complaint\nfeedback type, or a send-time error message.\n"
|
|
1429
|
+
},
|
|
1430
|
+
"email_send_error": {
|
|
1431
|
+
"type": "object",
|
|
1432
|
+
"additionalProperties": true,
|
|
1433
|
+
"description": "The raw SES notification (or send error) kept verbatim for a detail view."
|
|
1434
|
+
},
|
|
1435
|
+
"email_unsubscribed_at": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"format": "date-time",
|
|
1438
|
+
"description": "When the contact unsubscribed from email marketing (opted out). Server-managed."
|
|
1439
|
+
},
|
|
1440
|
+
"updated_at": {
|
|
1441
|
+
"type": "string",
|
|
1442
|
+
"format": "date-time"
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
"BaseRecipientPayload": {
|
|
1447
|
+
"type": "object",
|
|
1448
|
+
"properties": {
|
|
1449
|
+
"entity_id": {
|
|
1450
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1451
|
+
},
|
|
1452
|
+
"entity_schema": {
|
|
1453
|
+
"type": "string"
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"required": [
|
|
1457
|
+
"entity_id",
|
|
1458
|
+
"entity_schema"
|
|
1459
|
+
]
|
|
1460
|
+
},
|
|
1461
|
+
"AutomationRecipientPayload": {
|
|
1462
|
+
"type": "object",
|
|
1463
|
+
"properties": {
|
|
1464
|
+
"automation_status": {
|
|
1465
|
+
"$ref": "#/components/schemas/AutomationStatus"
|
|
1466
|
+
},
|
|
1467
|
+
"automation_execution_id": {
|
|
1468
|
+
"type": "string"
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
"required": [
|
|
1472
|
+
"automation_status",
|
|
1473
|
+
"automation_execution_id"
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
"PortalRecipientPayload": {
|
|
1477
|
+
"type": "object",
|
|
1478
|
+
"properties": {
|
|
1479
|
+
"portal_status": {
|
|
1480
|
+
"$ref": "#/components/schemas/PortalStatus"
|
|
1481
|
+
},
|
|
1482
|
+
"portal_state": {
|
|
1483
|
+
"type": "object",
|
|
1484
|
+
"additionalProperties": true
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
"required": [
|
|
1488
|
+
"portal_status"
|
|
1489
|
+
]
|
|
1490
|
+
},
|
|
1491
|
+
"CreateRecipientPayload": {
|
|
1492
|
+
"oneOf": [
|
|
1493
|
+
{
|
|
1494
|
+
"allOf": [
|
|
1495
|
+
{
|
|
1496
|
+
"$ref": "#/components/schemas/BaseRecipientPayload"
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"$ref": "#/components/schemas/AutomationRecipientPayload"
|
|
1500
|
+
}
|
|
1501
|
+
]
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"allOf": [
|
|
1505
|
+
{
|
|
1506
|
+
"$ref": "#/components/schemas/BaseRecipientPayload"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"$ref": "#/components/schemas/PortalRecipientPayload"
|
|
1510
|
+
}
|
|
1511
|
+
]
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
"allOf": [
|
|
1515
|
+
{
|
|
1516
|
+
"$ref": "#/components/schemas/BaseRecipientPayload"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"$ref": "#/components/schemas/AutomationRecipientPayload"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"$ref": "#/components/schemas/PortalRecipientPayload"
|
|
1523
|
+
}
|
|
1524
|
+
]
|
|
1525
|
+
}
|
|
1526
|
+
]
|
|
1527
|
+
},
|
|
1528
|
+
"UpdateRecipientPayload": {
|
|
1529
|
+
"type": "object",
|
|
1530
|
+
"properties": {
|
|
1531
|
+
"automation_status": {
|
|
1532
|
+
"$ref": "#/components/schemas/AutomationStatus"
|
|
1533
|
+
},
|
|
1534
|
+
"automation_execution_id": {
|
|
1535
|
+
"type": "string"
|
|
1536
|
+
},
|
|
1537
|
+
"portal_status": {
|
|
1538
|
+
"$ref": "#/components/schemas/PortalStatus"
|
|
1539
|
+
},
|
|
1540
|
+
"portal_state": {
|
|
1541
|
+
"type": "object",
|
|
1542
|
+
"additionalProperties": true
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
"RetriggerAutomationsRequest": {
|
|
1547
|
+
"type": "object",
|
|
1548
|
+
"properties": {
|
|
1549
|
+
"recipient_ids": {
|
|
1550
|
+
"type": "array",
|
|
1551
|
+
"description": "List of recipient IDs to retrigger automations for",
|
|
1552
|
+
"items": {
|
|
1553
|
+
"type": "string",
|
|
1554
|
+
"format": "uuid"
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
"required": [
|
|
1559
|
+
"recipient_ids"
|
|
1560
|
+
]
|
|
1561
|
+
},
|
|
1562
|
+
"RetriggerAutomationsResult": {
|
|
1563
|
+
"type": "object",
|
|
1564
|
+
"properties": {
|
|
1565
|
+
"recipient_id": {
|
|
1566
|
+
"type": "string",
|
|
1567
|
+
"format": "uuid",
|
|
1568
|
+
"description": "The ID of the recipient"
|
|
1569
|
+
},
|
|
1570
|
+
"result": {
|
|
1571
|
+
"type": "string",
|
|
1572
|
+
"description": "The result of the retriggering operation",
|
|
1573
|
+
"enum": [
|
|
1574
|
+
"success",
|
|
1575
|
+
"failure",
|
|
1576
|
+
"not_found",
|
|
1577
|
+
"invalid_status"
|
|
1578
|
+
]
|
|
1579
|
+
},
|
|
1580
|
+
"execution_id": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"description": "The ID of the new automation execution (if successful)"
|
|
1583
|
+
},
|
|
1584
|
+
"error": {
|
|
1585
|
+
"type": "string",
|
|
1586
|
+
"description": "The error message if the operation failed"
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
"required": [
|
|
1590
|
+
"recipient_id",
|
|
1591
|
+
"result"
|
|
1592
|
+
]
|
|
1593
|
+
},
|
|
1594
|
+
"UpdatePortalStatusRequest": {
|
|
1595
|
+
"type": "object",
|
|
1596
|
+
"properties": {
|
|
1597
|
+
"status": {
|
|
1598
|
+
"$ref": "#/components/schemas/PortalStatus"
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"required": [
|
|
1602
|
+
"status"
|
|
1603
|
+
]
|
|
1604
|
+
},
|
|
1605
|
+
"UpdateEntityUiStatusRequest": {
|
|
1606
|
+
"type": "object",
|
|
1607
|
+
"properties": {
|
|
1608
|
+
"status": {
|
|
1609
|
+
"$ref": "#/components/schemas/EntityUiStatus"
|
|
1610
|
+
},
|
|
1611
|
+
"entity_schema": {
|
|
1612
|
+
"type": "string",
|
|
1613
|
+
"description": "Schema slug of the recipient entity (e.g. \"contact\"). Required when recording the\nfirst `seen`, which lazily creates the recipient record; ignored on later transitions.\n"
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
"required": [
|
|
1617
|
+
"status"
|
|
1618
|
+
],
|
|
1619
|
+
"additionalProperties": false
|
|
1620
|
+
},
|
|
1621
|
+
"SetupCampaignRequest": {
|
|
1622
|
+
"description": "Discriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n",
|
|
1623
|
+
"oneOf": [
|
|
1624
|
+
{
|
|
1625
|
+
"$ref": "#/components/schemas/SetupTariffChangeCampaignRequest"
|
|
1626
|
+
}
|
|
1627
|
+
],
|
|
1628
|
+
"discriminator": {
|
|
1629
|
+
"propertyName": "type",
|
|
1630
|
+
"mapping": {
|
|
1631
|
+
"tariff_change": "#/components/schemas/SetupTariffChangeCampaignRequest"
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
"SetupTariffChangeCampaignRequest": {
|
|
1636
|
+
"type": "object",
|
|
1637
|
+
"properties": {
|
|
1638
|
+
"type": {
|
|
1639
|
+
"type": "string",
|
|
1640
|
+
"enum": [
|
|
1641
|
+
"tariff_change"
|
|
1642
|
+
]
|
|
1643
|
+
},
|
|
1644
|
+
"product_recommendation": {
|
|
1645
|
+
"type": "object",
|
|
1646
|
+
"properties": {
|
|
1647
|
+
"name": {
|
|
1648
|
+
"type": "string",
|
|
1649
|
+
"description": "Optional name of the product recommendation. Defaults to the campaign name."
|
|
1650
|
+
},
|
|
1651
|
+
"source_product_id": {
|
|
1652
|
+
"allOf": [
|
|
1653
|
+
{
|
|
1654
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1655
|
+
}
|
|
1656
|
+
],
|
|
1657
|
+
"description": "Optional source product entity ID for the recommendation."
|
|
1658
|
+
},
|
|
1659
|
+
"source_price_id": {
|
|
1660
|
+
"allOf": [
|
|
1661
|
+
{
|
|
1662
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1663
|
+
}
|
|
1664
|
+
],
|
|
1665
|
+
"description": "Optional source price entity ID for the recommendation."
|
|
1666
|
+
},
|
|
1667
|
+
"offers": {
|
|
1668
|
+
"type": "array",
|
|
1669
|
+
"description": "Offer blocks for the product_recommendation entity.",
|
|
1670
|
+
"items": {
|
|
1671
|
+
"type": "object",
|
|
1672
|
+
"properties": {
|
|
1673
|
+
"target_id": {
|
|
1674
|
+
"$ref": "#/components/schemas/BaseUUID",
|
|
1675
|
+
"description": "Optional per-offer target entity ID."
|
|
1676
|
+
},
|
|
1677
|
+
"items": {
|
|
1678
|
+
"type": "array",
|
|
1679
|
+
"description": "Product/price pairs within this offer.",
|
|
1680
|
+
"items": {
|
|
1681
|
+
"type": "object",
|
|
1682
|
+
"properties": {
|
|
1683
|
+
"product_id": {
|
|
1684
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1685
|
+
},
|
|
1686
|
+
"price_id": {
|
|
1687
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1688
|
+
},
|
|
1689
|
+
"highlight_config": {
|
|
1690
|
+
"type": "object",
|
|
1691
|
+
"description": "Opaque per-item highlight/comparison config persisted as-is on the entity.",
|
|
1692
|
+
"additionalProperties": true
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
"required": [
|
|
1696
|
+
"product_id",
|
|
1697
|
+
"price_id"
|
|
1698
|
+
],
|
|
1699
|
+
"additionalProperties": false
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"required": [
|
|
1704
|
+
"items"
|
|
1705
|
+
],
|
|
1706
|
+
"additionalProperties": false
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
"additionalProperties": false
|
|
1711
|
+
},
|
|
1712
|
+
"campaign": {
|
|
1713
|
+
"type": "object",
|
|
1714
|
+
"properties": {
|
|
1715
|
+
"name": {
|
|
1716
|
+
"type": "string"
|
|
1717
|
+
},
|
|
1718
|
+
"goal": {
|
|
1719
|
+
"type": "string"
|
|
1720
|
+
},
|
|
1721
|
+
"target_ids": {
|
|
1722
|
+
"type": "array",
|
|
1723
|
+
"description": "List of target entity IDs to attach to the campaign. Today only a single\nentry is supported (campaign.target is has_one) but the array shape is kept\nfor forward-compatibility — only `target_ids[0]` is used.\n",
|
|
1724
|
+
"items": {
|
|
1725
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
"required": [
|
|
1730
|
+
"name",
|
|
1731
|
+
"target_ids"
|
|
1732
|
+
],
|
|
1733
|
+
"additionalProperties": false
|
|
1734
|
+
},
|
|
1735
|
+
"journey": {
|
|
1736
|
+
"type": "object",
|
|
1737
|
+
"description": "Optional journey configuration selected in the wizard. Only sent by the\nconsumer once a journey has been chosen.\n",
|
|
1738
|
+
"properties": {
|
|
1739
|
+
"journey_id": {
|
|
1740
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
"required": [
|
|
1744
|
+
"journey_id"
|
|
1745
|
+
],
|
|
1746
|
+
"additionalProperties": false
|
|
1747
|
+
},
|
|
1748
|
+
"channels": {
|
|
1749
|
+
"type": "object",
|
|
1750
|
+
"description": "Optional delivery channel configuration. Each channel is only sent by the\nconsumer once it has been enabled and fully configured in the wizard.\n",
|
|
1751
|
+
"properties": {
|
|
1752
|
+
"portal_widget": {
|
|
1753
|
+
"type": "object",
|
|
1754
|
+
"description": "Portal widget placement for the product recommendation block. Only sent by\nthe consumer once both a portal and a block have been selected.\n",
|
|
1755
|
+
"properties": {
|
|
1756
|
+
"portal_id": {
|
|
1757
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1758
|
+
},
|
|
1759
|
+
"block_id": {
|
|
1760
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
"required": [
|
|
1764
|
+
"portal_id",
|
|
1765
|
+
"block_id"
|
|
1766
|
+
],
|
|
1767
|
+
"additionalProperties": false
|
|
1768
|
+
},
|
|
1769
|
+
"email": {
|
|
1770
|
+
"type": "object",
|
|
1771
|
+
"description": "Email campaign delivery. An automation flow (legacy) and/or an email\ntemplate can be provided to send the campaign emails. The selection is\npersisted as the campaign's `flow_id`. If `automation_id` is provided it is\nused as-is; otherwise a flow is created from `template_id`. Only sent by the\nconsumer once one has been selected.\n",
|
|
1772
|
+
"properties": {
|
|
1773
|
+
"automation_id": {
|
|
1774
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1775
|
+
},
|
|
1776
|
+
"template_id": {
|
|
1777
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
"minProperties": 1,
|
|
1781
|
+
"additionalProperties": false
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
"additionalProperties": false
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
"required": [
|
|
1788
|
+
"type",
|
|
1789
|
+
"product_recommendation",
|
|
1790
|
+
"campaign"
|
|
1791
|
+
],
|
|
1792
|
+
"additionalProperties": false
|
|
1793
|
+
},
|
|
1794
|
+
"SetupTariffChangeCampaignResponse": {
|
|
1795
|
+
"type": "object",
|
|
1796
|
+
"properties": {
|
|
1797
|
+
"type": {
|
|
1798
|
+
"type": "string",
|
|
1799
|
+
"enum": [
|
|
1800
|
+
"tariff_change"
|
|
1801
|
+
]
|
|
1802
|
+
},
|
|
1803
|
+
"product_recommendation_id": {
|
|
1804
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1805
|
+
},
|
|
1806
|
+
"campaign_id": {
|
|
1807
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1808
|
+
},
|
|
1809
|
+
"journey_id": {
|
|
1810
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1811
|
+
},
|
|
1812
|
+
"portal_widget_id": {
|
|
1813
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
"required": [
|
|
1817
|
+
"type",
|
|
1818
|
+
"product_recommendation_id",
|
|
1819
|
+
"campaign_id"
|
|
1820
|
+
],
|
|
1821
|
+
"additionalProperties": false
|
|
1822
|
+
}
|
|
1823
|
+
},
|
|
1824
|
+
"securitySchemes": {
|
|
1825
|
+
"EpilotAuth": {
|
|
1826
|
+
"type": "http",
|
|
1827
|
+
"scheme": "bearer",
|
|
1828
|
+
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
1829
|
+
"bearerFormat": "JWT"
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
"parameters": {
|
|
1833
|
+
"CampaignIdPathParam": {
|
|
1834
|
+
"name": "campaign_id",
|
|
1835
|
+
"description": "The campaign ID",
|
|
1836
|
+
"in": "path",
|
|
1837
|
+
"required": true,
|
|
1838
|
+
"schema": {
|
|
1839
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
"RecipientIdPathParam": {
|
|
1843
|
+
"name": "recipient_id",
|
|
1844
|
+
"description": "The entity ID of the recipient",
|
|
1845
|
+
"in": "path",
|
|
1846
|
+
"required": true,
|
|
1847
|
+
"schema": {
|
|
1848
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
"responses": {
|
|
1853
|
+
"ClientErrorResponse": {
|
|
1854
|
+
"description": "Any error based on client data errors",
|
|
1855
|
+
"content": {
|
|
1856
|
+
"application/json": {
|
|
1857
|
+
"schema": {
|
|
1858
|
+
"$ref": "#/components/schemas/ClientError"
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"ServerErrorResponse": {
|
|
1864
|
+
"description": "Any error based on the server-side",
|
|
1865
|
+
"content": {
|
|
1866
|
+
"application/json": {
|
|
1867
|
+
"schema": {
|
|
1868
|
+
"$ref": "#/components/schemas/ServerError"
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
},
|
|
1873
|
+
"CampaignResponse": {
|
|
1874
|
+
"description": "Campaign entity response",
|
|
1875
|
+
"content": {
|
|
1876
|
+
"application/json": {
|
|
1877
|
+
"schema": {
|
|
1878
|
+
"type": "object",
|
|
1879
|
+
"properties": {
|
|
1880
|
+
"campaign": {
|
|
1881
|
+
"$ref": "#/components/schemas/Campaign"
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
},
|
|
1888
|
+
"JobStatusResponse": {
|
|
1889
|
+
"description": "Campaign job status response",
|
|
1890
|
+
"content": {
|
|
1891
|
+
"application/json": {
|
|
1892
|
+
"schema": {
|
|
1893
|
+
"$ref": "#/components/schemas/JobStatus"
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
"RecipientResponse": {
|
|
1899
|
+
"description": "Recipient response",
|
|
1900
|
+
"content": {
|
|
1901
|
+
"application/json": {
|
|
1902
|
+
"schema": {
|
|
1903
|
+
"$ref": "#/components/schemas/Recipient"
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
"RecipientsResponse": {
|
|
1909
|
+
"description": "List of campaign recipients",
|
|
1910
|
+
"content": {
|
|
1911
|
+
"application/json": {
|
|
1912
|
+
"schema": {
|
|
1913
|
+
"type": "object",
|
|
1914
|
+
"properties": {
|
|
1915
|
+
"results": {
|
|
1916
|
+
"type": "array",
|
|
1917
|
+
"items": {
|
|
1918
|
+
"$ref": "#/components/schemas/Recipient"
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
"next": {
|
|
1922
|
+
"type": "string",
|
|
1923
|
+
"nullable": true,
|
|
1924
|
+
"description": "Cursor for next page of results"
|
|
1925
|
+
},
|
|
1926
|
+
"total": {
|
|
1927
|
+
"type": "integer",
|
|
1928
|
+
"description": "Total number of recipients"
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
"EmailStatsResponse": {
|
|
1936
|
+
"description": "Aggregate email delivery counts for a campaign.",
|
|
1937
|
+
"content": {
|
|
1938
|
+
"application/json": {
|
|
1939
|
+
"schema": {
|
|
1940
|
+
"type": "object",
|
|
1941
|
+
"required": [
|
|
1942
|
+
"total_emailed",
|
|
1943
|
+
"sent",
|
|
1944
|
+
"delivered",
|
|
1945
|
+
"bounced",
|
|
1946
|
+
"bounced_hard",
|
|
1947
|
+
"bounced_soft",
|
|
1948
|
+
"complained",
|
|
1949
|
+
"failed",
|
|
1950
|
+
"unsubscribed"
|
|
1951
|
+
],
|
|
1952
|
+
"properties": {
|
|
1953
|
+
"total_emailed": {
|
|
1954
|
+
"type": "integer",
|
|
1955
|
+
"description": "Recipients with a recorded email status (the KPI denominator)."
|
|
1956
|
+
},
|
|
1957
|
+
"sent": {
|
|
1958
|
+
"type": "integer"
|
|
1959
|
+
},
|
|
1960
|
+
"delivered": {
|
|
1961
|
+
"type": "integer",
|
|
1962
|
+
"description": "Currently always 0 (Delivery events are not published yet)."
|
|
1963
|
+
},
|
|
1964
|
+
"bounced": {
|
|
1965
|
+
"type": "integer"
|
|
1966
|
+
},
|
|
1967
|
+
"bounced_hard": {
|
|
1968
|
+
"type": "integer",
|
|
1969
|
+
"description": "Bounces classified permanent (bounced_hard + bounced_soft = bounced)."
|
|
1970
|
+
},
|
|
1971
|
+
"bounced_soft": {
|
|
1972
|
+
"type": "integer",
|
|
1973
|
+
"description": "Bounces classified transient."
|
|
1974
|
+
},
|
|
1975
|
+
"complained": {
|
|
1976
|
+
"type": "integer"
|
|
1977
|
+
},
|
|
1978
|
+
"failed": {
|
|
1979
|
+
"type": "integer"
|
|
1980
|
+
},
|
|
1981
|
+
"unsubscribed": {
|
|
1982
|
+
"type": "integer",
|
|
1983
|
+
"description": "Recipients who opted out of email marketing."
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
"MatchCampaignsResponse": {
|
|
1991
|
+
"description": "List of campaigns where the target entities match the given entities.",
|
|
1992
|
+
"content": {
|
|
1993
|
+
"application/json": {
|
|
1994
|
+
"schema": {
|
|
1995
|
+
"type": "object",
|
|
1996
|
+
"properties": {
|
|
1997
|
+
"hits": {
|
|
1998
|
+
"type": "number",
|
|
1999
|
+
"description": "Number of matching campaigns."
|
|
2000
|
+
},
|
|
2001
|
+
"results": {
|
|
2002
|
+
"type": "array",
|
|
2003
|
+
"description": "List of matching campaigns.",
|
|
2004
|
+
"items": {
|
|
2005
|
+
"type": "object",
|
|
2006
|
+
"properties": {
|
|
2007
|
+
"campaign": {
|
|
2008
|
+
"$ref": "#/components/schemas/Campaign"
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
"required": [
|
|
2012
|
+
"campaign"
|
|
2013
|
+
]
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"DiscoverCampaignsResponse": {
|
|
2022
|
+
"description": "The Next Best Actions the entity should see on the Entity-UI channel, priority-sorted.",
|
|
2023
|
+
"content": {
|
|
2024
|
+
"application/json": {
|
|
2025
|
+
"schema": {
|
|
2026
|
+
"type": "object",
|
|
2027
|
+
"properties": {
|
|
2028
|
+
"hits": {
|
|
2029
|
+
"type": "number",
|
|
2030
|
+
"description": "Number of matching NBAs. Counts `results` only — dismissed ones are excluded."
|
|
2031
|
+
},
|
|
2032
|
+
"results": {
|
|
2033
|
+
"type": "array",
|
|
2034
|
+
"description": "Matching NBAs, sorted by priority (desc); one entry per campaign.",
|
|
2035
|
+
"items": {
|
|
2036
|
+
"$ref": "#/components/schemas/DiscoverResult"
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
"dismissed": {
|
|
2040
|
+
"type": "array",
|
|
2041
|
+
"description": "NBAs this entity has dismissed that would otherwise be in `results` — same shape,\nalso priority-sorted. Returned so the client can show the agent what it hid and\noffer to restore it, without a second round-trip.\n\nOnly currently-relevant dismissals appear: each one is matched against its\ncampaign's target exactly like a visible NBA, so a dismissal is dropped once the\ncampaign ends or the entity stops matching. Capped, so this is not a complete\ndismissal history.\n",
|
|
2042
|
+
"items": {
|
|
2043
|
+
"$ref": "#/components/schemas/DiscoverResult"
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
2047
|
+
"required": [
|
|
2048
|
+
"hits",
|
|
2049
|
+
"results",
|
|
2050
|
+
"dismissed"
|
|
2051
|
+
]
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
},
|
|
2056
|
+
"MatchTargetsResponse": {
|
|
2057
|
+
"description": "List of targets where the given entities are found.",
|
|
2058
|
+
"content": {
|
|
2059
|
+
"application/json": {
|
|
2060
|
+
"schema": {
|
|
2061
|
+
"type": "object",
|
|
2062
|
+
"properties": {
|
|
2063
|
+
"hits": {
|
|
2064
|
+
"type": "number",
|
|
2065
|
+
"description": "Number of matching targets."
|
|
2066
|
+
},
|
|
2067
|
+
"results": {
|
|
2068
|
+
"type": "array",
|
|
2069
|
+
"description": "List of matching targets.",
|
|
2070
|
+
"items": {
|
|
2071
|
+
"type": "object",
|
|
2072
|
+
"properties": {
|
|
2073
|
+
"target": {
|
|
2074
|
+
"$ref": "#/components/schemas/Target"
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
"required": [
|
|
2078
|
+
"target"
|
|
2079
|
+
]
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
"GetTargetQueriesResponse": {
|
|
2088
|
+
"description": "List of transformed target queries.",
|
|
2089
|
+
"content": {
|
|
2090
|
+
"application/json": {
|
|
2091
|
+
"schema": {
|
|
2092
|
+
"type": "object",
|
|
2093
|
+
"properties": {
|
|
2094
|
+
"results": {
|
|
2095
|
+
"type": "array",
|
|
2096
|
+
"description": "List of target query results.",
|
|
2097
|
+
"items": {
|
|
2098
|
+
"$ref": "#/components/schemas/TargetQueryResult"
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
"required": [
|
|
2103
|
+
"results"
|
|
2104
|
+
]
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
"CampaignPortalsResponse": {
|
|
2110
|
+
"description": "List of portals and its widgets where the campaign is used",
|
|
2111
|
+
"content": {
|
|
2112
|
+
"application/json": {
|
|
2113
|
+
"schema": {
|
|
2114
|
+
"type": "array",
|
|
2115
|
+
"items": {
|
|
2116
|
+
"type": "object",
|
|
2117
|
+
"properties": {
|
|
2118
|
+
"portal": {
|
|
2119
|
+
"type": "object",
|
|
2120
|
+
"properties": {
|
|
2121
|
+
"origin": {
|
|
2122
|
+
"type": "string",
|
|
2123
|
+
"description": "The origin of the portal"
|
|
2124
|
+
},
|
|
2125
|
+
"domain": {
|
|
2126
|
+
"type": "string",
|
|
2127
|
+
"description": "The domain of the portal"
|
|
2128
|
+
},
|
|
2129
|
+
"name": {
|
|
2130
|
+
"type": "string",
|
|
2131
|
+
"description": "The name of the portal"
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
},
|
|
2135
|
+
"widgets": {
|
|
2136
|
+
"type": "array",
|
|
2137
|
+
"items": {
|
|
2138
|
+
"type": "object",
|
|
2139
|
+
"properties": {
|
|
2140
|
+
"id": {
|
|
2141
|
+
"type": "string",
|
|
2142
|
+
"description": "The ID of the widget"
|
|
2143
|
+
},
|
|
2144
|
+
"headline": {
|
|
2145
|
+
"type": "object",
|
|
2146
|
+
"properties": {
|
|
2147
|
+
"en": {
|
|
2148
|
+
"type": "string",
|
|
2149
|
+
"description": "The headline in English"
|
|
2150
|
+
},
|
|
2151
|
+
"de": {
|
|
2152
|
+
"type": "string",
|
|
2153
|
+
"description": "The headline in German"
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
"required": [
|
|
2159
|
+
"id"
|
|
2160
|
+
]
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
2164
|
+
"required": [
|
|
2165
|
+
"portal",
|
|
2166
|
+
"widgets"
|
|
2167
|
+
]
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
"SetupCampaignResponse": {
|
|
2174
|
+
"description": "Discriminated by `type`, mirroring the request. Each campaign variant has its\nown response shape; new variants extend the `oneOf` list alongside the request.\n",
|
|
2175
|
+
"content": {
|
|
2176
|
+
"application/json": {
|
|
2177
|
+
"schema": {
|
|
2178
|
+
"oneOf": [
|
|
2179
|
+
{
|
|
2180
|
+
"$ref": "#/components/schemas/SetupTariffChangeCampaignResponse"
|
|
2181
|
+
}
|
|
2182
|
+
],
|
|
2183
|
+
"discriminator": {
|
|
2184
|
+
"propertyName": "type",
|
|
2185
|
+
"mapping": {
|
|
2186
|
+
"tariff_change": "#/components/schemas/SetupTariffChangeCampaignResponse"
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"RetriggerAutomationsResponse": {
|
|
2194
|
+
"description": "Response to a request to retrigger automations for campaign recipients",
|
|
2195
|
+
"content": {
|
|
2196
|
+
"application/json": {
|
|
2197
|
+
"schema": {
|
|
2198
|
+
"type": "object",
|
|
2199
|
+
"properties": {
|
|
2200
|
+
"message": {
|
|
2201
|
+
"type": "string",
|
|
2202
|
+
"description": "A confirmation message indicating the request was received and processed"
|
|
2203
|
+
},
|
|
2204
|
+
"results": {
|
|
2205
|
+
"type": "array",
|
|
2206
|
+
"description": "List of retriggering results",
|
|
2207
|
+
"items": {
|
|
2208
|
+
"$ref": "#/components/schemas/RetriggerAutomationsResult"
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
"required": [
|
|
2213
|
+
"message",
|
|
2214
|
+
"results"
|
|
2215
|
+
]
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
}
|