@celigo/api-specs 0.2.289 → 0.2.291

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 (53) hide show
  1. package/dist/account.yml +70 -59
  2. package/dist/agent.yml +30 -19
  3. package/dist/agentgroup.yml +30 -19
  4. package/dist/ai-agent.yml +46 -30
  5. package/dist/alert.yml +30 -19
  6. package/dist/api.yml +31 -20
  7. package/dist/apim.yml +30 -19
  8. package/dist/asynchelper.yml +48 -37
  9. package/dist/audit.yml +30 -19
  10. package/dist/bartendertemplate.yml +30 -19
  11. package/dist/connection.yml +92 -64
  12. package/dist/connector.yml +30 -19
  13. package/dist/ediprofile.yml +43 -32
  14. package/dist/editransaction.yml +30 -19
  15. package/dist/enduser.yml +30 -19
  16. package/dist/environment.yml +30 -19
  17. package/dist/eventreport.yml +70 -59
  18. package/dist/export.yml +71 -60
  19. package/dist/filedefinition.yml +65 -54
  20. package/dist/fileserver.yml +30 -19
  21. package/dist/filestorage.yml +30 -19
  22. package/dist/flow.yml +31 -20
  23. package/dist/guardrail.yml +85 -68
  24. package/dist/httpconnector.yml +71 -60
  25. package/dist/httpconnectorendpoint.yml +30 -19
  26. package/dist/httpconnectorresource.yml +31 -20
  27. package/dist/iclient.yml +51 -40
  28. package/dist/import.yml +103 -81
  29. package/dist/integration.yml +37 -26
  30. package/dist/job.yml +30 -19
  31. package/dist/lookupcache.yml +35 -24
  32. package/dist/marketplace.yml +30 -19
  33. package/dist/mcp-oauth-provider.yml +42 -31
  34. package/dist/mcp-server.yml +52 -41
  35. package/dist/networkpolicy.yml +30 -19
  36. package/dist/notification.yml +30 -19
  37. package/dist/processor.yml +70 -59
  38. package/dist/profile.yml +43 -32
  39. package/dist/recyclebin.yml +30 -19
  40. package/dist/script.yml +70 -59
  41. package/dist/stack.yml +30 -19
  42. package/dist/state.yml +30 -19
  43. package/dist/storagequery.yml +30 -19
  44. package/dist/subscription.yml +70 -19
  45. package/dist/sync.yml +30 -19
  46. package/dist/tag.yml +46 -35
  47. package/dist/template.yml +30 -19
  48. package/dist/tool.yml +72 -50
  49. package/dist/topic.yml +30 -19
  50. package/dist/tradingpartnerconnector.yml +31 -20
  51. package/dist/user.yml +30 -19
  52. package/package.json +1 -1
  53. package/schemas.json +1 -1
@@ -452,18 +452,6 @@ components:
452
452
  description: Owning user ID.
453
453
  examples:
454
454
  - 624cb0346309dc3a543733a2
455
- Request:
456
- type: object
457
- description: |-
458
- Request body for creating or updating an MCP OAuth provider. On PUT,
459
- this is a full replacement; include all fields you want to keep because
460
- omitted optional fields are cleared.
461
- required:
462
- - name
463
- - issuerURL
464
- - audience
465
- allOf:
466
- - $ref: '#/components/schemas/MCPOAuthProviderBase'
467
455
  Error:
468
456
  type: object
469
457
  description: Standard error response envelope returned by integrator.io APIs.
@@ -504,32 +492,49 @@ components:
504
492
  - message
505
493
  required:
506
494
  - errors
495
+ Request:
496
+ type: object
497
+ description: |-
498
+ Request body for creating or updating an MCP OAuth provider. On PUT,
499
+ this is a full replacement; include all fields you want to keep because
500
+ omitted optional fields are cleared.
501
+ required:
502
+ - name
503
+ - issuerURL
504
+ - audience
505
+ allOf:
506
+ - $ref: '#/components/schemas/MCPOAuthProviderBase'
507
507
  responses:
508
508
  401-unauthorized:
509
509
  description: |-
510
- Unauthorized. The request lacks a valid bearer token, or the provided token
511
- failed to authenticate.
510
+ Unauthorized, in one of two shapes.
512
511
 
513
- Note: the 401 response is produced by the auth middleware **before** the
514
- request reaches the endpoint handler, so it does **not** follow the
515
- standard `{errors: [...]}` envelope. Instead the body is a bare
516
- `{message: string}` object with no `code`, no `errors` array. Callers
517
- handling 401s should key off the HTTP status and the `message` string,
518
- not try to destructure an `errors[]`.
512
+ No valid bearer token: the auth middleware answers before the endpoint
513
+ handler runs, with a bare `{message: string}` body — no `code`, no
514
+ `errors` array — so key off the HTTP status and `message`.
515
+
516
+ An API token with a custom scope calling an operation its scope does not
517
+ grant: the token authenticated, and the body is the standard
518
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
519
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
520
+ passed both, a personal access token `GET /v1/exports/{_id}`.
519
521
  content:
520
522
  application/json:
521
523
  schema:
522
- type: object
523
- properties:
524
- message:
525
- type: string
526
- description: |-
527
- Human-readable description of the auth failure. Known values:
528
- - `"Unauthorized"` — no `Authorization` header on the request.
529
- - `"Bearer Authentication Failed"` — header present but token
530
- is invalid, revoked, or expired.
531
- required:
532
- - message
524
+ oneOf:
525
+ - type: object
526
+ description: The auth middleware's bare body for a missing or invalid token.
527
+ properties:
528
+ message:
529
+ type: string
530
+ description: |-
531
+ Human-readable description of the auth failure. Known values:
532
+ - `"Unauthorized"` — no `Authorization` header on the request.
533
+ - `"Bearer Authentication Failed"` — header present but token
534
+ is invalid, revoked, or expired.
535
+ required:
536
+ - message
537
+ - $ref: '#/components/schemas/Error'
533
538
  examples:
534
539
  missing_token:
535
540
  summary: No Authorization header sent
@@ -539,6 +544,12 @@ components:
539
544
  summary: Bearer token invalid or revoked
540
545
  value:
541
546
  message: Bearer Authentication Failed
547
+ scoped_token:
548
+ summary: An API token with a custom scope reading a resource
549
+ value:
550
+ errors:
551
+ - code: access_restricted
552
+ message: You don't have the required permissions to perform the action.
542
553
  400-bad-request:
543
554
  description: |
544
555
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -4795,28 +4795,6 @@ components:
4795
4795
  - |-
4796
4796
  Contains the complete MCP server configuration including metadata,
4797
4797
  tool entries, API entries, and their override settings.
4798
- Request:
4799
- type: object
4800
- description: |-
4801
- Request body for creating or updating an MCP server. On PUT, include the
4802
- full `connections`, `tools`, `apis`, `prompts`, `resources`,
4803
- `permissionSets`, and `policies` arrays because omitted arrays are
4804
- cleared; `upstreamMcpConnections`, `_networkPolicyId` and `logging` are
4805
- the exceptions and keep their stored value when omitted. Every array entry
4806
- must be an object — a `null` entry in `tools`, `apis`, `prompts`,
4807
- `resources`, or `upstreamMcpConnections` is rejected with 422
4808
- `mcp_server_invalid_array_item`. Use PATCH to update individual fields
4809
- without affecting these arrays.
4810
- x-celigo-ai-guidance:
4811
- - |-
4812
- MCP servers expose Celigo tools, builder-mode APIs,
4813
- and inline prompt templates as MCP-compatible endpoints for consumption by AI
4814
- agents and MCP clients.
4815
- required:
4816
- - name
4817
- - relativeURI
4818
- allOf:
4819
- - $ref: '#/components/schemas/MCPServerBase'
4820
4798
  Error:
4821
4799
  type: object
