@celigo/api-specs 0.2.3 → 0.2.4-IO-168454-EPIC-fb

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 (52) hide show
  1. package/README.md +71 -80
  2. package/dist/account.yml +456 -55
  3. package/dist/agent.yml +15 -0
  4. package/dist/ai-agent.yml +1000 -192
  5. package/dist/alert.yml +1226 -0
  6. package/dist/api.yml +6375 -178
  7. package/dist/apim.yml +0 -4
  8. package/dist/asynchelper.yml +441 -62
  9. package/dist/audit.yml +57 -2
  10. package/dist/bartendertemplate.yml +508 -0
  11. package/dist/connection.yml +2533 -189
  12. package/dist/connector.yml +8 -0
  13. package/dist/ediprofile.yml +15 -0
  14. package/dist/editransaction.yml +250 -14
  15. package/dist/enduser.yml +6063 -47
  16. package/dist/environment.yml +8 -0
  17. package/dist/eventreport.yml +8 -0
  18. package/dist/export.yml +1624 -1804
  19. package/dist/filedefinition.yml +47 -0
  20. package/dist/filedefinitionrules.yml +722 -0
  21. package/dist/fileserver.yml +1457 -0
  22. package/dist/filestorage.yml +1087 -535
  23. package/dist/flow.yml +896 -209
  24. package/dist/guardrail.yml +310 -499
  25. package/dist/httpconnector.yml +8 -0
  26. package/dist/httpconnectorendpoint.yml +610 -126
  27. package/dist/httpconnectorresource.yml +1160 -84
  28. package/dist/iclient.yml +245 -114
  29. package/dist/import.yml +2583 -448
  30. package/dist/integration.yml +1114 -45
  31. package/dist/job.yml +188 -92
  32. package/dist/lookupcache.yml +45 -14
  33. package/dist/marketplace.yml +352 -107
  34. package/dist/mcp-oauth-provider.yml +15 -30
  35. package/dist/mcp-server.yml +7004 -68
  36. package/dist/networkpolicy.yml +1221 -0
  37. package/dist/notification.yml +59 -9
  38. package/dist/processor.yml +8 -3
  39. package/dist/recyclebin.yml +32 -2
  40. package/dist/script.yml +91 -16
  41. package/dist/stack.yml +642 -5
  42. package/dist/storagequery.yml +935 -0
  43. package/dist/subscription.yml +428 -67
  44. package/dist/sync.yml +435 -79
  45. package/dist/tag.yml +8 -0
  46. package/dist/template.yml +47 -1
  47. package/dist/tool.yml +7932 -3273
  48. package/dist/topic.yml +1806 -0
  49. package/dist/tradingpartnerconnector.yml +18 -0
  50. package/dist/user.yml +465 -42
  51. package/package.json +13 -1
  52. package/schemas.json +2358 -1887
