@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
@@ -0,0 +1,1457 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: File Server
5
+ description: Run a Celigo-hosted SFTP server whose partner accounts land files in Celigo Storage.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ API for the account's Celigo-hosted SFTP file server: one server per environment
9
+ (`GET`/`PUT /v1/mft/fileserver`) and the partner accounts that log in to it
10
+ (`/v1/mft/fileserver/accounts`), each chrooted to a Celigo Storage folder. Requires a
11
+ full-access API token — folder-path-scoped and other restricted tokens answer 403
12
+ FILESERVER_FULL_ACCESS_TOKEN_REQUIRED on every route.
13
+ servers:
14
+ - url: https://api.integrator.io
15
+ description: Production (US / default region)
16
+ - url: https://api.eu.integrator.io
17
+ description: Production (EU region)
18
+ - url: https://api.au.integrator.io
19
+ description: Production (AU region)
20
+ - url: https://api.ca.integrator.io
21
+ description: Production (CA region)
22
+ security:
23
+ - bearerAuth: []
24
+ tags:
25
+ - name: File Server
26
+ description: |-
27
+ Each environment can run a Celigo-hosted SFTP file server. Enabling it claims a permanent `identifier` that becomes part of every partner login (`<username>@<identifier>`) and exposes the shared endpoint and host-key fingerprints partners need to connect. Partner accounts are created under the server, each with its own password and a Celigo Storage folder that becomes the account's root, so files a partner uploads appear in that folder and files placed there are what the partner can download. The account's license must include the file server add-on (`fileserver.enabled`), and every call needs a full-access API token.
28
+
29
+ ## File server and account schemas
30
+
31
+ {% openapi-schemas spec="fileserver" schemas="FileServer,FileServerAccount" grouped="true" %}
32
+ paths:
33
+ /v1/mft/fileserver:
34
+ get:
35
+ x-internal: false
36
+ operationId: getFileServer
37
+ tags:
38
+ - File Server
39
+ summary: Get the environment's file server
40
+ description: |-
41
+ Returns the environment's SFTP file server: whether it is enabled, its permanent
42
+ `identifier`, the shared `endpoint` and host-key fingerprints partners connect
43
+ with, the `loginFormat`, and the effective `limits`. The server is a singleton
44
+ resolved from the caller's token — there is no id in the URL. An entitled
45
+ environment whose server was never enabled answers 404; an environment without
46
+ the file server add-on gets the reduced object (`entitled: false`, `endpoint`,
47
+ `limits`) with 200. Requires a full-access API token.
48
+ responses:
49
+ '200':
50
+ description: The file server, or the reduced object when the add-on is not licensed.
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: '#/components/schemas/FileServer'
55
+ examples:
56
+ enabled:
57
+ summary: Enabled server
58
+ value:
59
+ _id: 6ab1ef197cf630a06d774cf1
60
+ enabled: true
61
+ identifier: acme-logistics
62
+ endpoint:
63
+ hostname: sftp.integrator.io
64
+ port: 22
65
+ hostKeyFingerprints:
66
+ - algorithm: ssh-ed25519
67
+ fingerprint: SHA256:iYC+28MNea2ebwWmUMdnJRx0StabV53gZBmr6pto9fs
68
+ - algorithm: rsa-sha2-512
69
+ fingerprint: SHA256:0Qy3l7fJ2Zb1n8VtY4cH6uWkPq9rS2dE5gL7mN1oT3A
70
+ loginFormat: <username>@acme-logistics
71
+ limits:
72
+ maxAccounts: 1000
73
+ maxConcurrentSessionsPerAccount: 20
74
+ maxFileSizeBytes: 10737418240
75
+ entitled: true
76
+ notEntitled:
77
+ summary: Environment without the add-on
78
+ value:
79
+ entitled: false
80
+ endpoint:
81
+ hostname: sftp.integrator.io
82
+ port: 22
83
+ limits:
84
+ maxAccounts: 500
85
+ maxConcurrentSessionsPerAccount: 10
86
+ maxFileSizeBytes: 10737418240
87
+ '401':
88
+ $ref: '#/components/responses/401-unauthorized'
89
+ '403':
90
+ description: The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`).
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: '#/components/schemas/Error'
95
+ examples:
96
+ scopedToken:
97
+ value:
98
+ errors:
99
+ - code: FILESERVER_FULL_ACCESS_TOKEN_REQUIRED
100
+ message: The file server management APIs require an API token with full access
101
+ '404':
102
+ description: The environment is entitled but its server has never been enabled (`FILESERVER_NOT_FOUND`).
103
+ content:
104
+ application/json:
105
+ schema:
106
+ $ref: '#/components/schemas/Error'
107
+ examples:
108
+ neverEnabled:
109
+ value:
110
+ errors:
111
+ - code: FILESERVER_NOT_FOUND
112
+ message: The file server has not been enabled for this environment
113
+ put:
114
+ x-internal: false
115
+ operationId: updateFileServer
116
+ tags:
117
+ - File Server
118
+ summary: Enable or disable the file server
119
+ description: |-
120
+ Enables the environment's file server — creating it, and claiming the permanent
121
+ `identifier`, on the first call — or disables it. The body must carry `enabled`
122
+ as a JSON boolean; anything else is refused rather than interpreted, because a
123
+ disable ends every open partner session. Every `enabled: true` call, including
124
+ one on a server that is already enabled, checks the account's Celigo Storage
125
+ entitlement (partner uploads land there) and returns the current `storageUsage`
126
+ alongside the server; `identifier` may be omitted once the server exists.
127
+ Disabling keeps the identifier and every account, refuses new logins, and ends
128
+ open sessions; repeating a disable is a no-op. Sandbox environments cannot
129
+ enable a server (403 `FILESERVER_NOT_ENTITLED`). Requires a full-access API
130
+ token.
131
+ requestBody:
132
+ required: true
133
+ content:
134
+ application/json:
135
+ schema:
136
+ $ref: '#/components/schemas/FileServerRequest'
137
+ examples:
138
+ enableFirstTime:
139
+ summary: First enable — claims the identifier
140
+ value:
141
+ enabled: true
142
+ identifier: acme-logistics
143
+ reEnable:
144
+ summary: Repeat enable on an existing server — identifier omitted
145
+ value:
146
+ enabled: true
147
+ disable:
148
+ summary: Disable (identifier may be echoed, never changed)
149
+ value:
150
+ enabled: false
151
+ responses:
152
+ '200':
153
+ description: 'The server after the change. Includes `storageUsage` whenever `enabled: true` was sent.'
154
+ content:
155
+ application/json:
156
+ schema:
157
+ $ref: '#/components/schemas/FileServer'
158
+ examples:
159
+ enabled:
160
+ summary: Enabled server with the storage usage read at enable time
161
+ value:
162
+ _id: 6ab1ef197cf630a06d774cf1
163
+ enabled: true
164
+ identifier: acme-logistics
165
+ endpoint:
166
+ hostname: sftp.integrator.io
167
+ port: 22
168
+ hostKeyFingerprints:
169
+ - algorithm: ssh-ed25519
170
+ fingerprint: SHA256:iYC+28MNea2ebwWmUMdnJRx0StabV53gZBmr6pto9fs
171
+ - algorithm: rsa-sha2-512
172
+ fingerprint: SHA256:0Qy3l7fJ2Zb1n8VtY4cH6uWkPq9rS2dE5gL7mN1oT3A
173
+ loginFormat: <username>@acme-logistics
174
+ limits:
175
+ maxAccounts: 1000
176
+ maxConcurrentSessionsPerAccount: 20
177
+ maxFileSizeBytes: 10737418240
178
+ entitled: true
179
+ storageUsage:
180
+ activeUsage: 3387143
181
+ recycleBinUsage: 26305326
182
+ totalUsage: 29692469
183
+ maxAllowedUsage: 214748364800
184
+ isOverage: false
185
+ hardLimit: 429496729600
186
+ overage: 0
187
+ disabled:
188
+ summary: Disabled server
189
+ value:
190
+ _id: 6ab1ef197cf630a06d774cf1
191
+ enabled: false
192
+ identifier: acme-logistics
193
+ endpoint:
194
+ hostname: sftp.integrator.io
195
+ port: 22
196
+ hostKeyFingerprints:
197
+ - algorithm: ssh-ed25519
198
+ fingerprint: SHA256:iYC+28MNea2ebwWmUMdnJRx0StabV53gZBmr6pto9fs
199
+ loginFormat: <username>@acme-logistics
200
+ limits:
201
+ maxAccounts: 1000
202
+ maxConcurrentSessionsPerAccount: 20
203
+ maxFileSizeBytes: 10737418240
204
+ entitled: true
205
+ '400':
206
+ description: The body is not a JSON object sent as `application/json` (`FILESERVER_JSON_BODY_REQUIRED`).
207
+ content:
208
+ application/json:
209
+ schema:
210
+ $ref: '#/components/schemas/Error'
211
+ examples:
212
+ notJson:
213
+ value:
214
+ errors:
215
+ - code: FILESERVER_JSON_BODY_REQUIRED
216
+ message: 'Request body must be a JSON object sent with Content-Type: application/json'
217
+ '401':
218
+ $ref: '#/components/responses/401-unauthorized'
219
+ '403':
220
+ description: |-
221
+ The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`),
222
+ the account's license lacks the file server add-on or the environment is a
223
+ sandbox (`FILESERVER_NOT_ENTITLED`).
224
+ content:
225
+ application/json:
226
+ schema:
227
+ $ref: '#/components/schemas/Error'
228
+ examples:
229
+ notEntitled:
230
+ value:
231
+ errors:
232
+ - code: FILESERVER_NOT_ENTITLED
233
+ message: The file server add-on is not enabled for this account
234
+ '404':
235
+ description: A disable was sent for an environment whose server was never enabled (`FILESERVER_NOT_FOUND`).
236
+ content:
237
+ application/json:
238
+ schema:
239
+ $ref: '#/components/schemas/Error'
240
+ examples:
241
+ neverEnabled:
242
+ value:
243
+ errors:
244
+ - code: FILESERVER_NOT_FOUND
245
+ message: The file server has not been enabled for this environment
246
+ '409':
247
+ description: The identifier is already held by another environment in the region (`FILESERVER_IDENTIFIER_TAKEN`).
248
+ content:
249
+ application/json:
250
+ schema:
251
+ $ref: '#/components/schemas/Error'
252
+ examples:
253
+ taken:
254
+ value:
255
+ errors:
256
+ - code: FILESERVER_IDENTIFIER_TAKEN
257
+ message: This identifier is already in use
258
+ '422':
259
+ description: |-
260
+ `enabled` is missing or not a boolean (`FILESERVER_ENABLED_REQUIRED`), the
261
+ first-enable `identifier` is missing or malformed (`FILESERVER_IDENTIFIER_INVALID`),
262
+ or the body names an identifier different from the server's permanent one
263
+ (`FILESERVER_IDENTIFIER_IMMUTABLE`).
264
+ content:
265
+ application/json:
266
+ schema:
267
+ $ref: '#/components/schemas/Error'
268
+ examples:
269
+ enabledRequired:
270
+ value:
271
+ errors:
272
+ - code: FILESERVER_ENABLED_REQUIRED
273
+ message: '"enabled" is required and must be a boolean'
274
+ identifierImmutable:
275
+ value:
276
+ errors:
277
+ - code: FILESERVER_IDENTIFIER_IMMUTABLE
278
+ message: The file server identifier cannot be changed
279
+ identifierInvalid:
280
+ value:
281
+ errors:
282
+ - code: FILESERVER_IDENTIFIER_INVALID
283
+ message: Identifier must be 3-30 lowercase letters, digits or hyphens, with no leading or trailing hyphen
284
+ '503':
285
+ description: |-
286
+ Enabling requires a live check of the environment's Celigo Storage entitlement;
287
+ when that check cannot complete the enable is refused with
288
+ `FILESERVER_STORAGE_UNAVAILABLE` and nothing changes. Retry later.
289
+ content:
290
+ application/json:
291
+ schema:
292
+ $ref: '#/components/schemas/Error'
293
+ examples:
294
+ storageUnavailable:
295
+ value:
296
+ errors:
297
+ - code: FILESERVER_STORAGE_UNAVAILABLE
298
+ message: 'File storage is temporarily unavailable: storage entitlement could not be verified'
299
+ /v1/mft/fileserver/accounts:
300
+ get:
301
+ x-internal: false
302
+ operationId: listFileServerAccounts
303
+ tags:
304
+ - File Server
305
+ summary: List file server accounts
306
+ description: |-
307
+ Returns the environment's partner accounts oldest first, wrapped in an
308
+ `accounts` array, with `overCap` computed for each against the current
309
+ `limits.maxAccounts`. Paging is cursor-based through the `Link` header, which
310
+ lists bare absolute URLs separated by `, ` rather than RFC 8288 `<url>; rel=`
311
+ pairs: a URL carrying `after` (listed first) is present when more accounts
312
+ follow the page, and a URL carrying `before` is present when accounts precede
313
+ it — so the first page offers only `after`, the last page only `before`. The
314
+ header is absent when every account fits in one page. Cursors are opaque —
315
+ pass them back exactly as received; anything else answers 400
316
+ `FILESERVER_INVALID_CURSOR`. Accounts stay listable after the add-on is removed
317
+ from the license; only writes are blocked then. Requires a full-access API
318
+ token and a server that has been enabled at least once.
319
+ parameters:
320
+ - name: pageSize
321
+ in: query
322
+ required: false
323
+ description: Accounts per page. Out-of-range and non-numeric values are not rejected — `0` and non-numbers fall back to the default.
324
+ schema:
325
+ type: integer
326
+ minimum: 1
327
+ maximum: 1000
328
+ default: 100
329
+ examples:
330
+ - 100
331
+ - name: after
332
+ in: query
333
+ required: false
334
+ description: Opaque cursor copied from the `after` URL in the previous page's `Link` header. Returns the accounts created after it.
335
+ schema:
336
+ type: string
337
+ - name: before
338
+ in: query
339
+ required: false
340
+ description: Opaque cursor copied from the `before` URL in a page's `Link` header. Returns the accounts created before it. Ignored when `after` is also sent.
341
+ schema:
342
+ type: string
343
+ responses:
344
+ '200':
345
+ description: One page of accounts.
346
+ headers:
347
+ Link:
348
+ description: |-
349
+ Pagination links as bare absolute URLs separated by `, ` — not the RFC 8288
350
+ `<url>; rel=` form. The URL carrying `after` (listed first) is present when
351
+ more accounts follow this page; the URL carrying `before` is present when
352
+ accounts precede it. Both repeat the request's `pageSize`. Absent when the
353
+ whole list fits in one page.
354
+ schema:
355
+ type: string
356
+ examples:
357
+ - https://api.integrator.io/v1/mft/fileserver/accounts?after=WyIyMDI2LTEwLTA3VDA2OjE5OjQzLjg4NloiLCI2YWM1ZTQ3ZjRhNzRiMzMzNDQxNzZkOTEiXQ&pageSize=100, https://api.integrator.io/v1/mft/fileserver/accounts?before=WyIyMDI2LTEwLTA3VDA2OjE5OjQzLjg4NloiLCI2YWM1ZTQ3ZjRhNzRiMzMzNDQxNzZkOTEiXQ&pageSize=100
358
+ content:
359
+ application/json:
360
+ schema:
361
+ type: object
362
+ required:
363
+ - accounts
364
+ properties:
365
+ accounts:
366
+ type: array
367
+ items:
368
+ $ref: '#/components/schemas/FileServerAccount'
369
+ examples:
370
+ default:
371
+ value:
372
+ accounts:
373
+ - _id: 6ab1f2737cf630a06d774d09
374
+ username: northwind-edi
375
+ login: northwind-edi@acme-logistics
376
+ _homeFolderId: 6ab1f25daa3e7ed226ea3f25
377
+ homeFolderPath: /Partners/Northwind/Inbound
378
+ enabled: true
379
+ passwordSet: true
380
+ overCap: false
381
+ lastConnectedAt: '2026-09-22T14:35:31.646Z'
382
+ createdAt: '2026-09-22T03:13:56.060Z'
383
+ lastModified: '2026-09-22T14:35:31.648Z'
384
+ '400':
385
+ description: The `after` or `before` cursor is not one this list issued (`FILESERVER_INVALID_CURSOR`).
386
+ content:
387
+ application/json:
388
+ schema:
389
+ $ref: '#/components/schemas/Error'
390
+ examples:
391
+ invalidCursor:
392
+ value:
393
+ errors:
394
+ - code: FILESERVER_INVALID_CURSOR
395
+ message: Invalid pagination cursor
396
+ '401':
397
+ $ref: '#/components/responses/401-unauthorized'
398
+ '403':
399
+ description: The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`), or the environment is a sandbox (`FILESERVER_NOT_ENTITLED`).
400
+ content:
401
+ application/json:
402
+ schema:
403
+ $ref: '#/components/schemas/Error'
404
+ examples:
405
+ scopedToken:
406
+ value:
407
+ errors:
408
+ - code: FILESERVER_FULL_ACCESS_TOKEN_REQUIRED
409
+ message: The file server management APIs require an API token with full access
410
+ '422':
411
+ description: The environment's server has never been enabled (`FILESERVER_NOT_ENABLED`); a disabled server is still manageable.
412
+ content:
413
+ application/json:
414
+ schema:
415
+ $ref: '#/components/schemas/Error'
416
+ examples:
417
+ notEnabled:
418
+ value:
419
+ errors:
420
+ - code: FILESERVER_NOT_ENABLED
421
+ message: Enable the file server before managing accounts
422
+ post:
423
+ x-internal: false
424
+ operationId: createFileServerAccount
425
+ tags:
426
+ - File Server
427
+ summary: Create a file server account
428
+ description: |-
429
+ Creates an enabled partner account with the given `username`, `password`, and
430
+ Celigo Storage home folder, and returns it (the password is never returned).
431
+ Checks run in order and the first failure is answered: username shape, password
432
+ presence, home-folder presence, the enabled-account cap, then the folder is
433
+ verified to be an active folder in this environment. From then on the folder
434
+ and every folder above it refuse `DELETE /v1/storage/items/{_id}` with 403
435
+ `STORAGE_SFTP_HOME_FOLDER_PROTECTED` until the account is deleted or moved.
436
+ Requires a full-access API token, the file server add-on on the license, and a
437
+ server that has been enabled at least once.
438
+ requestBody:
439
+ required: true
440
+ content:
441
+ application/json:
442
+ schema:
443
+ $ref: '#/components/schemas/FileServerAccountCreateRequest'
444
+ examples:
445
+ default:
446
+ value:
447
+ username: northwind-edi
448
+ password: Nw-Inbound-2026!x
449
+ _homeFolderId: 6ab1f25daa3e7ed226ea3f25
450
+ responses:
451
+ '201':
452
+ description: The new account.
453
+ content:
454
+ application/json:
455
+ schema:
456
+ $ref: '#/components/schemas/FileServerAccount'
457
+ examples:
458
+ default:
459
+ value:
460
+ _id: 6ab1f2737cf630a06d774d09
461
+ username: northwind-edi
462
+ login: northwind-edi@acme-logistics
463
+ _homeFolderId: 6ab1f25daa3e7ed226ea3f25
464
+ homeFolderPath: /Partners/Northwind/Inbound
465
+ enabled: true
466
+ passwordSet: true
467
+ overCap: false
468
+ lastConnectedAt: null
469
+ createdAt: '2026-09-22T03:13:56.060Z'
470
+ lastModified: '2026-09-22T03:13:56.060Z'
471
+ '400':
472
+ description: The body is not a JSON object sent as `application/json` (`FILESERVER_JSON_BODY_REQUIRED`).
473
+ content:
474
+ application/json:
475
+ schema:
476
+ $ref: '#/components/schemas/Error'
477
+ examples:
478
+ notJson:
479
+ value:
480
+ errors:
481
+ - code: FILESERVER_JSON_BODY_REQUIRED
482
+ message: 'Request body must be a JSON object sent with Content-Type: application/json'
483
+ '401':
484
+ $ref: '#/components/responses/401-unauthorized'
485
+ '403':
486
+ description: |-
487
+ The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`);
488
+ the license lacks the add-on or the environment is a sandbox
489
+ (`FILESERVER_NOT_ENTITLED`); or the environment already holds
490
+ `limits.maxAccounts` enabled accounts (`FILESERVER_MAX_ACCOUNTS_EXCEEDED`).
491
+ content:
492
+ application/json:
493
+ schema:
494
+ $ref: '#/components/schemas/Error'
495
+ examples:
496
+ capReached:
497
+ value:
498
+ errors:
499
+ - code: FILESERVER_MAX_ACCOUNTS_EXCEEDED
500
+ message: The maximum number of enabled accounts for this environment has been reached
501
+ '409':
502
+ description: Another account in this environment already has that username, enabled or not (`FILESERVER_USERNAME_TAKEN`).
503
+ content:
504
+ application/json:
505
+ schema:
506
+ $ref: '#/components/schemas/Error'
507
+ examples:
508
+ usernameTaken:
509
+ value:
510
+ errors:
511
+ - code: FILESERVER_USERNAME_TAKEN
512
+ message: This username is already in use on this file server
513
+ '422':
514
+ description: |-
515
+ The server has never been enabled (`FILESERVER_NOT_ENABLED`); `username` is
516
+ missing or malformed (`FILESERVER_USERNAME_INVALID`); `password` is missing
517
+ or not a string (`FILESERVER_LAST_CREDENTIAL`) or too weak
518
+ (`FILESERVER_WEAK_PASSWORD` — the message lists every rule broken);
519
+ `_homeFolderId` is missing or does not exist in this environment
520
+ (`FILESERVER_HOME_FOLDER_NOT_FOUND`) or is a file rather than an active folder
521
+ (`FILESERVER_HOME_FOLDER_NOT_FOLDER`).
522
+ content:
523
+ application/json:
524
+ schema:
525
+ $ref: '#/components/schemas/Error'
526
+ examples:
527
+ usernameInvalid:
528
+ value:
529
+ errors:
530
+ - code: FILESERVER_USERNAME_INVALID
531
+ message: Username must be 3-32 lowercase letters, digits or hyphens, with no leading or trailing hyphen
532
+ passwordMissing:
533
+ value:
534
+ errors:
535
+ - code: FILESERVER_LAST_CREDENTIAL
536
+ message: An enabled account must have a password
537
+ weakPassword:
538
+ summary: Password shorter than 12 characters
539
+ value:
540
+ errors:
541
+ - code: FILESERVER_WEAK_PASSWORD
542
+ message: "Password is too weak.\n\t1. Password must have at least 12 characters."
543
+ homeFolderMissing:
544
+ value:
545
+ errors:
546
+ - code: FILESERVER_HOME_FOLDER_NOT_FOUND
547
+ message: The home folder does not exist in this environment
548
+ homeFolderIsFile:
549
+ value:
550
+ errors:
551
+ - code: FILESERVER_HOME_FOLDER_NOT_FOLDER
552
+ message: The home folder target is not an active folder
553
+ '503':
554
+ description: |-
555
+ The home folder is verified against Celigo Storage at create time; when that
556
+ check cannot complete the create is refused with `FILESERVER_STORAGE_UNAVAILABLE`
557
+ and no account is made. Retry later. A `_homeFolderId` that is not a
558
+ well-formed 24-character hex id is answered this way too, not with 422 —
559
+ validate the id before sending.
560
+ content:
561
+ application/json:
562
+ schema:
563
+ $ref: '#/components/schemas/Error'
564
+ examples:
565
+ storageUnavailable:
566
+ value:
567
+ errors:
568
+ - code: FILESERVER_STORAGE_UNAVAILABLE
569
+ message: 'File storage is temporarily unavailable: home-folder validation failed'
570
+ /v1/mft/fileserver/accounts/{_id}:
571
+ get:
572
+ x-internal: false
573
+ operationId: getFileServerAccount
574
+ tags:
575
+ - File Server
576
+ summary: Get a file server account
577
+ description: |-
578
+ Returns one partner account with `overCap` computed against the current cap.
579
+ An id that is unknown, belongs to another environment, or is not a valid
580
+ identifier all answer the same 404. Requires a full-access API token and a
581
+ server that has been enabled at least once.
582
+ parameters:
583
+ - $ref: '#/components/parameters/AccountId'
584
+ responses:
585
+ '200':
586
+ description: The account.
587
+ content:
588
+ application/json:
589
+ schema:
590
+ $ref: '#/components/schemas/FileServerAccount'
591
+ examples:
592
+ default:
593
+ value:
594
+ _id: 6ab1f2737cf630a06d774d09
595
+ username: northwind-edi
596
+ login: northwind-edi@acme-logistics
597
+ _homeFolderId: 6ab1f25daa3e7ed226ea3f25
598
+ homeFolderPath: /Partners/Northwind/Inbound
599
+ enabled: true
600
+ passwordSet: true
601
+ overCap: false
602
+ lastConnectedAt: '2026-09-22T14:35:31.646Z'
603
+ createdAt: '2026-09-22T03:13:56.060Z'
604
+ lastModified: '2026-09-22T14:35:31.648Z'
605
+ '401':
606
+ $ref: '#/components/responses/401-unauthorized'
607
+ '403':
608
+ $ref: '#/components/responses/403-full-access-required'
609
+ '404':
610
+ $ref: '#/components/responses/404-account-not-found'
611
+ '422':
612
+ $ref: '#/components/responses/422-server-not-enabled'
613
+ put:
614
+ x-internal: false
615
+ operationId: updateFileServerAccount
616
+ tags:
617
+ - File Server
618
+ summary: Update a file server account
619
+ description: |-
620
+ Changes the fields sent and returns the account; fields left out keep their
621
+ values, and `{}` returns the account unchanged without touching `lastModified`.
622
+ Renaming keeps `_id` and updates `login`. Moving the home folder is verified
623
+ against Celigo Storage, ends the account's open sessions (as does disabling
624
+ it), and shifts the delete protection from the old folder to the new one.
625
+ Re-enabling counts against `limits.maxAccounts` and requires a password to be
626
+ set. The password cannot be changed here — use
627
+ `POST /v1/mft/fileserver/accounts/{_id}/password`. Requires a full-access API
628
+ token, the file server add-on on the license, and a server that has been
629
+ enabled at least once.
630
+ parameters:
631
+ - $ref: '#/components/parameters/AccountId'
632
+ requestBody:
633
+ required: true
634
+ content:
635
+ application/json:
636
+ schema:
637
+ $ref: '#/components/schemas/FileServerAccountUpdateRequest'
638
+ examples:
639
+ disable:
640
+ summary: Disable the account
641
+ value:
642
+ enabled: false
643
+ rename:
644
+ summary: Rename
645
+ value:
646
+ username: northwind-edi-2
647
+ moveHomeFolder:
648
+ summary: Move to another folder
649
+ value:
650
+ _homeFolderId: 6ac5e3371ddaae28c1fea86e
651
+ responses:
652
+ '200':
653
+ description: The account after the change.
654
+ content:
655
+ application/json:
656
+ schema:
657
+ $ref: '#/components/schemas/FileServerAccount'
658
+ examples:
659
+ disabled:
660
+ value:
661
+ _id: 6ab1f2737cf630a06d774d09
662
+ username: northwind-edi
663
+ login: northwind-edi@acme-logistics
664
+ _homeFolderId: 6ab1f25daa3e7ed226ea3f25
665
+ homeFolderPath: /Partners/Northwind/Inbound
666
+ enabled: false
667
+ passwordSet: true
668
+ overCap: false
669
+ lastConnectedAt: '2026-09-22T14:35:31.646Z'
670
+ createdAt: '2026-09-22T03:13:56.060Z'
671
+ lastModified: '2026-09-25T01:40:12.004Z'
672
+ '400':
673
+ description: The body is not a JSON object sent as `application/json` (`FILESERVER_JSON_BODY_REQUIRED`).
674
+ content:
675
+ application/json:
676
+ schema:
677
+ $ref: '#/components/schemas/Error'
678
+ examples:
679
+ notJson:
680
+ value:
681
+ errors:
682
+ - code: FILESERVER_JSON_BODY_REQUIRED
683
+ message: 'Request body must be a JSON object sent with Content-Type: application/json'
684
+ '401':
685
+ $ref: '#/components/responses/401-unauthorized'
686
+ '403':
687
+ description: |-
688
+ The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`);
689
+ the license lacks the add-on or the environment is a sandbox
690
+ (`FILESERVER_NOT_ENTITLED`); or re-enabling would exceed `limits.maxAccounts`
691
+ (`FILESERVER_MAX_ACCOUNTS_EXCEEDED`).
692
+ content:
693
+ application/json:
694
+ schema:
695
+ $ref: '#/components/schemas/Error'
696
+ examples:
697
+ capReached:
698
+ value:
699
+ errors:
700
+ - code: FILESERVER_MAX_ACCOUNTS_EXCEEDED
701
+ message: The maximum number of enabled accounts for this environment has been reached
702
+ '404':
703
+ $ref: '#/components/responses/404-account-not-found'
704
+ '409':
705
+ description: The new username belongs to another account in this environment (`FILESERVER_USERNAME_TAKEN`).
706
+ content:
707
+ application/json:
708
+ schema:
709
+ $ref: '#/components/schemas/Error'
710
+ examples:
711
+ usernameTaken:
712
+ value:
713
+ errors:
714
+ - code: FILESERVER_USERNAME_TAKEN
715
+ message: This username is already in use on this file server
716
+ '422':
717
+ description: |-
718
+ The server has never been enabled (`FILESERVER_NOT_ENABLED`); `username` is
719
+ malformed (`FILESERVER_USERNAME_INVALID`); `enabled` is present but not a
720
+ boolean (`FILESERVER_ENABLED_REQUIRED`); re-enabling an account with no
721
+ password (`FILESERVER_LAST_CREDENTIAL`); or the new home folder does not exist
722
+ or is not an active folder (`FILESERVER_HOME_FOLDER_NOT_FOUND`,
723
+ `FILESERVER_HOME_FOLDER_NOT_FOLDER`).
724
+ content:
725
+ application/json:
726
+ schema:
727
+ $ref: '#/components/schemas/Error'
728
+ examples:
729
+ enabledRequired:
730
+ value:
731
+ errors:
732
+ - code: FILESERVER_ENABLED_REQUIRED
733
+ message: '"enabled" is required and must be a boolean'
734
+ noPassword:
735
+ value:
736
+ errors:
737
+ - code: FILESERVER_LAST_CREDENTIAL
738
+ message: An enabled account must have a password
739
+ homeFolderIsFile:
740
+ value:
741
+ errors:
742
+ - code: FILESERVER_HOME_FOLDER_NOT_FOLDER
743
+ message: The home folder target is not an active folder
744
+ '503':
745
+ description: |-
746
+ The new home folder could not be verified against Celigo Storage
747
+ (`FILESERVER_STORAGE_UNAVAILABLE`); nothing changed. Retry later. A
748
+ `_homeFolderId` that is not a well-formed 24-character hex id is answered
749
+ this way too, not with 422 — validate the id before sending.
750
+ content:
751
+ application/json:
752
+ schema:
753
+ $ref: '#/components/schemas/Error'
754
+ examples:
755
+ storageUnavailable:
756
+ value:
757
+ errors:
758
+ - code: FILESERVER_STORAGE_UNAVAILABLE
759
+ message: 'File storage is temporarily unavailable: home-folder validation failed'
760
+ delete:
761
+ x-internal: false
762
+ operationId: deleteFileServerAccount
763
+ tags:
764
+ - File Server
765
+ summary: Delete a file server account
766
+ description: |-
767
+ Permanently removes the account and ends any session it has open. The home
768
+ folder and its files are untouched, and the folder (with its ancestors) becomes
769
+ deletable again through `DELETE /v1/storage/items/{_id}`. There is no recycle
770
+ bin for accounts — recreate one to restore access; a repeated delete answers
771
+ 404. Requires a full-access API token, the file server add-on on the license,
772
+ and a server that has been enabled at least once.
773
+ parameters:
774
+ - $ref: '#/components/parameters/AccountId'
775
+ responses:
776
+ '204':
777
+ description: Account deleted.
778
+ '401':
779
+ $ref: '#/components/responses/401-unauthorized'
780
+ '403':
781
+ $ref: '#/components/responses/403-full-access-required'
782
+ '404':
783
+ $ref: '#/components/responses/404-account-not-found'
784
+ '422':
785
+ $ref: '#/components/responses/422-server-not-enabled'
786
+ /v1/mft/fileserver/accounts/{_id}/password:
787
+ post:
788
+ x-internal: false
789
+ operationId: setFileServerAccountPassword
790
+ tags:
791
+ - File Server
792
+ summary: Set or clear an account's password
793
+ description: |-
794
+ Sets a new password for the partner account, or clears it when `password` is
795
+ `null`. Clearing is refused while the account is enabled, because an enabled
796
+ account must keep a credential — disable it first. Either change ends the
797
+ account's open sessions and stamps the change for session revalidation. The
798
+ route answers 204 and never echoes a credential; `passwordSet` on the account
799
+ reflects the result. Requires a full-access API token, the file server add-on on
800
+ the license, and a server that has been enabled at least once.
801
+ parameters:
802
+ - $ref: '#/components/parameters/AccountId'
803
+ requestBody:
804
+ required: true
805
+ content:
806
+ application/json:
807
+ schema:
808
+ $ref: '#/components/schemas/FileServerAccountPasswordRequest'
809
+ examples:
810
+ rotate:
811
+ summary: Set a new password
812
+ value:
813
+ password: Nw-Inbound-2026!y
814
+ clear:
815
+ summary: Clear the password of a disabled account
816
+ value:
817
+ password: null
818
+ responses:
819
+ '204':
820
+ description: Password set or cleared. No body.
821
+ '400':
822
+ description: The body is not a JSON object sent as `application/json` (`FILESERVER_JSON_BODY_REQUIRED`).
823
+ content:
824
+ application/json:
825
+ schema:
826
+ $ref: '#/components/schemas/Error'
827
+ examples:
828
+ notJson:
829
+ value:
830
+ errors:
831
+ - code: FILESERVER_JSON_BODY_REQUIRED
832
+ message: 'Request body must be a JSON object sent with Content-Type: application/json'
833
+ '401':
834
+ $ref: '#/components/responses/401-unauthorized'
835
+ '403':
836
+ $ref: '#/components/responses/403-full-access-required'
837
+ '404':
838
+ $ref: '#/components/responses/404-account-not-found'
839
+ '422':
840
+ description: |-
841
+ The server has never been enabled (`FILESERVER_NOT_ENABLED`); the new password
842
+ breaks the policy or `password` is neither a string nor `null`
843
+ (`FILESERVER_WEAK_PASSWORD` — the message names the rule); or `null` was sent
844
+ for an enabled account (`FILESERVER_LAST_CREDENTIAL`).
845
+ content:
846
+ application/json:
847
+ schema:
848
+ $ref: '#/components/schemas/Error'
849
+ examples:
850
+ weakPassword:
851
+ value:
852
+ errors:
853
+ - code: FILESERVER_WEAK_PASSWORD
854
+ message: Password must be a string (or null to clear).
855
+ lastCredential:
856
+ value:
857
+ errors:
858
+ - code: FILESERVER_LAST_CREDENTIAL
859
+ message: An enabled account must have a password
860
+ components:
861
+ securitySchemes:
862
+ bearerAuth:
863
+ type: http
864
+ scheme: bearer
865
+ schemas:
866
+ FileServer:
867
+ type: object
868
+ description: |-
869
+ The environment's SFTP file server — one per environment, resolved from the
870
+ caller's token (no id in the URL). Partners connect to `endpoint`, verify the
871
+ server against `hostKeyFingerprints`, and log in as `<username>@<identifier>`
872
+ with a partner account's password. On an entitled environment where the server
873
+ has never been enabled, reads answer 404 rather than returning this object; an
874
+ environment without the file server add-on gets a reduced object carrying only
875
+ `entitled: false`, `endpoint`, and `limits`.
876
+ required:
877
+ - endpoint
878
+ - limits
879
+ - entitled
880
+ properties:
881
+ _id:
882
+ type: string
883
+ format: objectId
884
+ readOnly: true
885
+ description: Identifier of the file server record. Absent on the reduced object returned to an environment without the add-on.
886
+ examples:
887
+ - 6ab1ef197cf630a06d774cf1
888
+ enabled:
889
+ type: boolean
890
+ description: |-
891
+ When true, partners can connect and every enabled account can log in. Setting
892
+ it to false on `PUT` keeps the identifier and all accounts, refuses new
893
+ logins, and ends any session currently open; the same body sent again is a
894
+ no-op. Absent on the reduced object returned to an environment without the
895
+ add-on.
896
+ examples:
897
+ - true
898
+ identifier:
899
+ type: string
900
+ minLength: 3
901
+ maxLength: 30
902
+ pattern: ^[a-z0-9](?:[a-z0-9-]{1,28}[a-z0-9])$
903
+ description: |-
904
+ The environment's name inside every partner login (`<username>@<identifier>`),
905
+ unique across the region. Chosen on the `PUT` that first enables the server,
906
+ lowercased on save, and permanent afterwards — a later `PUT` may echo it but a
907
+ different value is rejected with 422 `FILESERVER_IDENTIFIER_IMMUTABLE`.
908
+ Absent on the reduced object returned to an environment without the add-on.
909
+ examples:
910
+ - acme-logistics
911
+ endpoint:
912
+ type: object
913
+ readOnly: true
914
+ description: Where partners connect. Shared by every environment in the region; the `identifier` in the login routes the session.
915
+ required:
916
+ - hostname
917
+ - port
918
+ properties:
919
+ hostname:
920
+ type: string
921
+ description: SFTP host partners connect to.
922
+ examples:
923
+ - sftp.integrator.io
924
+ port:
925
+ type: integer
926
+ description: TCP port of the SFTP listener.
927
+ examples:
928
+ - 22
929
+ hostKeyFingerprints:
930
+ type: array
931
+ readOnly: true
932
+ description: |-
933
+ SHA-256 fingerprints of the server's SSH host keys, one per algorithm, for
934
+ partners to pin before their first connection. Absent on the reduced object
935
+ returned to an environment without the add-on.
936
+ items:
937
+ type: object
938
+ required:
939
+ - algorithm
940
+ - fingerprint
941
+ properties:
942
+ algorithm:
943
+ type: string
944
+ description: SSH host-key algorithm the fingerprint belongs to.
945
+ examples:
946
+ - ssh-ed25519
947
+ fingerprint:
948
+ type: string
949
+ description: Fingerprint in OpenSSH `SHA256:<base64>` form.
950
+ examples:
951
+ - SHA256:iYC+28MNea2ebwWmUMdnJRx0StabV53gZBmr6pto9fs
952
+ loginFormat:
953
+ type: string
954
+ readOnly: true
955
+ description: Template for partner usernames on this server — the account's `username`, `@`, then the server `identifier`. Absent on the reduced object returned to an environment without the add-on.
956
+ examples:
957
+ - <username>@acme-logistics
958
+ limits:
959
+ type: object
960
+ readOnly: true
961
+ description: Effective ceilings for this environment, from the license where it sets them and from platform defaults otherwise.
962
+ required:
963
+ - maxAccounts
964
+ - maxConcurrentSessionsPerAccount
965
+ - maxFileSizeBytes
966
+ properties:
967
+ maxAccounts:
968
+ type: integer
969
+ minimum: 0
970
+ description: Number of enabled accounts the environment may hold. Creating or re-enabling an account past it answers 403 `FILESERVER_MAX_ACCOUNTS_EXCEEDED`.
971
+ examples:
972
+ - 1000
973
+ maxConcurrentSessionsPerAccount:
974
+ type: integer
975
+ minimum: 0
976
+ description: Sessions one account may hold open at once; further logins are refused until one closes.
977
+ examples:
978
+ - 20
979
+ maxFileSizeBytes:
980
+ type: integer
981
+ minimum: 0
982
+ description: Largest single file a partner may upload, in bytes.
983
+ examples:
984
+ - 10737418240
985
+ entitled:
986
+ type: boolean
987
+ readOnly: true
988
+ description: |-
989
+ When true, the account's license includes the file server add-on
990
+ (`fileserver.enabled`) and the server can be enabled and managed. When false
991
+ the object is reduced to `endpoint` and `limits`, and every `PUT` and every
992
+ account write answers 403 `FILESERVER_NOT_ENTITLED`; existing accounts stay
993
+ readable.
994
+ examples:
995
+ - true
996
+ storageUsage:
997
+ type: object
998
+ readOnly: true
999
+ description: |-
1000
+ Only present on the response to a `PUT` with `enabled: true` — including a
1001
+ repeat on a server that is already enabled: the account's Celigo Storage
1002
+ usage exactly as `GET /v1/storage/usage` reports it, read at enable time
1003
+ because partner uploads land in that storage. Absent on reads.
1004
+ required:
1005
+ - activeUsage
1006
+ - recycleBinUsage
1007
+ - totalUsage
1008
+ - maxAllowedUsage
1009
+ - isOverage
1010
+ - hardLimit
1011
+ - overage
1012
+ properties:
1013
+ activeUsage:
1014
+ type: integer
1015
+ format: int64
1016
+ description: Bytes consumed by active and pending files.
1017
+ examples:
1018
+ - 3387143
1019
+ recycleBinUsage:
1020
+ type: integer
1021
+ format: int64
1022
+ description: Bytes consumed by soft-deleted files still retained in the recycle bin.
1023
+ examples:
1024
+ - 26305326
1025
+ totalUsage:
1026
+ type: integer
1027
+ format: int64
1028
+ description: Sum of `activeUsage` and `recycleBinUsage`; the figure checked against `hardLimit` when a partner uploads.
1029
+ examples:
1030
+ - 29692469
1031
+ maxAllowedUsage:
1032
+ type: integer
1033
+ format: int64
1034
+ description: Storage quota in bytes granted by the account's license.
1035
+ examples:
1036
+ - 214748364800
1037
+ isOverage:
1038
+ type: boolean
1039
+ description: When true, `totalUsage` has passed `maxAllowedUsage` and uploads are consuming the overage buffer up to `hardLimit`.
1040
+ examples:
1041
+ - false
1042
+ hardLimit:
1043
+ type: integer
1044
+ format: int64
1045
+ description: Byte ceiling at which partner uploads are rejected, as `maxAllowedUsage` plus the licensed overage buffer.
1046
+ examples:
1047
+ - 429496729600
1048
+ overage:
1049
+ type: integer
1050
+ format: int64
1051
+ description: Bytes currently consumed beyond `maxAllowedUsage`. Zero when not in overage.
1052
+ examples:
1053
+ - 0
1054
+ Error:
1055
+ type: object
1056
+ description: Standard error response envelope returned by integrator.io APIs.
1057
+ properties:
1058
+ errors:
1059
+ type: array
1060
+ description: List of errors that occurred while processing the request.
1061
+ items:
1062
+ type: object
1063
+ properties:
1064
+ code:
1065
+ oneOf:
1066
+ - type: string
1067
+ - type: integer
1068
+ description: |-
1069
+ Machine-readable error code. Usually a string like
1070
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1071
+ may be an **integer** when the error mirrors an upstream HTTP
1072
+ status (e.g. `500`) — most commonly returned by connection-ping
1073
+ and adaptor-proxy responses.
1074
+ message:
1075
+ type: string
1076
+ description: Human-readable description of the error.
1077
+ field:
1078
+ type: string
1079
+ description: |-
1080
+ Optional pointer to the document field that caused the error.
1081
+ Used by structural validation errors (`missing_required_field`,
1082
+ `invalid_ref`) to indicate which field is at fault
1083
+ (e.g. `_id`, `type`, `http.baseURI`).
1084
+ source:
1085
+ type: string
1086
+ description: |-
1087
+ Optional origin layer for the error — e.g. `application` when
1088
+ the error came from the remote system the adaptor called,
1089
+ `connector` when the adaptor itself rejected the request.
1090
+ required:
1091
+ - message
1092
+ required:
1093
+ - errors
1094
+ FileServerRequest:
1095
+ type: object
1096
+ description: |-
1097
+ Body of `PUT /v1/mft/fileserver`. `enabled` must be an explicit boolean — an
1098
+ absent or non-boolean value is rejected (422 `FILESERVER_ENABLED_REQUIRED`)
1099
+ rather than read as a disable, because a disable ends every open partner
1100
+ session.
1101
+ required:
1102
+ - enabled
1103
+ properties:
1104
+ enabled:
1105
+ type: boolean
1106
+ description: |-
1107
+ When true, enables the server (creating it on the first call). When false,
1108
+ disables it: the identifier and all accounts are kept, new logins are refused,
1109
+ and open sessions end.
1110
+ examples:
1111
+ - true
1112
+ identifier:
1113
+ type: string
1114
+ minLength: 3
1115
+ maxLength: 30
1116
+ pattern: ^[a-z0-9](?:[a-z0-9-]{1,28}[a-z0-9])$
1117
+ description: |-
1118
+ Required on the `PUT` that first enables the server; permanent afterwards.
1119
+ Lowercased on save and unique across the region (409
1120
+ `FILESERVER_IDENTIFIER_TAKEN` when another environment holds it). On later
1121
+ calls omit it or echo the current value — any other value answers 422
1122
+ `FILESERVER_IDENTIFIER_IMMUTABLE`, even on a disable.
1123
+ examples:
1124
+ - acme-logistics
1125
+ x-celigo-ai-guidance:
1126
+ - |-
1127
+ Always send enabled as a JSON boolean: {} and {"enabled": "true"} both fail with 422
1128
+ FILESERVER_ENABLED_REQUIRED, and a non-JSON body fails with 400
1129
+ FILESERVER_JSON_BODY_REQUIRED. Never send a new identifier for an existing server —
1130
+ it is rejected with 422 FILESERVER_IDENTIFIER_IMMUTABLE even when enabled is unchanged.
1131
+ FileServerAccount:
1132
+ type: object
1133
+ description: |-
1134
+ A partner login on the environment's file server. The partner authenticates as
1135
+ `login` with the password set through `POST /v1/mft/fileserver/accounts/{_id}/password`
1136
+ (never returned — `passwordSet` only says whether one exists) and sees the
1137
+ Celigo Storage folder `_homeFolderId` as the root of the session. Disabling the
1138
+ account, deleting it, changing its password, or moving its home folder ends any
1139
+ session it has open.
1140
+ required:
1141
+ - _id
1142
+ - username
1143
+ - login
1144
+ - _homeFolderId
1145
+ - enabled
1146
+ - passwordSet
1147
+ - overCap
1148
+ - createdAt
1149
+ - lastModified
1150
+ properties:
1151
+ _id:
1152
+ type: string
1153
+ format: objectId
1154
+ readOnly: true
1155
+ description: Identifier of the account. Not derived from the username, so a rename keeps it.
1156
+ examples:
1157
+ - 6ab1f2737cf630a06d774d09
1158
+ username:
1159
+ type: string
1160
+ minLength: 3
1161
+ maxLength: 32
1162
+ pattern: ^[a-z0-9](?:[a-z0-9-]{1,30}[a-z0-9])$
1163
+ description: |-
1164
+ Partner's name on this server, unique per environment even while the account
1165
+ is disabled. Lowercased on save; a value outside the pattern is rejected with
1166
+ 422 `FILESERVER_USERNAME_INVALID` and a name another account already holds
1167
+ with 409 `FILESERVER_USERNAME_TAKEN`.
1168
+ examples:
1169
+ - northwind-edi
1170
+ login:
1171
+ type: string
1172
+ readOnly: true
1173
+ description: The exact SFTP username the partner types — `username`, `@`, then the server `identifier`.
1174
+ examples:
1175
+ - northwind-edi@acme-logistics
1176
+ _homeFolderId:
1177
+ type: string
1178
+ format: objectId
1179
+ x-celigo-refModel: storageitems
1180
+ description: |-
1181
+ Celigo Storage folder that is the root of every session for this account —
1182
+ the partner can reach nothing outside it. Must be an active folder in the same
1183
+ environment; otherwise the write answers 422 `FILESERVER_HOME_FOLDER_NOT_FOUND`
1184
+ or `FILESERVER_HOME_FOLDER_NOT_FOLDER`. While the account exists, this folder
1185
+ and every folder above it refuse `DELETE /v1/storage/items/{_id}` with 403
1186
+ `STORAGE_SFTP_HOME_FOLDER_PROTECTED`; renaming or moving them stays allowed.
1187
+ Moving an account to another folder ends its open sessions.
1188
+ examples:
1189
+ - 6ab1f25daa3e7ed226ea3f25
1190
+ homeFolderPath:
1191
+ type:
1192
+ - string
1193
+ - 'null'
1194
+ readOnly: true
1195
+ description: |-
1196
+ Absolute path of `_homeFolderId` from the storage root, for display — a
1197
+ leading `/` then the folder names on the way down, following renames and
1198
+ moves of those folders. Null when the path could not be resolved for this
1199
+ response — the folder id is still authoritative.
1200
+ examples:
1201
+ - /Partners/Northwind/Inbound
1202
+ enabled:
1203
+ type: boolean
1204
+ description: |-
1205
+ When true, the partner can log in. Disabling keeps the account and its password
1206
+ but refuses logins and ends open sessions; re-enabling counts against
1207
+ `limits.maxAccounts` and requires a password to be set (422
1208
+ `FILESERVER_LAST_CREDENTIAL` otherwise). New accounts start enabled.
1209
+ examples:
1210
+ - true
1211
+ passwordSet:
1212
+ type: boolean
1213
+ readOnly: true
1214
+ description: |-
1215
+ When true, the account has a password. The password itself is never returned by
1216
+ any route; change or clear it through `POST /v1/mft/fileserver/accounts/{_id}/password`.
1217
+ Clearing is allowed only while the account is disabled.
1218
+ examples:
1219
+ - true
1220
+ overCap:
1221
+ type: boolean
1222
+ readOnly: true
1223
+ description: |-
1224
+ When true, this enabled account ranks above the environment's `limits.maxAccounts`
1225
+ after the cap was lowered, so its logins are refused until enough other accounts
1226
+ are disabled or deleted. Computed on every read; always false while the
1227
+ environment is within its cap.
1228
+ examples:
1229
+ - false
1230
+ lastConnectedAt:
1231
+ type:
1232
+ - string
1233
+ - 'null'
1234
+ format: date-time
1235
+ readOnly: true
1236
+ description: Timestamp of the partner's most recent successful login. Null until the first one.
1237
+ examples:
1238
+ - '2026-09-22T14:35:31.646Z'
1239
+ createdAt:
1240
+ type: string
1241
+ format: date-time
1242
+ readOnly: true
1243
+ description: Timestamp when the account was created.
1244
+ examples:
1245
+ - '2026-09-22T03:13:56.060Z'
1246
+ lastModified:
1247
+ type: string
1248
+ format: date-time
1249
+ readOnly: true
1250
+ description: Timestamp of the last change to the account, including logins updating `lastConnectedAt`.
1251
+ examples:
1252
+ - '2026-09-22T14:35:31.648Z'
1253
+ FileServerAccountCreateRequest:
1254
+ type: object
1255
+ description: |-
1256
+ Body of `POST /v1/mft/fileserver/accounts`. The account is created enabled, so
1257
+ all three fields are needed for a partner to be able to log in. Checks run in
1258
+ this order and the first failure is returned: `username` shape, `password`
1259
+ presence, `_homeFolderId` presence, the enabled-account cap, then the folder's
1260
+ existence and type in this environment.
1261
+ required:
1262
+ - username
1263
+ - password
1264
+ - _homeFolderId
1265
+ properties:
1266
+ username:
1267
+ type: string
1268
+ minLength: 3
1269
+ maxLength: 32
1270
+ pattern: ^[a-z0-9](?:[a-z0-9-]{1,30}[a-z0-9])$
1271
+ description: |-
1272
+ Partner's name on this server; the SFTP login becomes `<username>@<identifier>`.
1273
+ Lowercased on save. Unique per environment, including against disabled accounts
1274
+ (409 `FILESERVER_USERNAME_TAKEN`).
1275
+ examples:
1276
+ - northwind-edi
1277
+ password:
1278
+ type: string
1279
+ format: password
1280
+ minLength: 12
1281
+ maxLength: 256
1282
+ description: |-
1283
+ Partner's password. Needs upper- and lower-case letters, a digit, and a symbol;
1284
+ anything weaker is rejected with 422 `FILESERVER_WEAK_PASSWORD` and the message
1285
+ lists every rule broken. A non-string value counts as no password at all (422
1286
+ `FILESERVER_LAST_CREDENTIAL`). Never returned by any route — rotate or clear it
1287
+ later through `POST /v1/mft/fileserver/accounts/{_id}/password`.
1288
+ examples:
1289
+ - Nw-Inbound-2026!x
1290
+ _homeFolderId:
1291
+ type: string
1292
+ format: objectId
1293
+ x-celigo-refModel: storageitems
1294
+ description: |-
1295
+ Celigo Storage folder that becomes the root of the partner's sessions. Must be
1296
+ an active folder in this environment — create one with
1297
+ `POST /v1/storage/items` first. Once the account exists the folder and its
1298
+ ancestors cannot be deleted from storage until the account is deleted or
1299
+ moved elsewhere.
1300
+ examples:
1301
+ - 6ab1f25daa3e7ed226ea3f25
1302
+ x-celigo-ai-guidance:
1303
+ - |-
1304
+ Send username, password and _homeFolderId together. A missing username answers 422
1305
+ FILESERVER_USERNAME_INVALID (same code as a malformed one), a missing password 422
1306
+ FILESERVER_LAST_CREDENTIAL, and a missing _homeFolderId 422
1307
+ FILESERVER_HOME_FOLDER_NOT_FOUND — each before anything is created.
1308
+ - |-
1309
+ Send _homeFolderId as the 24-character hex _id returned by POST /v1/storage/items. A
1310
+ malformed value is not a 422: it fails the storage lookup and answers 503
1311
+ FILESERVER_STORAGE_UNAVAILABLE "home-folder validation failed", which looks like an
1312
+ outage. A well-formed id that does not exist answers 422
1313
+ FILESERVER_HOME_FOLDER_NOT_FOUND and a file's id 422 FILESERVER_HOME_FOLDER_NOT_FOLDER.
1314
+ FileServerAccountUpdateRequest:
1315
+ type: object
1316
+ description: |-
1317
+ Body of `PUT /v1/mft/fileserver/accounts/{_id}`. Partial: only the fields sent
1318
+ change, and an empty object is a no-op that returns the current account. The
1319
+ password is not part of this body — use the dedicated password route.
1320
+ properties:
1321
+ username:
1322
+ type: string
1323
+ minLength: 3
1324
+ maxLength: 32
1325
+ pattern: ^[a-z0-9](?:[a-z0-9-]{1,30}[a-z0-9])$
1326
+ description: New name for the partner; `login` changes with it and `_id` does not. Same shape and uniqueness rules as on create.
1327
+ examples:
1328
+ - northwind-edi-2
1329
+ _homeFolderId:
1330
+ type: string
1331
+ format: objectId
1332
+ x-celigo-refModel: storageitems
1333
+ description: |-
1334
+ Move the account to another active folder in this environment. Ends the
1335
+ account's open sessions, which were rooted in the old folder, and moves the
1336
+ storage delete protection from the old folder to the new one. The same
1337
+ validation and error answers apply as on create, including the 503 for a
1338
+ malformed id.
1339
+ examples:
1340
+ - 6ab1f25daa3e7ed226ea3f25
1341
+ enabled:
1342
+ type: boolean
1343
+ description: |-
1344
+ Must be a JSON boolean when present (422 `FILESERVER_ENABLED_REQUIRED` for
1345
+ `"false"` or other non-booleans). False keeps the account but refuses logins
1346
+ and ends open sessions. True re-enables it — subject to `limits.maxAccounts`
1347
+ (403 `FILESERVER_MAX_ACCOUNTS_EXCEEDED`) and only if a password is set (422
1348
+ `FILESERVER_LAST_CREDENTIAL`).
1349
+ examples:
1350
+ - false
1351
+ FileServerAccountPasswordRequest:
1352
+ type: object
1353
+ description: |-
1354
+ Body of `POST /v1/mft/fileserver/accounts/{_id}/password`. Sets a new password or,
1355
+ with `null`, clears the current one. Either change ends the account's open
1356
+ sessions. Nothing is echoed back — the route answers 204.
1357
+ required:
1358
+ - password
1359
+ properties:
1360
+ password:
1361
+ type:
1362
+ - string
1363
+ - 'null'
1364
+ format: password
1365
+ description: |-
1366
+ The new password, meeting the same policy as on create (422
1367
+ `FILESERVER_WEAK_PASSWORD` otherwise), or `null` to remove the password —
1368
+ allowed only while the account is disabled, because an enabled account must
1369
+ keep a credential (422 `FILESERVER_LAST_CREDENTIAL`). Any other type, or an
1370
+ empty body, answers 422 `FILESERVER_WEAK_PASSWORD` with the message "Password
1371
+ must be a string (or null to clear)."
1372
+ examples:
1373
+ - Nw-Inbound-2026!y
1374
+ responses:
1375
+ 401-unauthorized:
1376
+ description: |-
1377
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1378
+ failed to authenticate.
1379
+
1380
+ Note: the 401 response is produced by the auth middleware **before** the
1381
+ request reaches the endpoint handler, so it does **not** follow the
1382
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1383
+ `{message: string}` object with no `code`, no `errors` array. Callers
1384
+ handling 401s should key off the HTTP status and the `message` string,
1385
+ not try to destructure an `errors[]`.
1386
+ content:
1387
+ application/json:
1388
+ schema:
1389
+ type: object
1390
+ properties:
1391
+ message:
1392
+ type: string
1393
+ description: |-
1394
+ Human-readable description of the auth failure. Known values:
1395
+ - `"Unauthorized"` — no `Authorization` header on the request.
1396
+ - `"Bearer Authentication Failed"` — header present but token
1397
+ is invalid, revoked, or expired.
1398
+ required:
1399
+ - message
1400
+ examples:
1401
+ missing_token:
1402
+ summary: No Authorization header sent
1403
+ value:
1404
+ message: Unauthorized
1405
+ invalid_token:
1406
+ summary: Bearer token invalid or revoked
1407
+ value:
1408
+ message: Bearer Authentication Failed
1409
+ 403-full-access-required:
1410
+ description: The token is not a full-access API token (`FILESERVER_FULL_ACCESS_TOKEN_REQUIRED`), or the license lacks the add-on / the environment is a sandbox (`FILESERVER_NOT_ENTITLED`).
1411
+ content:
1412
+ application/json:
1413
+ schema:
1414
+ $ref: '#/components/schemas/Error'
1415
+ examples:
1416
+ scopedToken:
1417
+ value:
1418
+ errors:
1419
+ - code: FILESERVER_FULL_ACCESS_TOKEN_REQUIRED
1420
+ message: The file server management APIs require an API token with full access
1421
+ 404-account-not-found:
1422
+ description: No account with this id in the caller's environment, or the id is not a valid identifier (`FILESERVER_ACCOUNT_NOT_FOUND`).
1423
+ content:
1424
+ application/json:
1425
+ schema:
1426
+ $ref: '#/components/schemas/Error'
1427
+ examples:
1428
+ notFound:
1429
+ value:
1430
+ errors:
1431
+ - code: FILESERVER_ACCOUNT_NOT_FOUND
1432
+ message: File server account not found
1433
+ 422-server-not-enabled:
1434
+ description: The environment's server has never been enabled (`FILESERVER_NOT_ENABLED`); a disabled server is still manageable.
1435
+ content:
1436
+ application/json:
1437
+ schema:
1438
+ $ref: '#/components/schemas/Error'
1439
+ examples:
1440
+ notEnabled:
1441
+ value:
1442
+ errors:
1443
+ - code: FILESERVER_NOT_ENABLED
1444
+ message: Enable the file server before managing accounts
1445
+ parameters:
1446
+ AccountId:
1447
+ name: _id
1448
+ in: path
1449
+ required: true
1450
+ description: The file server account. A malformed value answers 404 like an unknown one.
1451
+ schema:
1452
+ type: string
1453
+ format: objectId
1454
+ examples:
1455
+ - 6ab1f2737cf630a06d774d09
1456
+ x-internal: false
1457
+ x-enable-proxy: true