4822
4800
  description: Standard error response envelope returned by integrator.io APIs.
@@ -4857,6 +4835,28 @@ components:
4857
4835
  - message
4858
4836
  required:
4859
4837
  - errors
4838
+ Request:
4839
+ type: object
4840
+ description: |-
4841
+ Request body for creating or updating an MCP server. On PUT, include the
4842
+ full `connections`, `tools`, `apis`, `prompts`, `resources`,
4843
+ `permissionSets`, and `policies` arrays because omitted arrays are
4844
+ cleared; `upstreamMcpConnections`, `_networkPolicyId` and `logging` are
4845
+ the exceptions and keep their stored value when omitted. Every array entry
4846
+ must be an object — a `null` entry in `tools`, `apis`, `prompts`,
4847
+ `resources`, or `upstreamMcpConnections` is rejected with 422
4848
+ `mcp_server_invalid_array_item`. Use PATCH to update individual fields
4849
+ without affecting these arrays.
4850
+ x-celigo-ai-guidance:
4851
+ - |-
4852
+ MCP servers expose Celigo tools, builder-mode APIs,
4853
+ and inline prompt templates as MCP-compatible endpoints for consumption by AI
4854
+ agents and MCP clients.
4855
+ required:
4856
+ - name
4857
+ - relativeURI
4858
+ allOf:
4859
+ - $ref: '#/components/schemas/MCPServerBase'
4860
4860
  JsonPatchOperation:
4861
4861
  type: object
4862
4862
  description: A single JSON Patch operation (RFC 6902).
@@ -12105,29 +12105,34 @@ components:
12105
12105
  responses:
12106
12106
  401-unauthorized:
12107
12107
  description: |-
12108
- Unauthorized. The request lacks a valid bearer token, or the provided token
12109
- failed to authenticate.
12108
+ Unauthorized, in one of two shapes.
12110
12109
 
12111
- Note: the 401 response is produced by the auth middleware **before** the
12112
- request reaches the endpoint handler, so it does **not** follow the
12113
- standard `{errors: [...]}` envelope. Instead the body is a bare
12114
- `{message: string}` object with no `code`, no `errors` array. Callers
12115
- handling 401s should key off the HTTP status and the `message` string,
12116
- not try to destructure an `errors[]`.
12110
+ No valid bearer token: the auth middleware answers before the endpoint
12111
+ handler runs, with a bare `{message: string}` body — no `code`, no
12112
+ `errors` array — so key off the HTTP status and `message`.
12113
+
12114
+ An API token with a custom scope calling an operation its scope does not
12115
+ grant: the token authenticated, and the body is the standard
12116
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
12117
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
12118
+ passed both, a personal access token `GET /v1/exports/{_id}`.
12117
12119
  content:
12118
12120
  application/json:
12119
12121
  schema:
12120
- type: object
12121
- properties:
12122
- message:
12123
- type: string
12124
- description: |-
12125
- Human-readable description of the auth failure. Known values:
12126
- - `"Unauthorized"` — no `Authorization` header on the request.
12127
- - `"Bearer Authentication Failed"` — header present but token
12128
- is invalid, revoked, or expired.
12129
- required:
12130
- - message
12122
+ oneOf:
12123
+ - type: object
12124
+ description: The auth middleware's bare body for a missing or invalid token.
12125
+ properties:
12126
+ message:
12127
+ type: string
12128
+ description: |-
12129
+ Human-readable description of the auth failure. Known values:
12130
+ - `"Unauthorized"` — no `Authorization` header on the request.
12131
+ - `"Bearer Authentication Failed"` — header present but token
12132
+ is invalid, revoked, or expired.
12133
+ required:
12134
+ - message
12135
+ - $ref: '#/components/schemas/Error'
12131
12136
  examples:
12132
12137
  missing_token:
12133
12138
  summary: No Authorization header sent
@@ -12137,6 +12142,12 @@ components:
12137
12142
  summary: Bearer token invalid or revoked
12138
12143
  value:
