@epilot/sdk 2.19.1 → 2.19.3

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.
Files changed (230) hide show
  1. package/dist/apis/access-token.cjs +6 -6
  2. package/dist/apis/access-token.js +1 -1
  3. package/dist/apis/address-suggestions.cjs +6 -6
  4. package/dist/apis/address-suggestions.js +1 -1
  5. package/dist/apis/address.cjs +6 -6
  6. package/dist/apis/address.js +1 -1
  7. package/dist/apis/ai-agents.cjs +6 -6
  8. package/dist/apis/ai-agents.js +1 -1
  9. package/dist/apis/app.cjs +6 -6
  10. package/dist/apis/app.js +1 -1
  11. package/dist/apis/audit-logs.cjs +6 -6
  12. package/dist/apis/audit-logs.js +1 -1
  13. package/dist/apis/automation.cjs +6 -6
  14. package/dist/apis/automation.js +1 -1
  15. package/dist/apis/billing.cjs +6 -6
  16. package/dist/apis/billing.js +1 -1
  17. package/dist/apis/blueprint-manifest.cjs +6 -6
  18. package/dist/apis/blueprint-manifest.js +1 -1
  19. package/dist/apis/calendar.cjs +6 -6
  20. package/dist/apis/calendar.js +1 -1
  21. package/dist/apis/configuration-hub.cjs +6 -6
  22. package/dist/apis/configuration-hub.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-governance.cjs +6 -6
  30. package/dist/apis/data-governance.js +1 -1
  31. package/dist/apis/deduplication.cjs +6 -6
  32. package/dist/apis/deduplication.js +1 -1
  33. package/dist/apis/design.cjs +6 -6
  34. package/dist/apis/design.js +1 -1
  35. package/dist/apis/document.cjs +6 -6
  36. package/dist/apis/document.js +1 -1
  37. package/dist/apis/email-settings.cjs +6 -6
  38. package/dist/apis/email-settings.js +1 -1
  39. package/dist/apis/email-template.cjs +6 -6
  40. package/dist/apis/email-template.js +1 -1
  41. package/dist/apis/entity-mapping.cjs +6 -6
  42. package/dist/apis/entity-mapping.js +1 -1
  43. package/dist/apis/entity.cjs +6 -6
  44. package/dist/apis/entity.js +1 -1
  45. package/dist/apis/environments.cjs +6 -6
  46. package/dist/apis/environments.js +1 -1
  47. package/dist/apis/event-catalog.cjs +6 -6
  48. package/dist/apis/event-catalog.js +1 -1
  49. package/dist/apis/file.cjs +6 -6
  50. package/dist/apis/file.js +1 -1
  51. package/dist/apis/iban.cjs +6 -6
  52. package/dist/apis/iban.js +1 -1
  53. package/dist/apis/integration-toolkit.cjs +6 -6
  54. package/dist/apis/integration-toolkit.js +1 -1
  55. package/dist/apis/journey.cjs +6 -6
  56. package/dist/apis/journey.js +1 -1
  57. package/dist/apis/kanban.cjs +6 -6
  58. package/dist/apis/kanban.js +1 -1
  59. package/dist/apis/message.cjs +6 -6
  60. package/dist/apis/message.js +1 -1
  61. package/dist/apis/metering.cjs +6 -6
  62. package/dist/apis/metering.js +1 -1
  63. package/dist/apis/notes.cjs +6 -6
  64. package/dist/apis/notes.js +1 -1
  65. package/dist/apis/notification.cjs +6 -6
  66. package/dist/apis/notification.js +1 -1
  67. package/dist/apis/organization.cjs +6 -6
  68. package/dist/apis/organization.js +1 -1
  69. package/dist/apis/partner-directory.cjs +6 -6
  70. package/dist/apis/partner-directory.js +1 -1
  71. package/dist/apis/permissions.cjs +6 -6
  72. package/dist/apis/permissions.js +1 -1
  73. package/dist/apis/pricing-tier.cjs +6 -6
  74. package/dist/apis/pricing-tier.js +1 -1
  75. package/dist/apis/pricing.cjs +6 -6
  76. package/dist/apis/pricing.d.cts +67 -3
  77. package/dist/apis/pricing.d.ts +67 -3
  78. package/dist/apis/pricing.js +1 -1
  79. package/dist/apis/purpose.cjs +6 -6
  80. package/dist/apis/purpose.js +1 -1
  81. package/dist/apis/query.cjs +6 -6
  82. package/dist/apis/query.js +1 -1
  83. package/dist/apis/sandbox.cjs +6 -6
  84. package/dist/apis/sandbox.js +1 -1
  85. package/dist/apis/sharing.cjs +6 -6
  86. package/dist/apis/sharing.js +1 -1
  87. package/dist/apis/snapshot.cjs +6 -6
  88. package/dist/apis/snapshot.js +1 -1
  89. package/dist/apis/submission.cjs +6 -6
  90. package/dist/apis/submission.js +1 -1
  91. package/dist/apis/target.cjs +6 -6
  92. package/dist/apis/target.js +1 -1
  93. package/dist/apis/targeting.cjs +8 -8
  94. package/dist/apis/targeting.d.cts +2 -2
  95. package/dist/apis/targeting.d.ts +2 -2
  96. package/dist/apis/targeting.js +2 -2
  97. package/dist/apis/template-variables.cjs +6 -6
  98. package/dist/apis/template-variables.js +1 -1
  99. package/dist/apis/user.cjs +6 -6
  100. package/dist/apis/user.js +1 -1
  101. package/dist/apis/validation-rules.cjs +6 -6
  102. package/dist/apis/validation-rules.js +1 -1
  103. package/dist/apis/webhooks.cjs +6 -6
  104. package/dist/apis/webhooks.js +1 -1
  105. package/dist/apis/workflow-definition.cjs +6 -6
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.js +1 -1
  109. package/dist/{chunk-W3SPZ6V5.cjs → chunk-MDUJKPDR.cjs} +1 -1
  110. package/dist/{chunk-UH24GU2Z.js → chunk-MSFE3E7D.js} +1 -1
  111. package/dist/{chunk-XBUBHNFT.cjs → chunk-QWWGJOYR.cjs} +2 -2
  112. package/dist/{chunk-7REPAE5F.js → chunk-UC3IKFHD.js} +2 -2
  113. package/dist/index.cjs +10 -10
  114. package/dist/index.d.cts +2 -2
  115. package/dist/index.d.ts +2 -2
  116. package/dist/index.js +2 -2
  117. package/dist/{pricing.d-Det6zqGv.d.cts → pricing.d-CSVO1WCD.d.cts} +1 -1
  118. package/dist/{pricing.d-Det6zqGv.d.ts → pricing.d-CSVO1WCD.d.ts} +1 -1
  119. package/dist/targeting-BTVCLYFW.cjs +7 -0
  120. package/dist/targeting-NWYDE3E7.js +7 -0
  121. package/dist/{targeting-runtime-HWL6PLJF.cjs → targeting-runtime-AB6BMJ6U.cjs} +2 -2
  122. package/dist/{targeting-runtime-L5RGDNSH.js → targeting-runtime-S22V2UEE.js} +1 -1
  123. package/dist/{targeting.d-DaK3kwZg.d.cts → targeting.d-16SvPyj4.d.cts} +295 -77
  124. package/dist/{targeting.d-DaK3kwZg.d.ts → targeting.d-16SvPyj4.d.ts} +295 -77
  125. package/docs/targeting.md +229 -31
  126. package/package.json +1 -1
  127. package/definitions/access-token-runtime.json +0 -1
  128. package/definitions/access-token.json +0 -835
  129. package/definitions/address-runtime.json +0 -1
  130. package/definitions/address-suggestions-runtime.json +0 -1
  131. package/definitions/address-suggestions.json +0 -582
  132. package/definitions/address.json +0 -578
  133. package/definitions/ai-agents-runtime.json +0 -1
  134. package/definitions/ai-agents.json +0 -2863
  135. package/definitions/app-runtime.json +0 -1
  136. package/definitions/app.json +0 -5743
  137. package/definitions/audit-logs-runtime.json +0 -1
  138. package/definitions/audit-logs.json +0 -305
  139. package/definitions/automation-runtime.json +0 -1
  140. package/definitions/automation.json +0 -5557
  141. package/definitions/billing-runtime.json +0 -1
  142. package/definitions/billing.json +0 -2386
  143. package/definitions/blueprint-manifest-runtime.json +0 -1
  144. package/definitions/blueprint-manifest.json +0 -7718
  145. package/definitions/calendar-runtime.json +0 -1
  146. package/definitions/calendar.json +0 -2904
  147. package/definitions/configuration-hub-runtime.json +0 -1
  148. package/definitions/configuration-hub.json +0 -2250
  149. package/definitions/consent-runtime.json +0 -1
  150. package/definitions/consent.json +0 -344
  151. package/definitions/customer-portal-runtime.json +0 -1
  152. package/definitions/customer-portal.json +0 -19919
  153. package/definitions/dashboard-runtime.json +0 -1
  154. package/definitions/dashboard.json +0 -1355
  155. package/definitions/data-governance-runtime.json +0 -1
  156. package/definitions/data-governance.json +0 -1126
  157. package/definitions/deduplication-runtime.json +0 -1
  158. package/definitions/deduplication.json +0 -782
  159. package/definitions/design-runtime.json +0 -1
  160. package/definitions/design.json +0 -1827
  161. package/definitions/document-runtime.json +0 -1
  162. package/definitions/document.json +0 -758
  163. package/definitions/email-settings-runtime.json +0 -1
  164. package/definitions/email-settings.json +0 -3736
  165. package/definitions/email-template-runtime.json +0 -1
  166. package/definitions/email-template.json +0 -1441
  167. package/definitions/entity-mapping-runtime.json +0 -1
  168. package/definitions/entity-mapping.json +0 -1642
  169. package/definitions/entity-runtime.json +0 -1
  170. package/definitions/entity.json +0 -11517
  171. package/definitions/environments-runtime.json +0 -1
  172. package/definitions/environments.json +0 -539
  173. package/definitions/event-catalog-runtime.json +0 -1
  174. package/definitions/event-catalog.json +0 -1524
  175. package/definitions/file-runtime.json +0 -1
  176. package/definitions/file.json +0 -3905
  177. package/definitions/iban-runtime.json +0 -1
  178. package/definitions/iban.json +0 -132
  179. package/definitions/integration-toolkit-runtime.json +0 -1
  180. package/definitions/integration-toolkit.json +0 -12769
  181. package/definitions/journey-runtime.json +0 -1
  182. package/definitions/journey.json +0 -2640
  183. package/definitions/kanban-runtime.json +0 -1
  184. package/definitions/kanban.json +0 -1506
  185. package/definitions/message-runtime.json +0 -1
  186. package/definitions/message.json +0 -3667
  187. package/definitions/metering-runtime.json +0 -1
  188. package/definitions/metering.json +0 -3132
  189. package/definitions/notes-runtime.json +0 -1
  190. package/definitions/notes.json +0 -1698
  191. package/definitions/notification-runtime.json +0 -1
  192. package/definitions/notification.json +0 -1439
  193. package/definitions/organization-runtime.json +0 -1
  194. package/definitions/organization.json +0 -1192
  195. package/definitions/partner-directory-runtime.json +0 -1
  196. package/definitions/partner-directory.json +0 -2284
  197. package/definitions/permissions-runtime.json +0 -1
  198. package/definitions/permissions.json +0 -1598
  199. package/definitions/pricing-runtime.json +0 -1
  200. package/definitions/pricing-tier-runtime.json +0 -1
  201. package/definitions/pricing-tier.json +0 -105
  202. package/definitions/pricing.json +0 -11569
  203. package/definitions/purpose-runtime.json +0 -1
  204. package/definitions/purpose.json +0 -524
  205. package/definitions/query-runtime.json +0 -1
  206. package/definitions/query.json +0 -3178
  207. package/definitions/sandbox-runtime.json +0 -1
  208. package/definitions/sandbox.json +0 -453
  209. package/definitions/sharing-runtime.json +0 -1
  210. package/definitions/sharing.json +0 -956
  211. package/definitions/snapshot-runtime.json +0 -1
  212. package/definitions/snapshot.json +0 -1103
  213. package/definitions/submission-runtime.json +0 -1
  214. package/definitions/submission.json +0 -313
  215. package/definitions/targeting-runtime.json +0 -1
  216. package/definitions/targeting.json +0 -2021
  217. package/definitions/template-variables-runtime.json +0 -1
  218. package/definitions/template-variables.json +0 -1416
  219. package/definitions/user-runtime.json +0 -1
  220. package/definitions/user.json +0 -3051
  221. package/definitions/validation-rules-runtime.json +0 -1
  222. package/definitions/validation-rules.json +0 -2365
  223. package/definitions/webhooks-runtime.json +0 -1
  224. package/definitions/webhooks.json +0 -1875
  225. package/definitions/workflow-definition-runtime.json +0 -1
  226. package/definitions/workflow-definition.json +0 -3592
  227. package/definitions/workflow-runtime.json +0 -1
  228. package/definitions/workflow.json +0 -4669
  229. package/dist/targeting-A2X6X7BF.js +0 -7
  230. package/dist/targeting-CSGKITGV.cjs +0 -7