package/dist/topic.yml ADDED
@@ -0,0 +1,1806 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: Topics
5
+ description: Manage Event Streams topics — durable event streams that buffer published messages for topic exports.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ API for managing Event Streams topics: account-level, durable message channels. A topic import
9
+ step (or POST /v1/topics/{_id}/publish) appends messages; each subscribed topic export step reads
10
+ them independently; messages expire after retentionMs. Topics are registered on integrations like
11
+ lookup caches (Integration._registeredTopicIds) through the /v1/integrations/{_id}/topics routes.
12
+ servers:
13
+ - url: https://api.integrator.io
14
+ description: Production (US / default region)
15
+ - url: https://api.eu.integrator.io
16
+ description: Production (EU region)
17
+ - url: https://api.au.integrator.io
18
+ description: Production (AU region)
19
+ - url: https://api.ca.integrator.io
20
+ description: Production (CA region)
21
+ security:
22
+ - bearerAuth: []
23
+ tags:
24
+ - name: Topics
25
+ description: |-
26
+ Topics are durable event streams that decouple the flows that publish messages from the flows
27
+ that consume them: a topic import step (or `POST /v1/topics/{_id}/publish`) appends messages, each
28
+ subscribed topic export step reads them at its own pace, and messages expire after the topic's
29
+ `retentionMs`. Event Streams is a licensed feature: listing topics works on every account, but
30
+ creating or updating a topic and every message operation require the `topics` entitlement —
31
+ without it they fail with `topics_subscription_required` (a 422 validation error on topic writes,
32
+ 403 on the message endpoints) — and the license also caps how many topics the account may hold
33
+ (`topicsAllowed`) and the longest retention allowed (`retentionCeilingDays`).
34
+
35
+ ## Topic schema
36
+
37
+ {% openapi-schemas spec="topic" schemas="Topic" grouped="true" %}
38
+ paths:
39
+ /v1/topics:
40
+ get:
41
+ x-internal: false
42
+ summary: List topics
43
+ description: |-
44
+ Returns the account's topics sorted by `name` ascending (ties by most recently modified first).
45
+ Topics in the recycle bin are not included. `include` and `exclude` projections are not
46
+ supported on this resource.
47
+ operationId: listTopics
48
+ tags:
49
+ - Topics
50
+ parameters:
51
+ - name: limit
52
+ in: query
53
+ required: false
54
+ description: Maximum number of topics to return per page. Omit to return all topics.
55
+ schema:
56
+ type: integer
57
+ minimum: 1
58
+ examples:
59
+ - 100
60
+ - name: sort_by
61
+ in: query
62
+ required: false
63
+ description: Field to sort by. Any other field name is rejected.
64
+ schema:
65
+ type: string
66
+ enum:
67
+ - name
68
+ - lastModified
69
+ x-enumDescriptions:
70
+ name: Alphabetical by display name (the default)
71
+ lastModified: Most recently modified first
72
+ examples:
73
+ - lastModified
74
+ - $ref: '#/components/parameters/After'
75
+ - name: externalId
76
+ in: query
77
+ required: false
78
+ description: |-
79
+ Return only topics whose `externalId` equals this value. Repeat the parameter to match any of
80
+ several values.
81
+ schema:
82
+ type: string
83
+ examples:
84
+ - erp-orders-created
85
+ responses:
86
+ '200':
87
+ description: Array of topics.
88
+ headers:
89
+ Link:
90
+ description: |-
91
+ RFC 5988 pagination link. Includes `<...>; rel="next"` with an `after` cursor when more
92
+ topics remain; absent on the final page.
93
+ schema:
94
+ type: string
95
+ content:
96
+ application/json:
97
+ schema:
98
+ type: array
99
+ items:
100
+ $ref: '#/components/schemas/Topic'
101
+ examples:
102
+ default:
103
+ value:
104
+ - _id: 6aab2870265e1cf39fcbee4d
105
+ _userId: 624cb0346309dc3a543733a2
106
+ name: orders.created
107
+ description: One event per order placed. Consumed by the fulfillment and finance flows.
108
+ retentionMs: 604800000
109
+ createdAt: '2026-09-16T23:38:24.578Z'
110
+ lastModified: '2026-09-16T23:38:24.578Z'
111
+ - _id: 6aab2870bb44c84f7b77e9f7
112
+ _userId: 624cb0346309dc3a543733a2
113
+ name: orders.fulfillment
114
+ description: Pick, pack and ship instructions emitted by the fulfillment flow, one per order.
115
+ retentionMs: 3600000
116
+ externalId: wms-fulfillment
117
+ createdAt: '2026-09-16T23:38:24.885Z'
118
+ lastModified: '2026-09-16T23:38:24.885Z'
119
+ '204':
120
+ description: No topics match — the account has none, or none carry the requested `externalId`.
121
+ '400':
122
+ description: |-
123
+ `after` is not a cursor issued by this endpoint, or `sort_by` names an unsupported field.
124
+ Error code: `invalid_query_param`.
125
+ content:
126
+ application/json:
127
+ schema:
128
+ $ref: '#/components/schemas/Error'
129
+ examples:
130
+ bad_sort:
131
+ value:
132
+ errors:
133
+ - code: invalid_query_param
134
+ message: The query parameter "sort_by" has invalid value.
135
+ '401':
136
+ $ref: '#/components/responses/401-unauthorized'
137
+ '422':
138
+ description: '`limit` is not a positive integer. Error code: `invalid_query_param`.'
139
+ content:
140
+ application/json:
141
+ schema:
142
+ $ref: '#/components/schemas/Error'
143
+ examples:
144
+ bad_limit:
145
+ value:
146
+ errors:
147
+ - code: invalid_query_param
148
+ message: Invalid limit sent in request.
149
+ post:
150
+ x-internal: false
151
+ summary: Create a topic
152
+ description: |-
153
+ Creates a topic and counts it against the license's `topics.topicsAllowed` quota. The stream
154
+ itself is provisioned lazily on the first publish, so a new topic reports no messages until
155
+ something is published to it. Pass `__integrationIds` to register the topic on integrations in the
156
+ same call; otherwise register it later with the `/v1/integrations/{_id}/topics/…/register`
157
+ operations so flows in those integrations can bind to it.
158
+ operationId: createTopic
159
+ tags:
160
+ - Topics
161
+ x-celigo-ai-guidance:
162
+ - |-
163
+ The account quota is enforced only on create and on restore from the recycle bin: when the
164
+ account already holds `topics.topicsAllowed` active topics the call fails with 422
165
+ `topics_limit_exceeded`. Topics sitting in the recycle bin do not count — delete or purge an
166
+ unused topic first.
167
+ requestBody:
168
+ required: true
169
+ content:
170
+ application/json:
171
+ schema:
172
+ $ref: '#/components/schemas/Request'
173
+ examples:
174
+ minimal:
175
+ summary: Name only — seven-day retention
176
+ value:
177
+ name: orders.created
178
+ full:
179
+ summary: Custom retention, external key, registered on one integration
180
+ value:
181
+ name: orders.fulfillment
182
+ description: Pick, pack and ship instructions emitted by the fulfillment flow, one per order.
183
+ retentionMs: 3600000
184
+ externalId: wms-fulfillment
185
+ __integrationIds:
186
+ - 6ab1f4a138d7733b45998d99
187
+ responses:
188
+ '201':
189
+ description: |-
190
+ Created topic. When `__integrationIds` was sent and some registrations failed, the body also
191
+ carries `__failedIntegrationRegistrations`, an array of `{_integrationId, error}` entries — the
192
+ topic itself was still created.
193
+ content:
194
+ application/json:
195
+ schema:
196
+ $ref: '#/components/schemas/Topic'
197
+ examples:
198
+ created:
199
+ value:
200
+ _id: 6aab2870bb44c84f7b77e9f7
201
+ _userId: 624cb0346309dc3a543733a2
202
+ name: orders.fulfillment
203
+ description: Pick, pack and ship instructions emitted by the fulfillment flow, one per order.
204
+ retentionMs: 3600000
205
+ externalId: wms-fulfillment
206
+ createdAt: '2026-09-16T23:38:24.885Z'
207
+ lastModified: '2026-09-16T23:38:24.885Z'
208
+ '401':
209
+ $ref: '#/components/responses/401-unauthorized'
210
+ '404':
211
+ description: An id in `__integrationIds` does not belong to an integration in this account. Nothing is created.
212
+ content:
213
+ application/json:
214
+ schema:
215
+ $ref: '#/components/schemas/Error'
216
+ examples:
217
+ unknown_integration:
218
+ value:
219
+ errors:
220
+ - field: _id
221
+ code: invalid_ref
222
+ message: unable to find integration for the given id.
223
+ '422':
224
+ description: |-
225
+ Validation failed. `retentionMs` outside its bounds (`min`, `max`), above the license ceiling
226
+ (`topics_retention_exceeds_entitlement`), or not numeric (`invalid_field`); `name` longer than
227
+ 200 characters (`maxlength`); `description` or `externalId` over their size limits
228
+ (`size_limit_exceeded`); the account at its topic quota (`topics_limit_exceeded`); an account
229
+ without the Event Streams entitlement (`topics_subscription_required`); or a malformed
230
+ `__integrationIds` (`invalid_request`, `invalid_ref`).
231
+ content:
232
+ application/json:
233
+ schema:
234
+ $ref: '#/components/schemas/Error'
235
+ examples:
236
+ retention_above_ceiling:
237
+ value:
238
+ errors:
239
+ - field: _id
240
+ code: topics_retention_exceeds_entitlement
241
+ message: The requested retention exceeds your account's topic retention ceiling of 90 days. Contact your account manager to raise it.
242
+ - field: retentionMs
243
+ code: max
244
+ message: Path `retentionMs` (7776000001) is more than maximum allowed value (7776000000).
245
+ quota_reached:
246
+ value:
247
+ errors:
248
+ - field: _id
249
+ code: topics_limit_exceeded
250
+ message: You have reached your topic limit of 20. Delete an unused topic or contact your account manager to raise the limit.
251
+ duplicate_integration_ids:
252
+ value:
253
+ errors:
254
+ - code: invalid_request
255
+ message: __integrationIds must not contain duplicate integration IDs.
256
+ /v1/topics/{_id}:
257
+ get:
258
+ x-internal: false
259
+ summary: Get a topic
260
+ description: |-
261
+ Returns a topic's configuration. Read its messages with `GET /v1/topics/{_id}/messages`. A topic
262
+ in the recycle bin is reported as not found; restore it first.
263
+ operationId: getTopicById
264
+ tags:
265
+ - Topics
266
+ parameters:
267
+ - name: _id
268
+ in: path
269
+ required: true
270
+ description: Topic id.
271
+ schema:
272
+ type: string
273
+ format: objectId
274
+ x-celigo-refModel: topics
275
+ examples:
276
+ - 6aab2870265e1cf39fcbee4d
277
+ responses:
278
+ '200':
279
+ description: Topic object.
280
+ content:
281
+ application/json:
282
+ schema:
283
+ $ref: '#/components/schemas/Topic'
284
+ examples:
285
+ default:
286
+ value:
287
+ _id: 6aab2870265e1cf39fcbee4d
288
+ _userId: 624cb0346309dc3a543733a2
289
+ name: orders.created
290
+ description: One event per order placed. Consumed by the fulfillment and finance flows.
291
+ retentionMs: 604800000
292
+ createdAt: '2026-09-16T23:38:24.578Z'
293
+ lastModified: '2026-09-16T23:38:24.578Z'
294
+ '400':
295
+ description: '`_id` is not a 24-character hexadecimal ObjectId. Error code: `invalid_ref`.'
296
+ content:
297
+ application/json:
298
+ schema:
299
+ $ref: '#/components/schemas/Error'
300
+ examples:
301
+ malformed_id:
302
+ value:
303
+ errors:
304
+ - code: invalid_ref
305
+ message: Please provide a valid _id.
306
+ '401':
307
+ $ref: '#/components/responses/401-unauthorized'
308
+ '404':
309
+ description: |-
310
+ No active topic has this id. A topic in the recycle bin answers with the message "You are
311
+ trying to access a Topic that is already in the Recycle Bin…"; restore it with
312
+ `POST /v1/recycleBinTTL/topics/{_id}`.
313
+ content:
314
+ application/json:
315
+ schema:
316
+ $ref: '#/components/schemas/Error'
317
+ examples:
318
+ not_found:
319
+ value:
320
+ errors:
321
+ - code: invalid_ref
322
+ message: Topic not found.
323
+ in_recycle_bin:
324
+ value:
325
+ errors:
326
+ - code: invalid_ref
327
+ message: You are trying to access a Topic that is already in the Recycle Bin. Please restore it from the Recycle Bin and try your request again.
328
+ put:
329
+ x-internal: false
330
+ summary: Update a topic
331
+ description: |-
332
+ Replaces the topic's writable fields with the request body. Fields left out are cleared, not
333
+ kept: `description` and `externalId` are removed and `retentionMs` reverts to seven days — send
334
+ the full document, or use PATCH to change `name` or `description` alone. Read-only fields in the
335
+ body are ignored. Changing `retentionMs` re-configures the stream's retention window;
336
+ the topic id and its subscriptions are unaffected.
337
+ operationId: updateTopic
338
+ tags:
339
+ - Topics
340
+ parameters:
341
+ - name: _id
342
+ in: path
343
+ required: true
344
+ description: Topic id.
345
+ schema:
346
+ type: string
347
+ format: objectId
348
+ x-celigo-refModel: topics
349
+ examples:
350
+ - 6aab2870265e1cf39fcbee4d
351
+ requestBody:
352
+ required: true
353
+ content:
354
+ application/json:
355
+ schema:
356
+ $ref: '#/components/schemas/Request'
357
+ examples:
358
+ shorten_retention:
359
+ summary: Shorten retention to one day
360
+ value:
361
+ name: orders.created
362
+ description: One event per order placed. Consumed by the fulfillment and finance flows.
363
+ retentionMs: 86400000
364
+ responses:
365
+ '200':
366
+ description: Updated topic.
367
+ content:
368
+ application/json:
369
+ schema:
370
+ $ref: '#/components/schemas/Topic'
371
+ examples:
372
+ updated:
373
+ value:
374
+ _id: 6aab2870265e1cf39fcbee4d
375
+ _userId: 624cb0346309dc3a543733a2
376
+ name: orders.created
377
+ description: One event per order placed. Consumed by the fulfillment and finance flows.
378
+ retentionMs: 86400000
379
+ createdAt: '2026-09-16T23:38:24.578Z'
380
+ lastModified: '2026-09-22T02:51:12.733Z'
381
+ '401':
382
+ $ref: '#/components/responses/401-unauthorized'
383
+ '404':
384
+ $ref: '#/components/responses/404-not-found'
385
+ '422':
386
+ description: |-
387
+ Validation failed — the same codes as on create: `min`, `max`,
388
+ `topics_retention_exceeds_entitlement`, `invalid_field` for `retentionMs`; `maxlength` for
389
+ `name`; `size_limit_exceeded` for `description` or `externalId`;
390
+ `topics_subscription_required` when the account lacks the Event Streams entitlement.
391
+ content:
392
+ application/json:
393
+ schema:
394
+ $ref: '#/components/schemas/Error'
395
+ examples:
396
+ retention_too_short:
397
+ value:
398
+ errors:
399
+ - field: retentionMs
400
+ code: min
401
+ message: Path `retentionMs` (3599999) is less than minimum allowed value (3600000).
402
+ patch:
403
+ x-internal: false
404
+ summary: Patch a topic
405
+ description: |-
406
+ Applies a JSON Patch document (RFC 6902) to the topic. Only `/name` and `/description` are
407
+ patchable; every other path — including `/retentionMs` and `/externalId` — is rejected, so use
408
+ PUT to change those. Unlike PUT, fields not named in the patch are left untouched.
409
+ operationId: patchTopic
410
+ tags:
411
+ - Topics
412
+ parameters:
413
+ - name: _id
414
+ in: path
415
+ required: true
416
+ description: Topic id.
417
+ schema:
418
+ type: string
419
+ format: objectId
420
+ x-celigo-refModel: topics
421
+ examples:
422
+ - 6aab2870265e1cf39fcbee4d
423
+ requestBody:
424
+ required: true
425
+ content:
426
+ application/json:
427
+ schema:
428
+ $ref: '#/components/schemas/JsonPatchRequest'
429
+ examples:
430
+ rename:
431
+ summary: Rename and clear the description
432
+ value:
433
+ - op: replace
434
+ path: /name
435
+ value: orders.created.v2
436
+ - op: remove
437
+ path: /description
438
+ responses:
439
+ '204':
440
+ description: Topic patched. No body returned.
441
+ '401':
442
+ $ref: '#/components/responses/401-unauthorized'
443
+ '404':
444
+ $ref: '#/components/responses/404-not-found'
445
+ '422':
446
+ description: |-
447
+ A path other than `/name` or `/description` was patched ("… is not a whitelisted property"),
448
+ or the new value failed validation (for example `maxlength` on `/name`).
449
+ content:
450
+ application/json:
451
+ schema:
452
+ $ref: '#/components/schemas/Error'
453
+ examples:
454
+ not_whitelisted:
455
+ value:
456
+ errors:
457
+ - message: /retentionMs is not a whitelisted property
458
+ delete:
459
+ x-internal: false
460
+ summary: Delete a topic
461
+ description: |-
462
+ Moves the topic to the recycle bin, where it is kept for 30 days before being purged, and removes
463
+ it from `_registeredTopicIds` on every integration that had it registered; restoring it does not
464
+ re-register it. Its retained messages are kept and become readable again if the topic is
465
+ restored, and are gone for good once the topic is purged. Deletion is refused while any export or
466
+ import still binds to the topic through `topic._topicId`, or a flow still contains such a step —
467
+ delete or repoint those first, and purge them from the recycle bin before purging the topic.
468
+ operationId: deleteTopic
469
+ tags:
470
+ - Topics
471
+ parameters:
472
+ - name: _id
473
+ in: path
474
+ required: true
475
+ description: Topic id.
476
+ schema:
477
+ type: string
478
+ format: objectId
479
+ x-celigo-refModel: topics
480
+ examples:
481
+ - 6aab2870265e1cf39fcbee4d
482
+ responses:
483
+ '204':
484
+ description: Topic moved to the recycle bin.
485
+ '401':
486
+ $ref: '#/components/responses/401-unauthorized'
487
+ '404':
488
+ $ref: '#/components/responses/404-not-found'
489
+ '422':
490
+ description: An export, import, or flow still references the topic. Error code `dependencies_not_deleted`, one entry per blocking resource.
491
+ content:
492
+ application/json:
493
+ schema:
494
+ $ref: '#/components/schemas/Error'
495
+ examples:
496
+ listener_still_bound:
497
+ value:
498
+ errors:
499
+ - code: dependencies_not_deleted
500
+ message: export 6ab1f5b671fc8127d374d4ed must be deleted before you can delete topic 6aab2870265e1cf39fcbee4d
501
+ /v1/topics/{_id}/messages:
502
+ get:
503
+ x-internal: false
504
+ summary: List retained messages
505
+ description: |-
506
+ Reads the messages currently retained on a topic, oldest first, without affecting any
507
+ listener's read position — use it to inspect what producers are publishing or to confirm a
508
+ purge. Pages are cursor-based: follow `nextPageURL` until it is absent. Query parameters other
509
+ than the four below are ignored.
510
+ operationId: listTopicMessages
511
+ tags:
512
+ - Topics
513
+ parameters:
514
+ - name: _id
515
+ in: path
516
+ required: true
517
+ description: Topic id.
518
+ schema:
519
+ type: string
520
+ format: objectId
521
+ x-celigo-refModel: topics
522
+ examples:
523
+ - 6aab2870265e1cf39fcbee4d
524
+ - name: limit
525
+ in: query
526
+ required: false
527
+ description: Maximum number of messages per page.
528
+ schema:
529
+ type: integer
530
+ minimum: 1
531
+ maximum: 100
532
+ default: 50
533
+ examples:
534
+ - 20
535
+ - name: afterOffset
536
+ in: query
537
+ required: false
538
+ description: |-
539
+ Continuation cursor from the previous page's `nextPageURL`; returns messages after that
540
+ position. Take it from `nextPageURL` rather than computing it.
541
+ schema:
542
+ type: string
543
+ examples:
544
+ - '49'
545
+ - name: time_gt
546
+ in: query
547
+ required: false
548
+ description: Only messages published strictly after this time, as Unix epoch milliseconds.
549
+ schema:
550
+ type: integer
551
+ format: int64
552
+ examples:
553
+ - 1790047477000
554
+ - name: time_lte
555
+ in: query
556
+ required: false
557
+ description: Only messages published at or before this time, as Unix epoch milliseconds.
558
+ schema:
559
+ type: integer
560
+ format: int64
561
+ examples:
562
+ - 1790047500000
563
+ responses:
564
+ '200':
565
+ description: One page of messages. `messages` is empty when nothing is retained in the requested window.
566
+ content:
567
+ application/json:
568
+ schema:
569
+ $ref: '#/components/schemas/TopicMessagesResponse'
570
+ examples:
571
+ page:
572
+ summary: First of several pages
573
+ value:
574
+ messages:
575
+ - timestamp: '2026-09-22T03:24:35.992Z'
576
+ payload:
577
+ orderId: SO-1001
578
+ total: 42.5
579
+ - timestamp: '2026-09-22T03:24:35.992Z'
580
+ payload:
581
+ orderId: SO-1002
582
+ total: 18
583
+ nextPageURL: /v1/topics/6aab2870265e1cf39fcbee4d/messages?limit=2&afterOffset=1
584
+ empty:
585
+ summary: Nothing retained
586
+ value:
587
+ messages: []
588
+ '400':
589
+ description: |-
590
+ A query parameter is malformed: `limit` outside 1–100 (`invalid_limit`), `time_gt` or
591
+ `time_lte` not epoch milliseconds (`invalid_time_gt`, `invalid_time_lte`), or `afterOffset`
592
+ not a cursor issued by this endpoint (`invalid_after_offset`).
593
+ content:
594
+ application/json:
595
+ schema:
596
+ $ref: '#/components/schemas/Error'
597
+ examples:
598
+ bad_limit:
599
+ value:
600
+ errors:
601
+ - code: invalid_limit
602
+ message: limit must be an integer between 1 and 100
603
+ source: internal
604
+ bad_time:
605
+ value:
606
+ errors:
607
+ - code: invalid_time_gt
608
+ message: time_gt must be a Unix timestamp in milliseconds
609
+ source: internal
610
+ '401':
611
+ $ref: '#/components/responses/401-unauthorized'
612
+ '404':
613
+ $ref: '#/components/responses/404-not-found'
614
+ delete:
615
+ x-internal: false
616
+ summary: Purge retained messages
617
+ description: |-
618
+ Removes every retained message from the topic while keeping the topic, its retention setting,
619
+ and its subscriptions; the purge cannot be undone. Records an audit entry with `event: purge`
620
+ and `fieldChanges[0].fieldPath: messages`. To remove the topic itself, use
621
+ `DELETE /v1/topics/{_id}`.
622
+ operationId: purgeTopicMessages
623
+ tags:
624
+ - Topics
625
+ parameters:
626
+ - name: _id
627
+ in: path
628
+ required: true
629
+ description: Topic id.
630
+ schema:
631
+ type: string
632
+ format: objectId
633
+ x-celigo-refModel: topics
634
+ examples:
635
+ - 6aab2870265e1cf39fcbee4d
636
+ responses:
637
+ '200':
638
+ description: Purge result.
639
+ content:
640
+ application/json:
641
+ schema:
642
+ $ref: '#/components/schemas/PurgeMessagesResponse'
643
+ examples:
644
+ purged:
645
+ value:
646
+ deleted: true
647
+ nothing_to_purge:
648
+ value:
649
+ deleted: false
650
+ '401':
651
+ $ref: '#/components/responses/401-unauthorized'
652
+ '404':
653
+ $ref: '#/components/responses/404-not-found'
654
+ /v1/topics/{_id}/publish:
655
+ post:
656
+ x-internal: false
657
+ summary: Publish messages to a topic
658
+ description: |-
659
+ Appends messages to the topic in the order given, so every subscribed topic export receives them
660
+ on its next read. The first publish to a new topic provisions its stream, which can take a few
661
+ seconds longer than later calls. Oversized messages are rejected individually while the rest of
662
+ the batch is still published — always check `responses[].statusCode`.
663
+ operationId: publishTopicMessages
664
+ tags:
665
+ - Topics
666
+ parameters:
667
+ - name: _id
668
+ in: path
669
+ required: true
670
+ description: Topic id.
671
+ schema:
672
+ type: string
673
+ format: objectId
674
+ x-celigo-refModel: topics
675
+ examples:
676
+ - 6aab2870265e1cf39fcbee4d
677
+ requestBody:
678
+ required: true
679
+ content:
680
+ application/json:
681
+ schema:
682
+ $ref: '#/components/schemas/PublishRequest'
683
+ examples:
684
+ two_orders:
685
+ value:
686
+ messages:
687
+ - orderId: SO-1001
688
+ total: 42.5
689
+ - orderId: SO-1002
690
+ total: 18
691
+ responses:
692
+ '200':
693
+ description: |-
694
+ Per-message results in request order. A 200 means the request was accepted, not that every
695
+ message was published.
696
+ content:
697
+ application/json:
698
+ schema:
699
+ $ref: '#/components/schemas/PublishResponse'
700
+ examples:
701
+ all_published:
702
+ value:
703
+ responses:
704
+ - statusCode: 200
705
+ _json: {}
706
+ - statusCode: 200
707
+ _json: {}
708
+ one_too_large:
709
+ summary: Second message rejected for size, first one published
710
+ value:
711
+ responses:
712
+ - statusCode: 200
713
+ _json: {}
714
+ - statusCode: 422
715
+ errors:
716
+ - code: topic_publish_event_too_large
717
+ message: Message at index 1 exceeds the maximum allowed size of 1048576 bytes.
718
+ source: resource
719
+ resolved: false
720
+ occurredAt: 1790047646930
721
+ '400':
722
+ description: '`messages` is missing or not an array. Error code: `invalid_messages`.'
723
+ content:
724
+ application/json:
725
+ schema:
726
+ $ref: '#/components/schemas/Error'
727
+ examples:
728
+ not_an_array:
729
+ value:
730
+ errors:
731
+ - code: invalid_messages
732
+ message: The "messages" field is required and must be a JSON array of objects to publish.
733
+ source: internal
734
+ '401':
735
+ $ref: '#/components/responses/401-unauthorized'
736
+ '404':
737
+ $ref: '#/components/responses/404-not-found'
738
+ /v1/topics/{_id}/exports/{_exportId}/offsets:
739
+ get:
740
+ x-internal: false
741
+ summary: Get a listener's read position
742
+ description: |-
743
+ Reports how far a topic export (listener) has read on this topic — where its next run resumes.
744
+ Use it to check whether a listener is keeping up or has never run. The export must belong to the
745
+ account but need not subscribe to this topic; an export that does not simply has no cursor.
746
+ operationId: getTopicExportOffsets
747
+ tags:
748
+ - Topics
749
+ parameters:
750
+ - name: _id
751
+ in: path
752
+ required: true
753
+ description: Topic id.
754
+ schema:
755
+ type: string
756
+ format: objectId
757
+ x-celigo-refModel: topics
758
+ examples:
759
+ - 6aab2870265e1cf39fcbee4d
760
+ - name: _exportId
761
+ in: path
762
+ required: true
763
+ description: 'Id of the topic export (`adaptorType: TopicExport`) whose position to read.'
764
+ schema:
765
+ type: string
766
+ format: objectId
767
+ x-celigo-refModel: exports
768
+ examples:
769
+ - 6ab1f5b671fc8127d374d4ed
770
+ responses:
771
+ '200':
772
+ description: Read position of the export on this topic.
773
+ content:
774
+ application/json:
775
+ schema:
776
+ $ref: '#/components/schemas/TopicExportOffsets'
777
+ examples:
778
+ consuming:
779
+ summary: Listener that has committed a position
780
+ value:
781
+ hasCursor: true
782
+ offset: 1287
783
+ never_consumed:
784
+ summary: Listener that has not read this topic yet
785
+ value:
786
+ hasCursor: false
787
+ offset: -1
788
+ '401':
789
+ $ref: '#/components/responses/401-unauthorized'
790
+ '404':
791
+ description: The topic or the export does not exist in this account.
792
+ content:
793
+ application/json:
794
+ schema:
795
+ $ref: '#/components/schemas/Error'
796
+ examples:
797
+ export_not_found:
798
+ value:
799
+ errors:
800
+ - code: invalid_ref
801
+ message: Export not found.
802
+ /v1/topics/{_id}/audit:
803
+ get:
804
+ x-internal: false
805
+ summary: Get audit log for a topic
806
+ description: |-
807
+ Returns the change history for a topic, newest first: who changed what and when, including
808
+ message purges, recycle-bin deletes and restores. Works for a topic in the recycle bin; once the
809
+ topic is purged, query `GET /v1/audit?resourceType=topic&_resourceId={_id}` instead.
810
+ operationId: getTopicAudit
811
+ tags:
812
+ - Topics
813
+ parameters:
814
+ - name: _id
815
+ in: path
816
+ description: Topic id.
817
+ required: true
818
+ schema:
819
+ type: string
820
+ format: objectId
821
+ x-celigo-refModel: topics
822
+ examples:
823
+ - 6aab2870265e1cf39fcbee4d
824
+ - name: limit
825
+ in: query
826
+ description: Maximum number of audit entries to return per page.
827
+ required: false
828
+ schema:
829
+ type: integer
830
+ minimum: 1
831
+ maximum: 1000
832
+ default: 1000
833
+ examples:
834
+ - 100
835
+ - name: after
836
+ in: query
837
+ required: false
838
+ description: |-
839
+ Opaque pagination cursor for the next page. Take it from the `after` value in the `Link`
840
+ response header's `rel="next"` URL rather than constructing it.
841
+ schema:
842
+ type: string
843
+ examples:
844
+ - W3siJGRhdGUiOiIyMDI2LTA5LTIyVDAzOjIyOjQzLjkyNVoifSwiNmFiMWY0ODM3YzRiNGU2OTlmZTg1NWI2Il0
845
+ - name: from
846
+ in: query
847
+ required: false
848
+ description: Only return entries at or after this timestamp.
849
+ schema:
850
+ type: string
851
+ format: date-time
852
+ examples:
853
+ - '2026-09-01T00:00:00.000Z'
854
+ - name: to
855
+ in: query
856
+ required: false
857
+ description: Only return entries at or before this timestamp.
858
+ schema:
859
+ type: string
860
+ format: date-time
861
+ examples:
862
+ - '2026-09-30T23:59:59.999Z'
863
+ - name: action
864
+ in: query
865
+ required: false
866
+ description: |-
867
+ Filter by the change type. Maps to the `event` field on each entry; a value outside the
868
+ platform's audit vocabulary is rejected with 422 `invalid_audit_field`.
869
+ schema:
870
+ type: string
871
+ enum:
872
+ - create
873
+ - update
874
+ - delete
875
+ - view
876
+ - restore
877
+ - purge
878
+ - signin
879
+ - signout
880
+ - purgelogs
881
+ examples:
882
+ - purge
883
+ x-enumDescriptions:
884
+ create: A resource was created.
885
+ update: A resource was modified.
886
+ delete: A resource was deleted (moved to recycle bin).
887
+ view: A resource was viewed or accessed.
888
+ restore: A resource was restored from the recycle bin.
889
+ purge: Retained messages were purged, or the resource was permanently removed from the recycle bin.
890
+ signin: A user signed in to the account.
891
+ signout: A user signed out of the account.
892
+ purgelogs: Execution logs were purged for a resource.
893
+ - name: source
894
+ in: query
895
+ required: false
896
+ description: Filter by how the change was initiated.
897
+ schema:
898
+ type: string
899
+ enum:
900
+ - ui
901
+ - api
902
+ - system
903
+ - connector
904
+ - script
905
+ - sso
906
+ examples:
907
+ - api
908
+ x-enumDescriptions:
909
+ ui: Change made through the Celigo web UI.
910
+ api: Change made via the REST API.
911
+ system: Change made automatically by the platform.
912
+ connector: Change made by an Integration App (connector) process.
913
+ script: Change made by a custom script execution.
914
+ sso: Change triggered by an SSO authentication event.
915
+ - name: _byUserId
916
+ in: query
917
+ required: false
918
+ description: Filter to changes performed by a single user.
919
+ schema:
920
+ type: string
921
+ format: objectId
922
+ x-celigo-refModel: users
923
+ examples:
924
+ - 624cb0346309dc3a543733a2
925
+ responses:
926
+ '200':
927
+ description: Array of audit entries, newest first.
928
+ headers:
929
+ Link:
930
+ description: |-
931
+ RFC 5988 pagination link. Includes `<...>; rel="next"` with an `after` cursor when more
932
+ entries exist; absent on the final page.
933
+ schema:
934
+ type: string
935
+ content:
936
+ application/json:
937
+ schema:
938
+ type: array
939
+ items:
940
+ type: object
941
+ properties:
942
+ _id:
943
+ type: string
944
+ format: objectId
945
+ description: Unique identifier for this audit entry.
946
+ examples:
947
+ - 6ab1f5ab8dc372a2b50ae31a
948
+ resourceType:
949
+ type: string
950
+ description: Always `topic` for this endpoint.
951
+ examples:
952
+ - topic
953
+ _resourceId:
954
+ type: string
955
+ format: objectId
956
+ x-celigo-refModel: topics
957
+ description: Id of the topic this entry belongs to.
958
+ examples:
959
+ - 6aab2870265e1cf39fcbee4d
960
+ event:
961
+ type: string
962
+ description: |-
963
+ Type of change. A topic's history runs create → update… → delete → restore or
964
+ purge; `purge` also records each `DELETE /v1/topics/{_id}/messages`, which is
965
+ told apart by `fieldChanges[0].fieldPath` being `messages`.
966
+ enum:
967
+ - create
968
+ - update
969
+ - delete
970
+ - restore
971
+ - purge
972
+ x-enumDescriptions:
973
+ create: Topic was created.
974
+ update: Topic was modified by PUT or PATCH.
975
+ delete: Topic was moved to the recycle bin.
976
+ restore: Topic was restored from the recycle bin.
977
+ purge: Retained messages were purged, or the topic was permanently removed from the recycle bin.
978
+ source:
979
+ type: string
980
+ description: How the change was initiated. Restores from the recycle bin are recorded as `system`.
981
+ enum:
982
+ - api
983
+ - ui
984
+ - system
985
+ x-enumDescriptions:
986
+ api: Change made via the REST API.
987
+ ui: Change made through the Celigo UI.
988
+ system: Change made by an automated platform process.
989
+ time:
990
+ type: string
991
+ format: date-time
992
+ description: Timestamp when the change occurred.
993
+ examples:
994
+ - '2026-09-22T03:27:39.894Z'
995
+ byUser:
996
+ type: object
997
+ description: User who made the change.
998
+ properties:
999
+ _id:
1000
+ type: string
1001
+ format: objectId
1002
+ x-celigo-refModel: users
1003
+ description: User id.
1004
+ examples:
1005
+ - 624cb0346309dc3a543733a2
1006
+ email:
1007
+ type: string
1008
+ format: email
1009
+ description: User email address.
1010
+ examples:
1011
+ - user@example.com
1012
+ name:
1013
+ type: string
1014
+ description: User display name.
1015
+ examples:
1016
+ - Jane Doe
1017
+ fieldChanges:
1018
+ type: array
1019
+ description: |-
1020
+ Fields that were modified. Empty on `create`, `delete`, and `restore`; a single
1021
+ `messages` entry without values on a message purge.
1022
+ items:
1023
+ type: object
1024
+ properties:
1025
+ fieldPath:
1026
+ type: string
1027
+ description: Dot-notation path of the changed field, or `messages` for a message purge.
1028
+ examples:
1029
+ - retentionMs
1030
+ oldValue:
1031
+ description: Previous value (absent when the field was unset).
1032
+ newValue:
1033
+ description: New value (absent when the field was cleared).
1034
+ deletedInfo:
1035
+ type: object
1036
+ description: |-
1037
+ Present on every entry once the topic has been deleted; carries the topic's name at
1038
+ the time it was deleted so purged topics stay identifiable.
1039
+ properties:
1040
+ name:
1041
+ type: string
1042
+ description: Name of the topic when it was deleted.
1043
+ examples:
1044
+ - orders.created
1045
+ examples:
1046
+ default:
1047
+ value:
1048
+ - _id: 6ab1f5ab8dc372a2b50ae31a
1049
+ resourceType: topic
1050
+ _resourceId: 6aab2870265e1cf39fcbee4d
1051
+ source: api
1052
+ event: purge
1053
+ time: '2026-09-22T03:27:39.894Z'
1054
+ byUser:
1055
+ _id: 624cb0346309dc3a543733a2
1056
+ email: user@example.com
1057
+ name: Jane Doe
1058
+ fieldChanges:
1059
+ - fieldPath: messages
1060
+ - _id: 6ab1f4837c4b4e699fe855b6
1061
+ resourceType: topic
1062
+ _resourceId: 6aab2870265e1cf39fcbee4d
1063
+ source: api
1064
+ event: update
1065
+ time: '2026-09-22T03:22:43.925Z'
1066
+ byUser:
1067
+ _id: 624cb0346309dc3a543733a2
1068
+ email: user@example.com
1069
+ name: Jane Doe
1070
+ fieldChanges:
1071
+ - fieldPath: retentionMs
1072
+ oldValue: 604800000
1073
+ newValue: 3600000
1074
+ '204':
1075
+ description: No audit entries exist for this topic.
1076
+ '400':
1077
+ description: '`limit` is not a positive integer. Error code: `invalid_query_param`.'
1078
+ content:
1079
+ application/json:
1080
+ schema:
1081
+ $ref: '#/components/schemas/Error'
1082
+ examples:
1083
+ bad_limit:
1084
+ value:
1085
+ errors:
1086
+ - code: invalid_query_param
1087
+ message: Invalid limit sent in request.
1088
+ '401':
1089
+ $ref: '#/components/responses/401-unauthorized'
1090
+ '404':
1091
+ $ref: '#/components/responses/404-not-found'
1092
+ '422':
1093
+ description: |-
1094
+ `action` or `source` is outside the audit vocabulary (`invalid_audit_field`), or `from` / `to`
1095
+ is not an ISO 8601 timestamp (`invalid_timestamp_format`).
1096
+ content:
1097
+ application/json:
1098
+ schema:
1099
+ $ref: '#/components/schemas/Error'
1100
+ examples:
1101
+ bad_action:
1102
+ value:
1103
+ errors:
1104
+ - code: invalid_audit_field
1105
+ message: bogus is not a valid audit action.
1106
+ bad_timestamp:
1107
+ value:
1108
+ errors:
1109
+ - code: invalid_timestamp_format
1110
+ message: 'Please make sure that the time provided for field: "from" is in ISO8601 time format.'
1111
+ /v1/topics/{_id}/dependencies:
1112
+ get:
1113
+ x-internal: false
1114
+ operationId: listTopicDependencies
1115
+ tags:
1116
+ - Topics
1117
+ summary: List dependencies of a topic
1118
+ description: |-
1119
+ Returns the resources that reference the topic: `exports` and `imports` bound to it through
1120
+ `topic._topicId`, `flows` that contain those steps, and `integrations` that list it in
1121
+ `_registeredTopicIds`. Exports and imports listed here block `DELETE /v1/topics/{_id}` until they
1122
+ are removed or repointed. An unknown topic id returns an empty map rather than 404.
1123
+ parameters:
1124
+ - name: _id
1125
+ in: path
1126
+ required: true
1127
+ description: Topic id.
1128
+ schema:
1129
+ type: string
1130
+ format: objectId
1131
+ x-celigo-refModel: topics
1132
+ examples:
1133
+ - 6aab2870265e1cf39fcbee4d
1134
+ responses:
1135
+ '200':
1136
+ description: |-
1137
+ Dependency map. Keys are resource-type strings; values are arrays of dependency entries.
1138
+ Returns `{}` when nothing references the topic.
1139
+ content:
1140
+ application/json:
1141
+ schema:
1142
+ $ref: '#/components/schemas/DependencyResponse'
1143
+ examples:
1144
+ listener_and_integration:
1145
+ summary: Topic with a listener export and one registration
1146
+ value:
1147
+ exports:
1148
+ - id: 6ab1f5b671fc8127d374d4ed
1149
+ name: Orders created listener
1150
+ paths:
1151
+ - topic._topicId
1152
+ accessLevel: manage
1153
+ dependencyIds:
1154
+ topic:
1155
+ - 6aab2870265e1cf39fcbee4d
1156
+ integrations:
1157
+ - id: 6ab1f4a138d7733b45998d99
1158
+ name: Order fulfillment
1159
+ paths:
1160
+ - _registeredTopicIds[*]
1161
+ accessLevel: manage
1162
+ dependencyIds:
1163
+ topic:
1164
+ - 6aab2870265e1cf39fcbee4d
1165
+ empty:
1166
+ summary: Nothing references the topic
1167
+ value: {}
1168
+ '401':
1169
+ $ref: '#/components/responses/401-unauthorized'
1170
+ components:
1171
+ securitySchemes:
1172
+ bearerAuth:
1173
+ type: http
1174
+ scheme: bearer
1175
+ parameters:
1176
+ After:
1177
+ name: after
1178
+ in: query
1179
+ required: false
1180
+ description: |-
1181
+ Opaque cursor for forward pagination. Pass the value from the `Link`
1182
+ response header (`rel="next"`) to fetch the next page.
1183
+ schema:
1184
+ type: string
1185
+ schemas:
1186
+ Topic:
1187
+ type: object
1188
+ description: Topic as returned by the API.
1189
+ required:
1190
+ - _id
1191
+ - _userId
1192
+ - name
1193
+ - retentionMs
1194
+ - createdAt
1195
+ - lastModified
1196
+ properties:
1197
+ _id:
1198
+ type: string
1199
+ format: objectId
1200
+ readOnly: true
1201
+ x-celigo-refModel: topics
1202
+ description: |-
1203
+ Unique identifier for the topic. Topic exports and imports bind to it through
1204
+ `topic._topicId`, and it is the `_topicId` used by every `/v1/topics/{_id}/…` endpoint.
1205
+ examples:
1206
+ - 6ab1f44d7c4b4e699fe84b0a
1207
+ _userId:
1208
+ type: string
1209
+ format: objectId
1210
+ readOnly: true
1211
+ x-celigo-refModel: users
1212
+ description: Account owner whose license and topic quota the topic counts against.
1213
+ examples:
1214
+ - 624cb0346309dc3a543733a2
1215
+ name:
1216
+ type: string
1217
+ maxLength: 200
1218
+ description: |-
1219
+ Display name shown in the UI. Empty when the topic was created without one; not unique, so
1220
+ use `_id` to identify a topic.
1221
+ examples:
1222
+ - orders.created
1223
+ description:
1224
+ type:
1225
+ - string
1226
+ - 'null'
1227
+ maxLength: 5120
1228
+ description: What the topic carries and which flows consume it. Absent or null when never set.
1229
+ examples:
1230
+ - One event per order placed. Consumed by the fulfillment and finance flows.
1231
+ retentionMs:
1232
+ type: integer
1233
+ minimum: 3600000
1234
+ maximum: 7776000000
1235
+ default: 604800000
1236
+ description: |-
1237
+ How long a published message stays readable, in milliseconds, before it is dropped from the
1238
+ stream whether or not a listener consumed it. The week-long default applies when the topic was
1239
+ created without one.
1240
+ examples:
1241
+ - 604800000
1242
+ - 3600000
1243
+ externalId:
1244
+ type: string
1245
+ maxLength: 1024
1246
+ description: |-
1247
+ Caller-chosen key set at creation or update. Present only when it was supplied; filter the
1248
+ list with `GET /v1/topics?externalId=…`.
1249
+ examples:
1250
+ - erp-orders-created
1251
+ _integrationId:
1252
+ type: string
1253
+ format: objectId
1254
+ readOnly: true
1255
+ x-celigo-refModel: integrations
1256
+ description: |-
1257
+ Integration App installation that owns the topic. Present only on topics created by an
1258
+ Integration App; absent on topics you create directly, which are shared across integrations
1259
+ through `_registeredTopicIds` instead.
1260
+ examples:
1261
+ - 6ab1f4a138d7733b45998d99
1262
+ _connectorId:
1263
+ type: string
1264
+ format: objectId
1265
+ readOnly: true
1266
+ x-celigo-refModel: connectors
1267
+ description: |-
1268
+ Integration App (connector) that installed the topic. Present only on connector-managed
1269
+ topics, which the connector — not the user — registers and deregisters.
1270
+ examples:
1271
+ - 5b3c8f9a2e1d4c0011223344
1272
+ _templateId:
1273
+ type: string
1274
+ format: objectId
1275
+ readOnly: true
1276
+ x-celigo-refModel: templates
1277
+ description: Template the topic was installed from. Present only when it originated from a template.
1278
+ examples:
1279
+ - 6a27a36f9cea1a85192e72cd
1280
+ _sourceId:
1281
+ type: string
1282
+ format: objectId
1283
+ readOnly: true
1284
+ description: Topic this one was cloned or installed from. Present only on copies.
1285
+ examples:
1286
+ - 6aab2870265e1cf39fcbee4d
1287
+ draft:
1288
+ type: boolean
1289
+ description: |-
1290
+ When true, the topic is an unconfirmed draft (created with `draft: true`, typically by
1291
+ the AI-assisted builder) that auto-deletes at `draftExpiresAt`. Absent on ordinary
1292
+ topics and once a `PUT` with `draft: false` promotes the draft.
1293
+ examples:
1294
+ - true
1295
+ draftExpiresAt:
1296
+ type: string
1297
+ format: date-time
1298
+ readOnly: true
1299
+ description: |-
1300
+ Timestamp when an unconfirmed draft is deleted automatically — 48 hours after
1301
+ creation. Present only while `draft` is true; cleared together with it.
1302
+ examples:
1303
+ - '2026-09-24T03:30:27.432Z'
1304
+ createdAt:
1305
+ type: string
1306
+ format: date-time
1307
+ readOnly: true
1308
+ description: Timestamp when the topic was created.
1309
+ examples:
1310
+ - '2026-09-16T23:38:24.578Z'
1311
+ lastModified:
1312
+ type: string
1313
+ format: date-time
1314
+ readOnly: true
1315
+ description: Timestamp when the topic was last updated by PUT or PATCH.
1316
+ examples:
1317
+ - '2026-09-22T02:51:12.733Z'
1318
+ deletedAt:
1319
+ type: string
1320
+ format: date-time
1321
+ readOnly: true
1322
+ description: |-
1323
+ Timestamp when the topic was moved to the recycle bin. Present only on the copy returned by
1324
+ `GET /v1/recycleBinTTL/topics/{_id}`; deleted topics are hidden from every other endpoint.
1325
+ examples:
1326
+ - '2026-09-22T03:29:50.803Z'
1327
+ Error:
1328
+ type: object
1329
+ description: Standard error response envelope returned by integrator.io APIs.
1330
+ properties:
1331
+ errors:
1332
+ type: array
1333
+ description: List of errors that occurred while processing the request.
1334
+ items:
1335
+ type: object
1336
+ properties:
1337
+ code:
1338
+ oneOf:
1339
+ - type: string
1340
+ - type: integer
1341
+ description: |-
1342
+ Machine-readable error code. Usually a string like
1343
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1344
+ may be an **integer** when the error mirrors an upstream HTTP
1345
+ status (e.g. `500`) — most commonly returned by connection-ping
1346
+ and adaptor-proxy responses.
1347
+ message:
1348
+ type: string
1349
+ description: Human-readable description of the error.
1350
+ field:
1351
+ type: string
1352
+ description: |-
1353
+ Optional pointer to the document field that caused the error.
1354
+ Used by structural validation errors (`missing_required_field`,
1355
+ `invalid_ref`) to indicate which field is at fault
1356
+ (e.g. `_id`, `type`, `http.baseURI`).
1357
+ source:
1358
+ type: string
1359
+ description: |-
1360
+ Optional origin layer for the error — e.g. `application` when
1361
+ the error came from the remote system the adaptor called,
1362
+ `connector` when the adaptor itself rejected the request.
1363
+ required:
1364
+ - message
1365
+ required:
1366
+ - errors
1367
+ Request:
1368
+ type: object
1369
+ description: Writable fields for creating or updating a topic.
1370
+ required:
1371
+ - name
1372
+ x-celigo-ai-guidance:
1373
+ - |-
1374
+ Always send name — the server does not enforce it and creates a topic with an empty name
1375
+ that cannot be told apart in lists. On PUT send the whole document: omitted fields are
1376
+ cleared (description, externalId) and retentionMs falls back to seven days.
1377
+ - |-
1378
+ Unknown top-level fields are dropped silently, so a misspelled field does not fail the
1379
+ request — read the response body back to confirm what was stored.
1380
+ properties:
1381
+ name:
1382
+ type: string
1383
+ maxLength: 200
1384
+ description: |-
1385
+ Display name shown in the UI and recorded as `deletedInfo.name` on audit entries. Names need
1386
+ not be unique — exports and imports bind to the topic id, so renaming never breaks a
1387
+ subscription. Script tags and other unsafe HTML are stripped on save.
1388
+ examples:
1389
+ - orders.created
1390
+ description:
1391
+ type:
1392
+ - string
1393
+ - 'null'
1394
+ maxLength: 5120
1395
+ description: |-
1396
+ What the topic carries and which flows consume it. Shown in the UI only; it plays no part in
1397
+ routing. Send null to clear a previous value.
1398
+ examples:
1399
+ - One event per order placed. Consumed by the fulfillment and finance flows.
1400
+ retentionMs:
1401
+ type: integer
1402
+ minimum: 3600000
1403
+ maximum: 7776000000
1404
+ default: 604800000
1405
+ description: |-
1406
+ How long a published message stays readable, in milliseconds, before it is dropped from the
1407
+ stream whether or not a listener consumed it. The default keeps a week of messages, enough for
1408
+ a listener that is paused over a weekend to catch up; the ceiling is further capped by the
1409
+ account license's `topics.retentionCeilingDays`. Changing it on an existing topic
1410
+ re-configures the stream, so messages older than the new window are no longer retained.
1411
+ examples:
1412
+ - 604800000
1413
+ - 3600000
1414
+ x-celigo-ai-guidance:
1415
+ - |-
1416
+ A value above the account's ceiling fails with 422 `topics_retention_exceeds_entitlement`;
1417
+ read the ceiling from `GET /v1/licenses` (`topics.retentionCeilingDays`) before asking for
1418
+ long retention. Below one hour fails with 422 `min`.
1419
+ externalId:
1420
+ type: string
1421
+ maxLength: 1024
1422
+ description: |-
1423
+ Caller-chosen key for finding the topic again without storing its id — filter the list with
1424
+ `GET /v1/topics?externalId=…`. Integration Apps use it to locate a topic across installs.
1425
+ examples:
1426
+ - erp-orders-created
1427
+ draft:
1428
+ type: boolean
1429
+ description: |-
1430
+ When true, the topic is a draft that auto-deletes 48 hours after creation
1431
+ (`draftExpiresAt` in the response). Set at creation; an update can clear the
1432
+ flag but never set it, and a PUT that omits it leaves an existing draft as is —
1433
+ the one field the whole-document PUT does not clear.
1434
+ x-celigo-ai-guidance:
1435
+ - |-
1436
+ POST with `draft: true` arms the 48-hour TTL (the server computes `draftExpiresAt`).
1437
+ PUT with `draft: false` clears the flag and the expiry, promoting the draft to a
1438
+ permanent topic. PUT with `draft: true` on a non-draft topic is silently ignored,
1439
+ and a PUT that omits the field leaves an existing draft flag unchanged.
1440
+ examples:
1441
+ - true
1442
+ __integrationIds:
1443
+ type: array
1444
+ maxItems: 100
1445
+ items:
1446
+ type: string
1447
+ format: objectId
1448
+ x-celigo-refModel: integrations
1449
+ description: |-
1450
+ Integrations to register the new topic on immediately after creation, so flows in those
1451
+ integrations can subscribe to it. Honored only on `POST /v1/topics` (ignored on PUT), never
1452
+ persisted, and not echoed back. Ids are validated before the topic is saved; registration
1453
+ runs after the save, and per-integration failures are reported in
1454
+ `__failedIntegrationRegistrations` on the 201 response without rolling back the new topic.
1455
+ x-celigo-ai-guidance:
1456
+ - |-
1457
+ Invalid input rejects the whole request without creating the topic: a non-array value or
1458
+ duplicate ids fail with 422 `invalid_request`, an element that is not a valid ObjectId fails
1459
+ with 422 `invalid_ref` naming `__integrationIds[i]`, and an integration that does not exist
1460
+ in the account fails with 404.
1461
+ - To register an existing topic instead, use `PUT /v1/integrations/{_id}/topics/{_topicId}/register`.
1462
+ examples:
1463
+ - - 6ab1f4a138d7733b45998d99
1464
+ JsonPatchOperation:
1465
+ type: object
1466
+ description: A single JSON Patch operation (RFC 6902).
1467
+ required:
1468
+ - op
1469
+ - path
1470
+ properties:
1471
+ op:
1472
+ type: string
1473
+ enum:
1474
+ - replace
1475
+ - add
1476
+ - remove
1477
+ x-enumDescriptions:
1478
+ replace: Replaces the value at the specified path.
1479
+ add: Sets the value at the specified path.
1480
+ remove: Removes the value at the specified path.
1481
+ description: The operation to perform.
1482
+ path:
1483
+ type: string
1484
+ description: |-
1485
+ JSON Pointer (RFC 6901) to the field to patch. Only
1486
+ whitelisted paths are accepted — unlisted paths return
1487
+ `422` with `"<path> is not a whitelisted property"`.
1488
+ value:
1489
+ description: The new value to set. Required for `replace` and `add`, omit for `remove`.
1490
+ JsonPatchRequest:
1491
+ type: array
1492
+ description: |-
1493
+ A JSON Patch document (RFC 6902). Send an array of patch
1494
+ operations on whitelisted fields — all other paths are rejected
1495
+ with 422.
1496
+ minItems: 1
1497
+ items:
1498
+ $ref: '#/components/schemas/JsonPatchOperation'
1499
+ TopicMessage:
1500
+ type: object
1501
+ description: One retained message, in publish order.
1502
+ required:
1503
+ - timestamp
1504
+ - payload
1505
+ properties:
1506
+ timestamp:
1507
+ type: string
1508
+ format: date-time
1509
+ description: Timestamp when the message was appended to the stream; the value `time_gt` and `time_lte` filter on.
1510
+ examples:
1511
+ - '2026-09-22T03:24:35.992Z'
1512
+ payload:
1513
+ description: |-
1514
+ The message exactly as it was published — normally the JSON object sent in `messages[]`.
1515
+ A value that was not valid JSON is returned verbatim as a string.
1516
+ examples:
1517
+ - orderId: SO-1001
1518
+ total: 42.5
1519
+ TopicMessagesResponse:
1520
+ type: object
1521
+ description: One page of retained messages.
1522
+ required:
1523
+ - messages
1524
+ properties:
1525
+ messages:
1526
+ type: array
1527
+ description: |-
1528
+ Messages in the requested window, oldest first. Empty when the topic has never received a
1529
+ message, when everything has aged out of `retentionMs`, or when the continuation cursor is
1530
+ already at the end of the stream.
1531
+ items:
1532
+ $ref: '#/components/schemas/TopicMessage'
1533
+ nextPageURL:
1534
+ type: string
1535
+ description: |-
1536
+ Relative URL of the next page, carrying the same filters plus an `afterOffset` cursor.
1537
+ Follow it as-is rather than building the cursor yourself. Absent on the last page.
1538
+ examples:
1539
+ - /v1/topics/6ab1f44d7c4b4e699fe84b0a/messages?limit=50&afterOffset=49
1540
+ PurgeMessagesResponse:
1541
+ type: object
1542
+ description: Result of purging a topic's retained messages.
1543
+ required:
1544
+ - deleted
1545
+ properties:
1546
+ deleted:
1547
+ type: boolean
1548
+ description: |-
1549
+ When true, the topic's stream was cleared — also reported when it held no messages at the time.
1550
+ False only for a topic that has never received a message, so there was no stream to clear.
1551
+ examples:
1552
+ - true
1553
+ PublishRequest:
1554
+ type: object
1555
+ description: Messages to append to the topic.
1556
+ required:
1557
+ - messages
1558
+ x-celigo-ai-guidance:
1559
+ - |-
1560
+ The body must be an object with a messages array — a bare array or a missing/non-array
1561
+ messages field fails with 400 `invalid_messages`. Other top-level keys are ignored.
1562
+ properties:
1563
+ messages:
1564
+ type: array
1565
+ description: |-
1566
+ Messages to append, in order; each becomes one record that listeners receive. An empty array
1567
+ is accepted and publishes nothing. Every message is serialized as JSON and may be at most
1568
+ 1 MiB; oversized messages are reported per entry in the response and the rest are still
1569
+ published.
1570
+ items:
1571
+ type: object
1572
+ description: One message. Any JSON object; the platform stores it as-is and returns it as `payload` when read back.
1573
+ examples:
1574
+ - - orderId: SO-1001
1575
+ total: 42.5
1576
+ - orderId: SO-1002
1577
+ total: 18
1578
+ PublishResponse:
1579
+ type: object
1580
+ description: |-
1581
+ Per-message outcome of a publish call. The HTTP status is 200 whenever the request body was
1582
+ valid; inspect each entry's `statusCode` to see which messages were appended.
1583
+ required:
1584
+ - responses
1585
+ properties:
1586
+ responses:
1587
+ type: array
1588
+ description: One entry per element of `messages`, in the same order. Empty when `messages` was empty.
1589
+ items:
1590
+ type: object
1591
+ required:
1592
+ - statusCode
1593
+ properties:
1594
+ statusCode:
1595
+ type: integer
1596
+ description: |-
1597
+ Outcome for this message: 200 when it was appended, 422 when it was rejected before
1598
+ publishing (for example because it exceeds the size limit), 500 when the stream
1599
+ refused the batch it belonged to.
1600
+ examples:
1601
+ - 200
1602
+ - 422
1603
+ _json:
1604
+ type: object
1605
+ description: Present when `statusCode` is 200. Currently always an empty object.
1606
+ examples:
1607
+ - {}
1608
+ errors:
1609
+ type: array
1610
+ description: Present when `statusCode` is not 200. Why this message was not published.
1611
+ items:
1612
+ type: object
1613
+ required:
1614
+ - code
1615
+ - message
1616
+ properties:
1617
+ code:
1618
+ type: string
1619
+ description: |-
1620
+ Machine-readable reason. `topic_publish_event_too_large` when the serialized
1621
+ message exceeds 1 MiB; `topic_publish_failed` when the stream rejected the batch.
1622
+ examples:
1623
+ - topic_publish_event_too_large
1624
+ message:
1625
+ type: string
1626
+ description: Human-readable explanation, naming the message index.
1627
+ examples:
1628
+ - Message at index 0 exceeds the maximum allowed size of 1048576 bytes.
1629
+ source:
1630
+ type: string
1631
+ description: Layer that produced the error — `resource` for size rejections, `internal` for stream failures.
1632
+ examples:
1633
+ - resource
1634
+ resolved:
1635
+ type: boolean
1636
+ description: Always false here; publish errors are not retried by the platform.
1637
+ examples:
1638
+ - false
1639
+ occurredAt:
1640
+ type: integer
1641
+ description: Unix epoch milliseconds when the error was raised.
1642
+ examples:
1643
+ - 1790047646930
1644
+ TopicExportOffsets:
1645
+ type: object
1646
+ description: Read position of one topic export (listener) on a topic.
1647
+ required:
1648
+ - hasCursor
1649
+ - offset
1650
+ properties:
1651
+ hasCursor:
1652
+ type: boolean
1653
+ description: |-
1654
+ When true, the export has committed a read position on this topic and its next run resumes
1655
+ from `offset`. False when the export has never consumed the topic, when its last committed
1656
+ position has expired from the stream, or when it does not listen to this topic at all — a
1657
+ listener without a cursor starts from its own `topic.startPosition` (`latest` or `earliest`).
1658
+ A listener whose flow is disabled keeps its position; a listener saved without
1659
+ `type: "stream"`, or whose flow has not been enabled since the listener was saved, has
1660
+ never subscribed and reports false.
1661
+ examples:
1662
+ - true
1663
+ - false
1664
+ offset:
1665
+ type: integer
1666
+ minimum: -1
1667
+ description: |-
1668
+ Zero-based position of the next message the export will read. `-1` when `hasCursor` is
1669
+ false. The position counts from the start of the stream, so while no message has expired
1670
+ the retained message count minus `offset` is the listener's backlog.
1671
+ examples:
1672
+ - 1287
1673
+ - -1
1674
+ DependencyEntry:
1675
+ type: object
1676
+ description: A single resource that depends on the queried resource.
1677
+ properties:
1678
+ id:
1679
+ type: string
1680
+ description: Unique identifier of the dependent resource.
1681
+ examples:
1682
+ - 61f92026dd053843b5d72350
1683
+ name:
1684
+ type: string
1685
+ description: Display name of the dependent resource.
1686
+ examples:
1687
+ - Import Orders to NetSuite
1688
+ type:
1689
+ type: string
1690
+ description: |-
1691
+ Sub-type of the dependent resource when its collection distinguishes one, such as
1692
+ `stream` for a listener export. Only present for resource types that carry a `type`.
1693
+ examples:
1694
+ - stream
1695
+ paths:
1696
+ type: array
1697
+ description: |-
1698
+ Dot-notation paths within the dependent resource that reference
1699
+ the target resource. `[*]` denotes array elements.
1700
+ items:
1701
+ type: string
1702
+ examples:
1703
+ - - hooks.preSavePage._scriptId
1704
+ accessLevel:
1705
+ type: string
1706
+ description: The caller's access level on the dependent resource.
1707
+ examples:
1708
+ - manage
1709
+ dependencyIds:
1710
+ type: object
1711
+ description: |-
1712
+ Map of resource types to arrays of IDs that this dependent
1713
+ resource references on the target. Keys are singular or plural
1714
+ resource type strings; values are arrays of ID strings.
1715
+ additionalProperties:
1716
+ type: array
1717
+ items:
1718
+ type: string
1719
+ example:
1720
+ script:
1721
+ - 64ff4b21612a134bd2f45531
1722
+ required:
1723
+ - id
1724
+ - name
1725
+ - paths
1726
+ - accessLevel
1727
+ - dependencyIds
1728
+ DependencyResponse:
1729
+ type: object
1730
+ description: |
1731
+ Map of dependent-resource types to arrays of dependency entries.
1732
+ Keys are plural resource type strings (e.g. `flows`, `imports`,
1733
+ `connections`). An empty object `{}` means no dependents.
1734
+ additionalProperties:
1735
+ type: array
1736
+ items:
1737
+ $ref: '#/components/schemas/DependencyEntry'
1738
+ example:
1739
+ exports:
1740
+ - id: 64ff4b21612a134bd2f45534
1741
+ name: Bank FTP Export
1742
+ paths:
1743
+ - hooks.preSavePage._scriptId
1744
+ accessLevel: manage
1745
+ dependencyIds:
1746
+ script:
1747
+ - 64ff4b21612a134bd2f45531
1748
+ flows:
1749
+ - id: 64ff4b22612a134bd2f45538
1750
+ name: CAMT-053 to Celigo CAM Format
1751
+ paths:
1752
+ - pageGenerators[*]._exportId
1753
+ accessLevel: manage
1754
+ dependencyIds:
1755
+ export:
1756
+ - 64ff4b21612a134bd2f45534
1757
+ responses:
1758
+ 401-unauthorized:
1759
+ description: |-
1760
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1761
+ failed to authenticate.
1762
+
1763
+ Note: the 401 response is produced by the auth middleware **before** the
1764
+ request reaches the endpoint handler, so it does **not** follow the
1765
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1766
+ `{message: string}` object with no `code`, no `errors` array. Callers
1767
+ handling 401s should key off the HTTP status and the `message` string,
1768
+ not try to destructure an `errors[]`.
1769
+ content:
1770
+ application/json:
1771
+ schema:
1772
+ type: object
1773
+ properties:
1774
+ message:
1775
+ type: string
1776
+ description: |-
1777
+ Human-readable description of the auth failure. Known values:
1778
+ - `"Unauthorized"` — no `Authorization` header on the request.
1779
+ - `"Bearer Authentication Failed"` — header present but token
1780
+ is invalid, revoked, or expired.
1781
+ required:
1782
+ - message
1783
+ examples:
1784
+ missing_token:
1785
+ summary: No Authorization header sent
1786
+ value:
1787
+ message: Unauthorized
1788
+ invalid_token:
1789
+ summary: Bearer token invalid or revoked
1790
+ value:
1791
+ message: Bearer Authentication Failed
1792
+ 404-not-found:
1793
+ description: |
1794
+ Not found. The requested resource does not exist or is not visible to the caller.
1795
+ content:
1796
+ application/json:
1797
+ schema:
1798
+ $ref: '#/components/schemas/Error'
1799
+ examples:
1800
+ default:
1801
+ value:
1802
+ errors:
1803
+ - code: not_found
1804
+ message: The requested resource was not found.
1805
+ x-internal: false
1806
+ x-enable-proxy: true