12139
12144
  message: Bearer Authentication Failed
12145
+ scoped_token:
12146
+ summary: An API token with a custom scope reading a resource
12147
+ value:
12148
+ errors:
12149
+ - code: access_restricted
12150
+ message: You don't have the required permissions to perform the action.
12140
12151
  400-bad-request:
12141
12152
  description: |
12142
12153
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -1149,29 +1149,34 @@ components:
1149
1149
  message: The request body failed validation.
1150
1150
  401-unauthorized:
1151
1151
  description: |-
1152
- Unauthorized. The request lacks a valid bearer token, or the provided token
1153
- failed to authenticate.
1152
+ Unauthorized, in one of two shapes.
1154
1153
 
1155
- Note: the 401 response is produced by the auth middleware **before** the
1156
- request reaches the endpoint handler, so it does **not** follow the
1157
- standard `{errors: [...]}` envelope. Instead the body is a bare
1158
- `{message: string}` object with no `code`, no `errors` array. Callers
1159
- handling 401s should key off the HTTP status and the `message` string,
1160
- not try to destructure an `errors[]`.
1154
+ No valid bearer token: the auth middleware answers before the endpoint
1155
+ handler runs, with a bare `{message: string}` body — no `code`, no
1156
+ `errors` array — so key off the HTTP status and `message`.
1157
+
1158
+ An API token with a custom scope calling an operation its scope does not
1159
+ grant: the token authenticated, and the body is the standard
1160
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1161
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1162
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1161
1163
  content:
1162
1164
  application/json:
1163
1165
  schema:
1164
- type: object
1165
- properties:
1166
- message:
1167
- type: string
1168
- description: |-
1169
- Human-readable description of the auth failure. Known values:
1170
- - `"Unauthorized"` — no `Authorization` header on the request.
1171
- - `"Bearer Authentication Failed"` — header present but token
1172
- is invalid, revoked, or expired.
1173
- required:
1174
- - message
1166
+ oneOf:
1167
+ - type: object
1168
+ description: The auth middleware's bare body for a missing or invalid token.
1169
+ properties:
1170
+ message:
1171
+ type: string
1172
+ description: |-
1173
+ Human-readable description of the auth failure. Known values:
1174
+ - `"Unauthorized"` — no `Authorization` header on the request.
1175
+ - `"Bearer Authentication Failed"` — header present but token
1176
+ is invalid, revoked, or expired.
1177
+ required:
1178
+ - message
1179
+ - $ref: '#/components/schemas/Error'
1175
1180
  examples:
1176
1181
  missing_token:
1177
1182
  summary: No Authorization header sent
@@ -1181,6 +1186,12 @@ components:
1181
1186
  summary: Bearer token invalid or revoked
1182
1187
  value:
1183
1188
  message: Bearer Authentication Failed
1189
+ scoped_token:
1190
+ summary: An API token with a custom scope reading a resource
1191
+ value:
1192
+ errors:
1193
+ - code: access_restricted
1194
+ message: You don't have the required permissions to perform the action.
1184
1195
  422-unprocessable-entity:
1185
1196
  description: |
1186
1197
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
@@ -521,29 +521,34 @@ components:
521
521
  message: The request body failed validation.
522
522
  401-unauthorized:
523
523
  description: |-
524
- Unauthorized. The request lacks a valid bearer token, or the provided token
525
- failed to authenticate.
524
+ Unauthorized, in one of two shapes.
526
525
 
527
- Note: the 401 response is produced by the auth middleware **before** the
528
- request reaches the endpoint handler, so it does **not** follow the
529
- standard `{errors: [...]}` envelope. Instead the body is a bare
530
- `{message: string}` object with no `code`, no `errors` array. Callers
531
- handling 401s should key off the HTTP status and the `message` string,
532
- not try to destructure an `errors[]`.
526
+ No valid bearer token: the auth middleware answers before the endpoint
527
+ handler runs, with a bare `{message: string}` body — no `code`, no
528
+ `errors` array — so key off the HTTP status and `message`.
529
+
530
+ An API token with a custom scope calling an operation its scope does not
531
+ grant: the token authenticated, and the body is the standard
532
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
533
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
534
+ passed both, a personal access token `GET /v1/exports/{_id}`.
533
535
  content:
534
536
  application/json:
535
537
  schema:
536
- type: object
537
- properties:
538
- message:
539
- type: string
540
- description: |-
541
- Human-readable description of the auth failure. Known values:
542
- - `"Unauthorized"` — no `Authorization` header on the request.
543
- - `"Bearer Authentication Failed"` — header present but token
544
- is invalid, revoked, or expired.
545
- required:
546
- - message
538
+ oneOf:
539
+ - type: object
540
+ description: The auth middleware's bare body for a missing or invalid token.
541
+ properties:
542
+ message:
543
+ type: string
544
+ description: |-
545
+ Human-readable description of the auth failure. Known values:
546
+ - `"Unauthorized"` — no `Authorization` header on the request.
547
+ - `"Bearer Authentication Failed"` — header present but token
548
+ is invalid, revoked, or expired.
549
+ required:
550
+ - message
551
+ - $ref: '#/components/schemas/Error'
547
552
  examples:
548
553
  missing_token:
549
554
  summary: No Authorization header sent
@@ -553,5 +558,11 @@ components:
553
558
  summary: Bearer token invalid or revoked
554
559
  value:
555
560
  message: Bearer Authentication Failed
561
+ scoped_token:
562
+ summary: An API token with a custom scope reading a resource
563
+ value:
564
+ errors:
565
+ - code: access_restricted
566
+ message: You don't have the required permissions to perform the action.
556
567
  x-enable-proxy: true
557
568
  x-internal: false
@@ -1584,6 +1584,46 @@ components:
1584
1584
  processor's label, purpose, and input/output media types.
1585
1585
  additionalProperties:
1586
1586
  $ref: '#/components/schemas/ProcessorDescriptor'
1587
+ Error:
1588
+ type: object
1589
+ description: Standard error response envelope returned by integrator.io APIs.
1590
+ properties:
1591
+ errors:
1592
+ type: array
1593
+ description: List of errors that occurred while processing the request.
1594
+ items:
1595
+ type: object
1596
+ properties:
1597
+ code:
1598
+ oneOf:
1599
+ - type: string
1600
+ - type: integer
1601
+ description: |-
1602
+ Machine-readable error code. Usually a string like
1603
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1604
+ may be an **integer** when the error mirrors an upstream HTTP
1605
+ status (e.g. `500`) — most commonly returned by connection-ping
1606
+ and adaptor-proxy responses.
1607
+ message:
1608
+ type: string
1609
+ description: Human-readable description of the error.
1610
+ field:
1611
+ type: string
1612
+ description: |-
1613
+ Optional pointer to the document field that caused the error.
1614
+ Used by structural validation errors (`missing_required_field`,
1615
+ `invalid_ref`) to indicate which field is at fault
1616
+ (e.g. `_id`, `type`, `http.baseURI`).
1617
+ source:
1618
+ type: string
1619
+ description: |-
1620
+ Optional origin layer for the error — e.g. `application` when
1621
+ the error came from the remote system the adaptor called,
1622
+ `connector` when the adaptor itself rejected the request.
1623
+ required:
1624
+ - message
1625
+ required:
1626
+ - errors
1587
1627
  ParserResponse:
1588
1628
  type: object
1589
1629
  description: |-
@@ -1687,72 +1727,37 @@ components:
1687
1727
  traceKeysDuplicate:
1688
1728
  type: boolean
1689
1729
  description: When true, duplicate trace keys were detected in the output records.