@@ -1,2021 +0,0 @@
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": "Change the status of a campaign",
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": "Get the status of a campaign's automation job",
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": "Get portals usage info for a campaign",
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": "Retrigger automations for campaign recipients",
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": "Set up a campaign with related entities and configurations",
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": "Match campaigns",
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": "Discover Entity-UI Next Best Actions for an entity",
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": "Match targets",
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": "Get target queries",
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": "Create a recipient associated with a campaign",
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": "Update a recipient",
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": "Update portal status for a campaign recipient",
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": "Update Entity-UI (Next Best Action) status for a campaign recipient",
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 (final state)\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}/recipients": {
540
- "get": {
541
- "operationId": "getRecipients",
542
- "summary": "Get campaign recipients",
543
- "description": "Get a paginated list of recipients for a campaign.",
544
- "tags": [
545
- "Campaign Recipient"
546
- ],
547
- "security": [
548
- {
549
- "EpilotAuth": []
550
- }
551
- ],
552
- "parameters": [
553
- {
554
- "$ref": "#/components/parameters/CampaignIdPathParam"
555
- },
556
- {
557
- "name": "limit",
558
- "in": "query",
559
- "description": "Number of items to return",
560
- "schema": {
561
- "type": "integer",
562
- "default": 25
563
- }
564
- },
565
- {
566
- "name": "next",
567
- "in": "query",
568
- "description": "Cursor for pagination",
569
- "schema": {
570
- "type": "string"
571
- }
572
- },
573
- {
574
- "name": "q",
575
- "in": "query",
576
- "description": "Search by recipient title",
577
- "schema": {
578
- "type": "string"
579
- }
580
- },
581
- {
582
- "name": "automation_status",
583
- "in": "query",
584
- "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",
585
- "style": "form",
586
- "explode": true,
587
- "schema": {
588
- "type": "array",
589
- "items": {
590
- "$ref": "#/components/schemas/AutomationStatus"
591
- }
592
- }
593
- },
594
- {
595
- "name": "portal_status",
596
- "in": "query",
597
- "description": "Filter by portal status",
598
- "schema": {
599
- "$ref": "#/components/schemas/PortalStatus"
600
- }
601
- }
602
- ],
603
- "responses": {
604
- "200": {
605
- "$ref": "#/components/responses/RecipientsResponse"
606
- },
607
- "400": {
608
- "$ref": "#/components/responses/ClientErrorResponse"
609
- },
610
- "500": {
611
- "$ref": "#/components/responses/ServerErrorResponse"
612
- }
613
- }
614
- }
615
- }
616
- },
617
- "components": {
618
- "schemas": {
619
- "BaseError": {
620
- "type": "object",
621
- "properties": {
622
- "status": {
623
- "type": "integer",
624
- "example": 404
625
- },
626
- "message": {
627
- "type": "string",
628
- "example": "Entity not found"
629
- }
630
- },
631
- "required": [
632
- "status",
633
- "message"
634
- ]
635
- },
636
- "ServerError": {
637
- "$ref": "#/components/schemas/BaseError"
638
- },
639
- "ClientError": {
640
- "oneOf": [
641
- {
642
- "type": "object",
643
- "title": "MessageError",
644
- "description": "An error object containing a human-readable message.",
645
- "properties": {
646
- "message": {
647
- "type": "string",
648
- "description": "A descriptive error message.",
649
- "example": "The provided input was invalid."
650
- }
651
- },
652
- "required": [
653
- "message"
654
- ],
655
- "additionalProperties": false
656
- },
657
- {
658
- "type": "object",
659
- "title": "CodeError",
660
- "description": "An error object containing a specific machine-readable error code.",
661
- "properties": {
662
- "code": {
663
- "type": "string",
664
- "description": "A specific machine-readable error code indicating a known error condition.",
665
- "enum": [
666
- "CAMPAIGN_NOT_FOUND",
667
- "CAMPAIGN_HAS_NO_TARGET",
668
- "CAMPAIGN_HAS_NO_DELIVERY_METHOD",
669
- "CAMPAIGN_HAS_JOB_IN_PROGRESS",
670
- "CAMPAIGN_HAS_UNEXPECTED_STATUS",
671
- "JOB_TOKEN_MISSING",
672
- "TARGET_WITHOUT_FILTERS"
673
- ],
674
- "example": "CAMPAIGN_NOT_FOUND"
675
- }
676
- },
677
- "required": [
678
- "code"
679
- ],
680
- "additionalProperties": false
681
- },
682
- {
683
- "type": "object",
684
- "title": "StatusedError",
685
- "description": "An error object containing a message and an explicit status, typically from a more generic error handler.",
686
- "properties": {
687
- "error": {
688
- "type": "string",
689
- "description": "A descriptive error message.",
690
- "example": "An unexpected error occurred during processing."
691
- },
692
- "status": {
693
- "type": "integer",
694
- "description": "An explicit status code in the body, often mirroring the HTTP status but provided for programmatic access.",
695
- "example": 400
696
- }
697
- },
698
- "required": [
699
- "error",
700
- "status"
701
- ],
702
- "additionalProperties": false
703
- }
704
- ],
705
- "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"
706
- },
707
- "BaseUUID": {
708
- "type": "string",
709
- "format": "uuid",
710
- "example": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
711
- },
712
- "BaseNanoID": {
713
- "type": "string",
714
- "example": "xHcOoJCa07eysJ1GaQeSb"
715
- },
716
- "BaseTags": {
717
- "type": "array",
718
- "nullable": true,
719
- "items": {
720
- "type": "string"
721
- }
722
- },
723
- "BaseRelation": {
724
- "type": "object",
725
- "properties": {
726
- "$relation": {
727
- "type": "array",
728
- "items": {
729
- "type": "object",
730
- "properties": {
731
- "entity_id": {
732
- "$ref": "#/components/schemas/BaseUUID"
733
- },
734
- "_tags": {
735
- "$ref": "#/components/schemas/BaseTags"
736
- }
737
- }
738
- }
739
- }
740
- }
741
- },
742
- "BaseSystemId": {
743
- "type": "object",
744
- "readOnly": true,
745
- "properties": {
746
- "_id": {
747
- "$ref": "#/components/schemas/BaseUUID"
748
- }
749
- },
750
- "required": [
751
- "_id"
752
- ]
753
- },
754
- "BaseEntityOwner": {
755
- "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
756
- "type": "object",
757
- "properties": {
758
- "org_id": {
759
- "type": "string",
760
- "example": "123"
761
- },
762
- "user_id": {
763
- "type": "string",
764
- "example": "123"
765
- }
766
- },
767
- "required": [
768
- "org_id"
769
- ]
770
- },
771
- "BaseEntityAcl": {
772
- "type": "object",
773
- "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
774
- "additionalProperties": true,
775
- "readOnly": true,
776
- "properties": {
777
- "view": {
778
- "type": "array",
779
- "items": {
780
- "type": "string",
781
- "example": "org:456"
782
- }
783
- },
784
- "edit": {
785
- "type": "array",
786
- "items": {
787
- "type": "string",
788
- "example": "org:456"
789
- }
790
- },
791
- "delete": {
792
- "type": "array",
793
- "items": {
794
- "type": "string",
795
- "example": "org:456"
796
- }
797
- }
798
- }
799
- },
800
- "BaseSystemFields": {
801
- "type": "object",
802
- "properties": {
803
- "_id": {
804
- "$ref": "#/components/schemas/BaseUUID"
805
- },
806
- "_org": {
807
- "type": "string",
808
- "description": "Organization Id the entity belongs to",
809
- "readOnly": true
810
- },
811
- "_owners": {
812
- "type": "array",
813
- "readOnly": true,
814
- "items": {
815
- "$ref": "#/components/schemas/BaseEntityOwner"
816
- }
817
- },
818
- "_schema": {
819
- "readOnly": true,
820
- "type": "string"
821
- },
822
- "_title": {
823
- "readOnly": true,
824
- "type": "string"
825
- },
826
- "_tags": {
827
- "$ref": "#/components/schemas/BaseTags"
828
- },
829
- "_created_at": {
830
- "readOnly": true,
831
- "type": "string",
832
- "format": "date-time"
833
- },
834
- "_updated_at": {
835
- "readOnly": true,
836
- "type": "string",
837
- "format": "date-time"
838
- },
839
- "_acl": {
840
- "$ref": "#/components/schemas/BaseEntityAcl"
841
- }
842
- }
843
- },
844
- "BaseSystemFieldsRequired": {
845
- "type": "object",
846
- "required": [
847
- "_org",
848
- "_owners",
849
- "_schema",
850
- "_title",
851
- "_tags",
852
- "_created_at",
853
- "_updated_at",
854
- "_acl"
855
- ]
856
- },
857
- "CampaignStatus": {
858
- "type": "string",
859
- "default": "draft",
860
- "enum": [
861
- "draft",
862
- "activating",
863
- "active",
864
- "inactive"
865
- ]
866
- },
867
- "ExecutionSummaryItem": {
868
- "type": "object",
869
- "properties": {
870
- "execution_id": {
871
- "type": "string"
872
- },
873
- "execution_status": {
874
- "type": "string"
875
- }
876
- }
877
- },
878
- "JobStatus": {
879
- "type": "object",
880
- "properties": {
881
- "status": {
882
- "type": "string",
883
- "description": "The status of the automation job",
884
- "enum": [
885
- "queued",
886
- "processing",
887
- "finished",
888
- "failed",
889
- "cancelled",
890
- "send_report"
891
- ]
892
- },
893
- "execution_summary": {
894
- "type": "array",
895
- "items": {
896
- "$ref": "#/components/schemas/ExecutionSummaryItem"
897
- }
898
- }
899
- }
900
- },
901
- "Campaign": {
902
- "allOf": [
903
- {
904
- "$ref": "#/components/schemas/BaseSystemFields"
905
- },
906
- {
907
- "type": "object",
908
- "properties": {
909
- "name": {
910
- "type": "string"
911
- },
912
- "goal": {
913
- "type": "string"
914
- },
915
- "status": {
916
- "$ref": "#/components/schemas/CampaignStatus"
917
- },
918
- "start_date": {
919
- "type": "string",
920
- "format": "date"
921
- },
922
- "end_date": {
923
- "type": "string",
924
- "format": "date"
925
- },
926
- "flow_id": {
927
- "type": "string"
928
- },
929
- "job_id": {
930
- "type": "string"
931
- },
932
- "target": {
933
- "$ref": "#/components/schemas/BaseRelation"
934
- }
935
- }
936
- }
937
- ]
938
- },
939
- "Target": {
940
- "allOf": [
941
- {
942
- "$ref": "#/components/schemas/BaseSystemFields"
943
- },
944
- {
945
- "type": "object",
946
- "properties": {
947
- "name": {
948
- "type": "string"
949
- },
950
- "description": {
951
- "type": "string"
952
- },
953
- "entity_schema": {
954
- "type": "string"
955
- },
956
- "entity_filters": {
957
- "type": "object",
958
- "additionalProperties": true
959
- }
960
- }
961
- }
962
- ]
963
- },
964
- "MatchCampaignParams": {
965
- "type": "object",
966
- "properties": {
967
- "entity_refs": {
968
- "type": "array",
969
- "description": "List of entities (e.g. Contacts or Contracts) that should be part of the campaign target.",
970
- "items": {
971
- "type": "object",
972
- "properties": {
973
- "entity_id": {
974
- "$ref": "#/components/schemas/BaseUUID"
975
- },
976
- "entity_schema": {
977
- "type": "string"
978
- }
979
- },
980
- "required": [
981
- "entity_id",
982
- "entity_schema"
983
- ],
984
- "additionalProperties": false
985
- }
986
- },
987
- "campaign_ids": {
988
- "type": "array",
989
- "description": "List of campaign IDs to check.",
990
- "items": {
991
- "$ref": "#/components/schemas/BaseUUID"
992
- },
993
- "example": [
994
- "b8c01433-5556-4e2b-aad4-6f5348d1df84"
995
- ],
996
- "minItems": 1,
997
- "maxItems": 100,
998
- "uniqueItems": true
999
- }
1000
- },
1001
- "required": [
1002
- "entity_refs",
1003
- "campaign_ids"
1004
- ],
1005
- "additionalProperties": false
1006
- },
1007
- "NextBestAction": {
1008
- "type": "object",
1009
- "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",
1010
- "properties": {
1011
- "category": {
1012
- "type": "string",
1013
- "description": "Light category label shown above the title. Free-form text."
1014
- },
1015
- "icon": {
1016
- "type": "object",
1017
- "description": "Curated icon for the NBA.",
1018
- "properties": {
1019
- "name": {
1020
- "type": "string",
1021
- "description": "Icon name from \"@epilot360/icons\"."
1022
- },
1023
- "color": {
1024
- "type": "string",
1025
- "description": "Optional icon color."
1026
- }
1027
- },
1028
- "required": [
1029
- "name"
1030
- ]
1031
- },
1032
- "title": {
1033
- "type": "string",
1034
- "description": "Bold action title. Required. Supports `{{placeholders}}`."
1035
- },
1036
- "body": {
1037
- "type": "string",
1038
- "description": "Optional description. Supports `{{placeholders}}` (incl. relative dates)."
1039
- },
1040
- "priority": {
1041
- "type": "string",
1042
- "enum": [
1043
- "low",
1044
- "medium",
1045
- "high"
1046
- ],
1047
- "default": "medium",
1048
- "description": "Display priority. NBAs are shown highest-priority first."
1049
- },
1050
- "is_dismissable": {
1051
- "type": "boolean",
1052
- "default": true,
1053
- "description": "Whether the agent can dismiss the NBA."
1054
- },
1055
- "cta": {
1056
- "type": "object",
1057
- "description": "The NBA's single call-to-action.",
1058
- "properties": {
1059
- "type": {
1060
- "type": "string",
1061
- "enum": [
1062
- "journey",
1063
- "workflow",
1064
- "url"
1065
- ]
1066
- },
1067
- "target": {
1068
- "type": "string",
1069
- "description": "Journey id, workflow definition id, or URL, depending on `type`."
1070
- },
1071
- "label": {
1072
- "type": "string",
1073
- "description": "Optional CTA button label."
1074
- },
1075
- "context_params": {
1076
- "type": "array",
1077
- "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",
1078
- "items": {
1079
- "type": "object",
1080
- "properties": {
1081
- "key": {
1082
- "type": "string"
1083
- },
1084
- "value": {
1085
- "type": "string"
1086
- }
1087
- },
1088
- "required": [
1089
- "key",
1090
- "value"
1091
- ]
1092
- }
1093
- }
1094
- },
1095
- "required": [
1096
- "type",
1097
- "target"
1098
- ]
1099
- }
1100
- },
1101
- "required": [
1102
- "title",
1103
- "cta"
1104
- ]
1105
- },
1106
- "DiscoverCampaignsParams": {
1107
- "type": "object",
1108
- "properties": {
1109
- "entity_id": {
1110
- "$ref": "#/components/schemas/BaseUUID"
1111
- },
1112
- "entity_schema": {
1113
- "type": "string",
1114
- "description": "The schema slug of the entity (e.g. \"contact\" or \"account\")."
1115
- }
1116
- },
1117
- "required": [
1118
- "entity_id",
1119
- "entity_schema"
1120
- ],
1121
- "additionalProperties": false
1122
- },
1123
- "MatchTargetParams": {
1124
- "type": "object",
1125
- "properties": {
1126
- "entity_refs": {
1127
- "type": "array",
1128
- "description": "List of entities (e.g. Contacts or Contracts) that should be part of the targets.",
1129
- "items": {
1130
- "type": "object",
1131
- "properties": {
1132
- "entity_id": {
1133
- "$ref": "#/components/schemas/BaseUUID"
1134
- },
1135
- "entity_schema": {
1136
- "type": "string"
1137
- }
1138
- },
1139
- "required": [
1140
- "entity_id",
1141
- "entity_schema"
1142
- ],
1143
- "additionalProperties": false
1144
- }
1145
- },
1146
- "target_ids": {
1147
- "type": "array",
1148
- "description": "List of target IDs to check.",
1149
- "items": {
1150
- "$ref": "#/components/schemas/BaseUUID"
1151
- },
1152
- "example": [
1153
- "b8c01433-5556-4e2b-aad4-6f5348d1df84"
1154
- ],
1155
- "minItems": 1,
1156
- "maxItems": 100,
1157
- "uniqueItems": true
1158
- }
1159
- },
1160
- "required": [
1161
- "entity_refs",
1162
- "target_ids"
1163
- ],
1164
- "additionalProperties": false
1165
- },
1166
- "GetTargetQueriesParams": {
1167
- "type": "object",
1168
- "properties": {
1169
- "target_ids": {
1170
- "type": "array",
1171
- "description": "List of target IDs to transform into queries.",
1172
- "items": {
1173
- "$ref": "#/components/schemas/BaseUUID"
1174
- },
1175
- "example": [
1176
- "b8c01433-5556-4e2b-aad4-6f5348d1df84"
1177
- ],
1178
- "minItems": 1,
1179
- "uniqueItems": true
1180
- }
1181
- },
1182
- "required": [
1183
- "target_ids"
1184
- ],
1185
- "additionalProperties": false
1186
- },
1187
- "TargetQueryResult": {
1188
- "type": "object",
1189
- "properties": {
1190
- "target_id": {
1191
- "$ref": "#/components/schemas/BaseUUID"
1192
- },
1193
- "query": {
1194
- "type": "string",
1195
- "description": "Transformed query string, or null if transformation failed.",
1196
- "nullable": true
1197
- },
1198
- "error": {
1199
- "type": "string",
1200
- "description": "Error message if query transformation failed."
1201
- }
1202
- },
1203
- "required": [
1204
- "target_id",
1205
- "query"
1206
- ]
1207
- },
1208
- "AutomationStatus": {
1209
- "type": "string",
1210
- "enum": [
1211
- "pending",
1212
- "in_progress",
1213
- "success",
1214
- "failed",
1215
- "cancelled"
1216
- ]
1217
- },
1218
- "PortalStatus": {
1219
- "type": "string",
1220
- "enum": [
1221
- "sent",
1222
- "seen",
1223
- "dismissed",
1224
- "clicked"
1225
- ]
1226
- },
1227
- "EntityUiStatus": {
1228
- "type": "string",
1229
- "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",
1230
- "enum": [
1231
- "seen",
1232
- "dismissed",
1233
- "clicked"
1234
- ]
1235
- },
1236
- "Resolution": {
1237
- "type": "string",
1238
- "description": "Cross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`\nfields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY\nchannel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:\nnever sent by a client. Absence means unresolved.\n",
1239
- "enum": [
1240
- "accepted"
1241
- ]
1242
- },
1243
- "Recipient": {
1244
- "type": "object",
1245
- "properties": {
1246
- "entity_id": {
1247
- "$ref": "#/components/schemas/BaseUUID"
1248
- },
1249
- "entity_schema": {
1250
- "type": "string"
1251
- },
1252
- "title": {
1253
- "type": "string"
1254
- },
1255
- "automation_status": {
1256
- "$ref": "#/components/schemas/AutomationStatus"
1257
- },
1258
- "automation_execution_id": {
1259
- "type": "string"
1260
- },
1261
- "portal_status": {
1262
- "$ref": "#/components/schemas/PortalStatus"
1263
- },
1264
- "portal_status_updated_at": {
1265
- "type": "string",
1266
- "format": "date-time"
1267
- },
1268
- "portal_state": {
1269
- "type": "object",
1270
- "additionalProperties": true
1271
- },
1272
- "entity_ui_status": {
1273
- "$ref": "#/components/schemas/EntityUiStatus"
1274
- },
1275
- "entity_ui_status_updated_at": {
1276
- "type": "string",
1277
- "format": "date-time"
1278
- },
1279
- "resolution": {
1280
- "$ref": "#/components/schemas/Resolution"
1281
- },
1282
- "updated_at": {
1283
- "type": "string",
1284
- "format": "date-time"
1285
- }
1286
- }
1287
- },
1288
- "BaseRecipientPayload": {
1289
- "type": "object",
1290
- "properties": {
1291
- "entity_id": {
1292
- "$ref": "#/components/schemas/BaseUUID"
1293
- },
1294
- "entity_schema": {
1295
- "type": "string"
1296
- }
1297
- },
1298
- "required": [
1299
- "entity_id",
1300
- "entity_schema"
1301
- ]
1302
- },
1303
- "AutomationRecipientPayload": {
1304
- "type": "object",
1305
- "properties": {
1306
- "automation_status": {
1307
- "$ref": "#/components/schemas/AutomationStatus"
1308
- },
1309
- "automation_execution_id": {
1310
- "type": "string"
1311
- }
1312
- },
1313
- "required": [
1314
- "automation_status",
1315
- "automation_execution_id"
1316
- ]
1317
- },
1318
- "PortalRecipientPayload": {
1319
- "type": "object",
1320
- "properties": {
1321
- "portal_status": {
1322
- "$ref": "#/components/schemas/PortalStatus"
1323
- },
1324
- "portal_state": {
1325
- "type": "object",
1326
- "additionalProperties": true
1327
- }
1328
- },
1329
- "required": [
1330
- "portal_status"
1331
- ]
1332
- },
1333
- "CreateRecipientPayload": {
1334
- "oneOf": [
1335
- {
1336
- "allOf": [
1337
- {
1338
- "$ref": "#/components/schemas/BaseRecipientPayload"
1339
- },
1340
- {
1341
- "$ref": "#/components/schemas/AutomationRecipientPayload"
1342
- }
1343
- ]
1344
- },
1345
- {
1346
- "allOf": [
1347
- {
1348
- "$ref": "#/components/schemas/BaseRecipientPayload"
1349
- },
1350
- {
1351
- "$ref": "#/components/schemas/PortalRecipientPayload"
1352
- }
1353
- ]
1354
- },
1355
- {
1356
- "allOf": [
1357
- {
1358
- "$ref": "#/components/schemas/BaseRecipientPayload"
1359
- },
1360
- {
1361
- "$ref": "#/components/schemas/AutomationRecipientPayload"
1362
- },
1363
- {
1364
- "$ref": "#/components/schemas/PortalRecipientPayload"
1365
- }
1366
- ]
1367
- }
1368
- ]
1369
- },
1370
- "UpdateRecipientPayload": {
1371
- "type": "object",
1372
- "properties": {
1373
- "automation_status": {
1374
- "$ref": "#/components/schemas/AutomationStatus"
1375
- },
1376
- "automation_execution_id": {
1377
- "type": "string"
1378
- },
1379
- "portal_status": {
1380
- "$ref": "#/components/schemas/PortalStatus"
1381
- },
1382
- "portal_state": {
1383
- "type": "object",
1384
- "additionalProperties": true
1385
- }
1386
- }
1387
- },
1388
- "RetriggerAutomationsRequest": {
1389
- "type": "object",
1390
- "properties": {
1391
- "recipient_ids": {
1392
- "type": "array",
1393
- "description": "List of recipient IDs to retrigger automations for",
1394
- "items": {
1395
- "type": "string",
1396
- "format": "uuid"
1397
- }
1398
- }
1399
- },
1400
- "required": [
1401
- "recipient_ids"
1402
- ]
1403
- },
1404
- "RetriggerAutomationsResult": {
1405
- "type": "object",
1406
- "properties": {
1407
- "recipient_id": {
1408
- "type": "string",
1409
- "format": "uuid",
1410
- "description": "The ID of the recipient"
1411
- },
1412
- "result": {
1413
- "type": "string",
1414
- "description": "The result of the retriggering operation",
1415
- "enum": [
1416
- "success",
1417
- "failure",
1418
- "not_found",
1419
- "invalid_status"
1420
- ]
1421
- },
1422
- "execution_id": {
1423
- "type": "string",
1424
- "description": "The ID of the new automation execution (if successful)"
1425
- },
1426
- "error": {
1427
- "type": "string",
1428
- "description": "The error message if the operation failed"
1429
- }
1430
- },
1431
- "required": [
1432
- "recipient_id",
1433
- "result"
1434
- ]
1435
- },
1436
- "UpdatePortalStatusRequest": {
1437
- "type": "object",
1438
- "properties": {
1439
- "status": {
1440
- "$ref": "#/components/schemas/PortalStatus"
1441
- }
1442
- },
1443
- "required": [
1444
- "status"
1445
- ]
1446
- },
1447
- "UpdateEntityUiStatusRequest": {
1448
- "type": "object",
1449
- "properties": {
1450
- "status": {
1451
- "$ref": "#/components/schemas/EntityUiStatus"
1452
- },
1453
- "entity_schema": {
1454
- "type": "string",
1455
- "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"
1456
- }
1457
- },
1458
- "required": [
1459
- "status"
1460
- ],
1461
- "additionalProperties": false
1462
- },
1463
- "SetupCampaignRequest": {
1464
- "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",
1465
- "oneOf": [
1466
- {
1467
- "$ref": "#/components/schemas/SetupTariffChangeCampaignRequest"
1468
- }
1469
- ],
1470
- "discriminator": {
1471
- "propertyName": "type",
1472
- "mapping": {
1473
- "tariff_change": "#/components/schemas/SetupTariffChangeCampaignRequest"
1474
- }
1475
- }
1476
- },
1477
- "SetupTariffChangeCampaignRequest": {
1478
- "type": "object",
1479
- "properties": {
1480
- "type": {
1481
- "type": "string",
1482
- "enum": [
1483
- "tariff_change"
1484
- ]
1485
- },
1486
- "product_recommendation": {
1487
- "type": "object",
1488
- "properties": {
1489
- "name": {
1490
- "type": "string",
1491
- "description": "Optional name of the product recommendation. Defaults to the campaign name."
1492
- },
1493
- "source_product_id": {
1494
- "allOf": [
1495
- {
1496
- "$ref": "#/components/schemas/BaseUUID"
1497
- }
1498
- ],
1499
- "description": "Optional source product entity ID for the recommendation."
1500
- },
1501
- "source_price_id": {
1502
- "allOf": [
1503
- {
1504
- "$ref": "#/components/schemas/BaseUUID"
1505
- }
1506
- ],
1507
- "description": "Optional source price entity ID for the recommendation."
1508
- },
1509
- "offers": {
1510
- "type": "array",
1511
- "description": "Offer blocks for the product_recommendation entity.",
1512
- "items": {
1513
- "type": "object",
1514
- "properties": {
1515
- "target_id": {
1516
- "$ref": "#/components/schemas/BaseUUID",
1517
- "description": "Optional per-offer target entity ID."
1518
- },
1519
- "items": {
1520
- "type": "array",
1521
- "description": "Product/price pairs within this offer.",
1522
- "items": {
1523
- "type": "object",
1524
- "properties": {
1525
- "product_id": {
1526
- "$ref": "#/components/schemas/BaseUUID"
1527
- },
1528
- "price_id": {
1529
- "$ref": "#/components/schemas/BaseUUID"
1530
- },
1531
- "highlight_config": {
1532
- "type": "object",
1533
- "description": "Opaque per-item highlight/comparison config persisted as-is on the entity.",
1534
- "additionalProperties": true
1535
- }
1536
- },
1537
- "required": [
1538
- "product_id",
1539
- "price_id"
1540
- ],
1541
- "additionalProperties": false
1542
- }
1543
- }
1544
- },
1545
- "required": [
1546
- "items"
1547
- ],
1548
- "additionalProperties": false
1549
- }
1550
- }
1551
- },
1552
- "additionalProperties": false
1553
- },
1554
- "campaign": {
1555
- "type": "object",
1556
- "properties": {
1557
- "name": {
1558
- "type": "string"
1559
- },
1560
- "goal": {
1561
- "type": "string"
1562
- },
1563
- "target_ids": {
1564
- "type": "array",
1565
- "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",
1566
- "items": {
1567
- "$ref": "#/components/schemas/BaseUUID"
1568
- }
1569
- }
1570
- },
1571
- "required": [
1572
- "name",
1573
- "target_ids"
1574
- ],
1575
- "additionalProperties": false
1576
- },
1577
- "journey": {
1578
- "type": "object",
1579
- "description": "Optional journey configuration selected in the wizard. Only sent by the\nconsumer once a journey has been chosen.\n",
1580
- "properties": {
1581
- "journey_id": {
1582
- "$ref": "#/components/schemas/BaseUUID"
1583
- }
1584
- },
1585
- "required": [
1586
- "journey_id"
1587
- ],
1588
- "additionalProperties": false
1589
- },
1590
- "channels": {
1591
- "type": "object",
1592
- "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",
1593
- "properties": {
1594
- "portal_widget": {
1595
- "type": "object",
1596
- "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",
1597
- "properties": {
1598
- "portal_id": {
1599
- "$ref": "#/components/schemas/BaseUUID"
1600
- },
1601
- "block_id": {
1602
- "$ref": "#/components/schemas/BaseUUID"
1603
- }
1604
- },
1605
- "required": [
1606
- "portal_id",
1607
- "block_id"
1608
- ],
1609
- "additionalProperties": false
1610
- },
1611
- "email": {
1612
- "type": "object",
1613
- "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",
1614
- "properties": {
1615
- "automation_id": {
1616
- "$ref": "#/components/schemas/BaseUUID"
1617
- },
1618
- "template_id": {
1619
- "$ref": "#/components/schemas/BaseUUID"
1620
- }
1621
- },
1622
- "minProperties": 1,
1623
- "additionalProperties": false
1624
- }
1625
- },
1626
- "additionalProperties": false
1627
- }
1628
- },
1629
- "required": [
1630
- "type",
1631
- "product_recommendation",
1632
- "campaign"
1633
- ],
1634
- "additionalProperties": false
1635
- },
1636
- "SetupTariffChangeCampaignResponse": {
1637
- "type": "object",
1638
- "properties": {
1639
- "type": {
1640
- "type": "string",
1641
- "enum": [
1642
- "tariff_change"
1643
- ]
1644
- },
1645
- "product_recommendation_id": {
1646
- "$ref": "#/components/schemas/BaseUUID"
1647
- },
1648
- "campaign_id": {
1649
- "$ref": "#/components/schemas/BaseUUID"
1650
- },
1651
- "journey_id": {
1652
- "$ref": "#/components/schemas/BaseUUID"
1653
- },
1654
- "portal_widget_id": {
1655
- "$ref": "#/components/schemas/BaseUUID"
1656
- }
1657
- },
1658
- "required": [
1659
- "type",
1660
- "product_recommendation_id",
1661
- "campaign_id"
1662
- ],
1663
- "additionalProperties": false
1664
- }
1665
- },
1666
- "securitySchemes": {
1667
- "EpilotAuth": {
1668
- "type": "http",
1669
- "scheme": "bearer",
1670
- "description": "Authorization header with epilot OAuth2 bearer token",
1671
- "bearerFormat": "JWT"
1672
- }
1673
- },
1674
- "parameters": {
1675
- "CampaignIdPathParam": {
1676
- "name": "campaign_id",
1677
- "description": "The campaign ID",
1678
- "in": "path",
1679
- "required": true,
1680
- "schema": {
1681
- "$ref": "#/components/schemas/BaseUUID"
1682
- }
1683
- },
1684
- "RecipientIdPathParam": {
1685
- "name": "recipient_id",
1686
- "description": "The entity ID of the recipient",
1687
- "in": "path",
1688
- "required": true,
1689
- "schema": {
1690
- "$ref": "#/components/schemas/BaseUUID"
1691
- }
1692
- }
1693
- },
1694
- "responses": {
1695
- "ClientErrorResponse": {
1696
- "description": "Any error based on client data errors",
1697
- "content": {
1698
- "application/json": {
1699
- "schema": {
1700
- "$ref": "#/components/schemas/ClientError"
1701
- }
1702
- }
1703
- }
1704
- },
1705
- "ServerErrorResponse": {
1706
- "description": "Any error based on the server-side",
1707
- "content": {
1708
- "application/json": {
1709
- "schema": {
1710
- "$ref": "#/components/schemas/ServerError"
1711
- }
1712
- }
1713
- }
1714
- },
1715
- "CampaignResponse": {
1716
- "description": "Campaign entity response",
1717
- "content": {
1718
- "application/json": {
1719
- "schema": {
1720
- "type": "object",
1721
- "properties": {
1722
- "campaign": {
1723
- "$ref": "#/components/schemas/Campaign"
1724
- }
1725
- }
1726
- }
1727
- }
1728
- }
1729
- },
1730
- "JobStatusResponse": {
1731
- "description": "Campaign job status response",
1732
- "content": {
1733
- "application/json": {
1734
- "schema": {
1735
- "$ref": "#/components/schemas/JobStatus"
1736
- }
1737
- }
1738
- }
1739
- },
1740
- "RecipientResponse": {
1741
- "description": "Recipient response",
1742
- "content": {
1743
- "application/json": {
1744
- "schema": {
1745
- "$ref": "#/components/schemas/Recipient"
1746
- }
1747
- }
1748
- }
1749
- },
1750
- "RecipientsResponse": {
1751
- "description": "List of campaign recipients",
1752
- "content": {
1753
- "application/json": {
1754
- "schema": {
1755
- "type": "object",
1756
- "properties": {
1757
- "results": {
1758
- "type": "array",
1759
- "items": {
1760
- "$ref": "#/components/schemas/Recipient"
1761
- }
1762
- },
1763
- "next": {
1764
- "type": "string",
1765
- "nullable": true,
1766
- "description": "Cursor for next page of results"
1767
- },
1768
- "total": {
1769
- "type": "integer",
1770
- "description": "Total number of recipients"
1771
- }
1772
- }
1773
- }
1774
- }
1775
- }
1776
- },
1777
- "MatchCampaignsResponse": {
1778
- "description": "List of campaigns where the target entities match the given entities.",
1779
- "content": {
1780
- "application/json": {
1781
- "schema": {
1782
- "type": "object",
1783
- "properties": {
1784
- "hits": {
1785
- "type": "number",
1786
- "description": "Number of matching campaigns."
1787
- },
1788
- "results": {
1789
- "type": "array",
1790
- "description": "List of matching campaigns.",
1791
- "items": {
1792
- "type": "object",
1793
- "properties": {
1794
- "campaign": {
1795
- "$ref": "#/components/schemas/Campaign"
1796
- }
1797
- },
1798
- "required": [
1799
- "campaign"
1800
- ]
1801
- }
1802
- }
1803
- }
1804
- }
1805
- }
1806
- }
1807
- },
1808
- "DiscoverCampaignsResponse": {
1809
- "description": "The Next Best Actions the entity should see on the Entity-UI channel, priority-sorted.",
1810
- "content": {
1811
- "application/json": {
1812
- "schema": {
1813
- "type": "object",
1814
- "properties": {
1815
- "hits": {
1816
- "type": "number",
1817
- "description": "Number of matching NBAs."
1818
- },
1819
- "results": {
1820
- "type": "array",
1821
- "description": "Matching NBAs, sorted by priority (desc); one entry per campaign.",
1822
- "items": {
1823
- "type": "object",
1824
- "properties": {
1825
- "campaign_id": {
1826
- "$ref": "#/components/schemas/BaseUUID"
1827
- },
1828
- "nba": {
1829
- "$ref": "#/components/schemas/NextBestAction"
1830
- },
1831
- "status": {
1832
- "allOf": [
1833
- {
1834
- "$ref": "#/components/schemas/EntityUiStatus"
1835
- }
1836
- ],
1837
- "description": "The recipient's current Entity-UI status for this campaign, present only\nwhen a recipient record already exists (i.e. the entity has previously seen\nor clicked this NBA). Absent when the entity has not yet interacted with it.\nDismissed NBAs are filtered out server-side, so this is only ever `seen` or\n`clicked`. Lets the client skip a redundant `seen` call for NBAs already seen.\n"
1838
- }
1839
- },
1840
- "required": [
1841
- "campaign_id",
1842
- "nba"
1843
- ]
1844
- }
1845
- }
1846
- },
1847
- "required": [
1848
- "hits",
1849
- "results"
1850
- ]
1851
- }
1852
- }
1853
- }
1854
- },
1855
- "MatchTargetsResponse": {
1856
- "description": "List of targets where the given entities are found.",
1857
- "content": {
1858
- "application/json": {
1859
- "schema": {
1860
- "type": "object",
1861
- "properties": {
1862
- "hits": {
1863
- "type": "number",
1864
- "description": "Number of matching targets."
1865
- },
1866
- "results": {
1867
- "type": "array",
1868
- "description": "List of matching targets.",
1869
- "items": {
1870
- "type": "object",
1871
- "properties": {
1872
- "target": {
1873
- "$ref": "#/components/schemas/Target"
1874
- }
1875
- },
1876
- "required": [
1877
- "target"
1878
- ]
1879
- }
1880
- }
1881
- }
1882
- }
1883
- }
1884
- }
1885
- },
1886
- "GetTargetQueriesResponse": {
1887
- "description": "List of transformed target queries.",
1888
- "content": {
1889
- "application/json": {
1890
- "schema": {
1891
- "type": "object",
1892
- "properties": {
1893
- "results": {
1894
- "type": "array",
1895
- "description": "List of target query results.",
1896
- "items": {
1897
- "$ref": "#/components/schemas/TargetQueryResult"
1898
- }
1899
- }
1900
- },
1901
- "required": [
1902
- "results"
1903
- ]
1904
- }
1905
- }
1906
- }
1907
- },
1908
- "CampaignPortalsResponse": {
1909
- "description": "List of portals and its widgets where the campaign is used",
1910
- "content": {
1911
- "application/json": {
1912
- "schema": {
1913
- "type": "array",
1914
- "items": {
1915
- "type": "object",
1916
- "properties": {
1917
- "portal": {
1918
- "type": "object",
1919
- "properties": {
1920
- "origin": {
1921
- "type": "string",
1922
- "description": "The origin of the portal"
1923
- },
1924
- "domain": {
1925
- "type": "string",
1926
- "description": "The domain of the portal"
1927
- },
1928
- "name": {
1929
- "type": "string",
1930
- "description": "The name of the portal"
1931
- }
1932
- }
1933
- },
1934
- "widgets": {
1935
- "type": "array",
1936
- "items": {
1937
- "type": "object",
1938
- "properties": {
1939
- "id": {
1940
- "type": "string",
1941
- "description": "The ID of the widget"
1942
- },
1943
- "headline": {
1944
- "type": "object",
1945
- "properties": {
1946
- "en": {
1947
- "type": "string",
1948
- "description": "The headline in English"
1949
- },
1950
- "de": {
1951
- "type": "string",
1952
- "description": "The headline in German"
1953
- }
1954
- }
1955
- }
1956
- },
1957
- "required": [
1958
- "id"
1959
- ]
1960
- }
1961
- }
1962
- },
1963
- "required": [
1964
- "portal",
1965
- "widgets"
1966
- ]
1967
- }
1968
- }
1969
- }
1970
- }
1971
- },
1972
- "SetupCampaignResponse": {
1973
- "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",
1974
- "content": {
1975
- "application/json": {
1976
- "schema": {
1977
- "oneOf": [
1978
- {
1979
- "$ref": "#/components/schemas/SetupTariffChangeCampaignResponse"
1980
- }
1981
- ],
1982
- "discriminator": {
1983
- "propertyName": "type",
1984
- "mapping": {
1985
- "tariff_change": "#/components/schemas/SetupTariffChangeCampaignResponse"
1986
- }
1987
- }
1988
- }
1989
- }
1990
- }
1991
- },
1992
- "RetriggerAutomationsResponse": {
1993
- "description": "Response to a request to retrigger automations for campaign recipients",
1994
- "content": {
1995
- "application/json": {
1996
- "schema": {
1997
- "type": "object",
1998
- "properties": {
1999
- "message": {
2000
- "type": "string",
2001
- "description": "A confirmation message indicating the request was received and processed"
2002
- },
2003
- "results": {
2004
- "type": "array",
2005
- "description": "List of retriggering results",
2006
- "items": {
2007
- "$ref": "#/components/schemas/RetriggerAutomationsResult"
2008
- }
2009
- }
2010
- },
2011
- "required": [
2012
- "message",
2013
- "results"
2014
- ]
2015
- }
2016
- }
2017
- }
2018
- }
2019
- }
2020
- }
2021
- }