1690
- Error:
1691
- type: object
1692
- description: Standard error response envelope returned by integrator.io APIs.
1693
- properties:
1694
- errors:
1695
- type: array
1696
- description: List of errors that occurred while processing the request.
1697
- items:
1698
- type: object
1699
- properties:
1700
- code:
1701
- oneOf:
1702
- - type: string
1703
- - type: integer
1704
- description: |-
1705
- Machine-readable error code. Usually a string like
1706
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
1707
- may be an **integer** when the error mirrors an upstream HTTP
1708
- status (e.g. `500`) — most commonly returned by connection-ping
1709
- and adaptor-proxy responses.
1710
- message:
1711
- type: string
1712
- description: Human-readable description of the error.
1713
- field:
1714
- type: string
1715
- description: |-
1716
- Optional pointer to the document field that caused the error.
1717
- Used by structural validation errors (`missing_required_field`,
1718
- `invalid_ref`) to indicate which field is at fault
1719
- (e.g. `_id`, `type`, `http.baseURI`).
1720
- source:
1721
- type: string
1722
- description: |-
1723
- Optional origin layer for the error — e.g. `application` when
1724
- the error came from the remote system the adaptor called,
1725
- `connector` when the adaptor itself rejected the request.
1726
- required:
1727
- - message
1728
- required:
1729
- - errors
1730
1730
  responses:
1731
1731
  401-unauthorized:
1732
1732
  description: |-
1733
- Unauthorized. The request lacks a valid bearer token, or the provided token
1734
- failed to authenticate.
1733
+ Unauthorized, in one of two shapes.
1734
+
1735
+ No valid bearer token: the auth middleware answers before the endpoint
1736
+ handler runs, with a bare `{message: string}` body — no `code`, no
1737
+ `errors` array — so key off the HTTP status and `message`.
1735
1738
 
1736
- Note: the 401 response is produced by the auth middleware **before** the
1737
- request reaches the endpoint handler, so it does **not** follow the
1738
- standard `{errors: [...]}` envelope. Instead the body is a bare
1739
- `{message: string}` object with no `code`, no `errors` array. Callers
1740
- handling 401s should key off the HTTP status and the `message` string,
1741
- not try to destructure an `errors[]`.
1739
+ An API token with a custom scope calling an operation its scope does not
1740
+ grant: the token authenticated, and the body is the standard
1741
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1742
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1743
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1742
1744
  content:
1743
1745
  application/json:
1744
1746
  schema:
1745
- type: object
1746
- properties:
1747
- message:
1748
- type: string
1749
- description: |-
1750
- Human-readable description of the auth failure. Known values:
1751
- - `"Unauthorized"` — no `Authorization` header on the request.
1752
- - `"Bearer Authentication Failed"` — header present but token
1753
- is invalid, revoked, or expired.
1754
- required:
1755
- - message
1747
+ oneOf:
1748
+ - type: object
1749
+ description: The auth middleware's bare body for a missing or invalid token.
1750
+ properties:
1751
+ message:
1752
+ type: string
1753
+ description: |-
1754
+ Human-readable description of the auth failure. Known values:
1755
+ - `"Unauthorized"` — no `Authorization` header on the request.
1756
+ - `"Bearer Authentication Failed"` — header present but token
1757
+ is invalid, revoked, or expired.
1758
+ required:
1759
+ - message
1760
+ - $ref: '#/components/schemas/Error'
1756
1761
  examples:
1757
1762
  missing_token:
1758
1763
  summary: No Authorization header sent
@@ -1762,5 +1767,11 @@ components:
1762
1767
  summary: Bearer token invalid or revoked
1763
1768
  value:
1764
1769
  message: Bearer Authentication Failed
1770
+ scoped_token:
1771
+ summary: An API token with a custom scope reading a resource
1772
+ value:
1773
+ errors:
1774
+ - code: access_restricted
1775
+ message: You don't have the required permissions to perform the action.
1765
1776
  x-enable-proxy: true
1766
1777
  x-internal: false
package/dist/profile.yml CHANGED
@@ -368,19 +368,6 @@ components:
368
368
  type: object
369
369
  readOnly: true
370
370
  description: Per-account UI state keyed by account ID.
371
- Request:
372
- type: object
373
- description: |-
374
- The complete preferences object sent to `PUT /v1/preferences`. The
375
- body replaces the stored preferences, so include every field you want
376
- to keep. `featureFlags` in the body are ignored.
377
- x-celigo-ai-guidance:
378
- - |-
379
- AI guidance:
380
- - Send the full object from `GET /v1/preferences` with your changes applied, not a partial object.
381
- - Use this endpoint (not `/api/profile`) to change `dateFormat` and `timeFormat`.
382
- allOf:
383
- - $ref: '#/components/schemas/PreferencesBase'
384
371
  Error:
385
372
  type: object
386
373
  description: Standard error response envelope returned by integrator.io APIs.
@@ -421,32 +408,50 @@ components:
421
408
  - message
422
409
  required:
423
410
  - errors
411
+ Request:
412
+ type: object
413
+ description: |-
414
+ The complete preferences object sent to `PUT /v1/preferences`. The
415
+ body replaces the stored preferences, so include every field you want
416
+ to keep. `featureFlags` in the body are ignored.
417
+ x-celigo-ai-guidance:
418
+ - |-
419
+ AI guidance:
420
+ - Send the full object from `GET /v1/preferences` with your changes applied, not a partial object.
421
+ - Use this endpoint (not `/api/profile`) to change `dateFormat` and `timeFormat`.
422
+ allOf:
423
+ - $ref: '#/components/schemas/PreferencesBase'
424
424
  responses:
425
425
  401-unauthorized:
426
426
  description: |-
427
- Unauthorized. The request lacks a valid bearer token, or the provided token
428
- failed to authenticate.
427
+ Unauthorized, in one of two shapes.
428
+
429
+ No valid bearer token: the auth middleware answers before the endpoint
430
+ handler runs, with a bare `{message: string}` body — no `code`, no
431
+ `errors` array — so key off the HTTP status and `message`.
429
432
 
430
- Note: the 401 response is produced by the auth middleware **before** the
431
- request reaches the endpoint handler, so it does **not** follow the
432
- standard `{errors: [...]}` envelope. Instead the body is a bare
433
- `{message: string}` object with no `code`, no `errors` array. Callers
434
- handling 401s should key off the HTTP status and the `message` string,
435
- not try to destructure an `errors[]`.
433
+ An API token with a custom scope calling an operation its scope does not
434
+ grant: the token authenticated, and the body is the standard
435
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
436
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
437
+ passed both, a personal access token `GET /v1/exports/{_id}`.
436
438
  content:
437
439
  application/json:
438
440
  schema:
439
- type: object
440
- properties:
441
- message:
442
- type: string
443
- description: |-
444
- Human-readable description of the auth failure. Known values:
445
- - `"Unauthorized"` — no `Authorization` header on the request.
446
- - `"Bearer Authentication Failed"` — header present but token
447
- is invalid, revoked, or expired.
448
- required:
449
- - message
441
+ oneOf:
442
+ - type: object
443
+ description: The auth middleware's bare body for a missing or invalid token.
444
+ properties:
445
+ message:
446
+ type: string
447
+ description: |-
448
+ Human-readable description of the auth failure. Known values:
449
+ - `"Unauthorized"` — no `Authorization` header on the request.
450
+ - `"Bearer Authentication Failed"` — header present but token
451
+ is invalid, revoked, or expired.
452
+ required:
453
+ - message
454
+ - $ref: '#/components/schemas/Error'
450
455
  examples:
451
456
  missing_token:
452
457
  summary: No Authorization header sent
@@ -456,6 +461,12 @@ components:
456
461
  summary: Bearer token invalid or revoked
457
462
  value:
458
463
  message: Bearer Authentication Failed
464
+ scoped_token:
465
+ summary: An API token with a custom scope reading a resource
466
+ value:
467
+ errors:
468
+ - code: access_restricted
469
+ message: You don't have the required permissions to perform the action.
459
470
  400-bad-request:
460
471
  description: |
461
472
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.