@celigo/api-specs 0.2.290 → 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 +31 -20
  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 +70 -59
  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 +71 -60
  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 +42 -31
  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
package/dist/state.yml CHANGED
@@ -881,29 +881,34 @@ components:
881
881
  responses:
882
882
  401-unauthorized:
883
883
  description: |-
884
- Unauthorized. The request lacks a valid bearer token, or the provided token
885
- failed to authenticate.
884
+ Unauthorized, in one of two shapes.
886
885
 
887
- Note: the 401 response is produced by the auth middleware **before** the
888
- request reaches the endpoint handler, so it does **not** follow the
889
- standard `{errors: [...]}` envelope. Instead the body is a bare
890
- `{message: string}` object with no `code`, no `errors` array. Callers
891
- handling 401s should key off the HTTP status and the `message` string,
892
- not try to destructure an `errors[]`.
886
+ No valid bearer token: the auth middleware answers before the endpoint
887
+ handler runs, with a bare `{message: string}` body — no `code`, no
888
+ `errors` array — so key off the HTTP status and `message`.
889
+
890
+ An API token with a custom scope calling an operation its scope does not
891
+ grant: the token authenticated, and the body is the standard
892
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
893
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
894
+ passed both, a personal access token `GET /v1/exports/{_id}`.
893
895
  content:
894
896
  application/json:
895
897
  schema:
896
- type: object
897
- properties:
898
- message:
899
- type: string
900
- description: |-
901
- Human-readable description of the auth failure. Known values:
902
- - `"Unauthorized"` — no `Authorization` header on the request.
903
- - `"Bearer Authentication Failed"` — header present but token
904
- is invalid, revoked, or expired.
905
- required:
906
- - message
898
+ oneOf:
899
+ - type: object
900
+ description: The auth middleware's bare body for a missing or invalid token.
901
+ properties:
902
+ message:
903
+ type: string
904
+ description: |-
905
+ Human-readable description of the auth failure. Known values:
906
+ - `"Unauthorized"` — no `Authorization` header on the request.
907
+ - `"Bearer Authentication Failed"` — header present but token
908
+ is invalid, revoked, or expired.
909
+ required:
910
+ - message
911
+ - $ref: '#/components/schemas/Error'
907
912
  examples:
908
913
  missing_token:
909
914
  summary: No Authorization header sent
@@ -913,5 +918,11 @@ components:
913
918
  summary: Bearer token invalid or revoked
914
919
  value:
915
920
  message: Bearer Authentication Failed
921
+ scoped_token:
922
+ summary: An API token with a custom scope reading a resource
923
+ value:
924
+ errors:
925
+ - code: access_restricted
926
+ message: You don't have the required permissions to perform the action.
916
927
  x-enable-proxy: true
917
928
  x-internal: false
@@ -1050,29 +1050,34 @@ components:
1050
1050
  responses:
1051
1051
  401-unauthorized:
1052
1052
  description: |-
1053
- Unauthorized. The request lacks a valid bearer token, or the provided token
1054
- failed to authenticate.
1053
+ Unauthorized, in one of two shapes.
1055
1054
 
1056
- Note: the 401 response is produced by the auth middleware **before** the
1057
- request reaches the endpoint handler, so it does **not** follow the
1058
- standard `{errors: [...]}` envelope. Instead the body is a bare
1059
- `{message: string}` object with no `code`, no `errors` array. Callers
1060
- handling 401s should key off the HTTP status and the `message` string,
1061
- not try to destructure an `errors[]`.
1055
+ No valid bearer token: the auth middleware answers before the endpoint
1056
+ handler runs, with a bare `{message: string}` body — no `code`, no
1057
+ `errors` array — so key off the HTTP status and `message`.
1058
+
1059
+ An API token with a custom scope calling an operation its scope does not
1060
+ grant: the token authenticated, and the body is the standard
1061
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1062
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1063
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1062
1064
  content:
1063
1065
  application/json:
1064
1066
  schema:
1065
- type: object
1066
- properties:
1067
- message:
1068
- type: string
1069
- description: |-
1070
- Human-readable description of the auth failure. Known values:
1071
- - `"Unauthorized"` — no `Authorization` header on the request.
1072
- - `"Bearer Authentication Failed"` — header present but token
1073
- is invalid, revoked, or expired.
1074
- required:
1075
- - message
1067
+ oneOf:
1068
+ - type: object
1069
+ description: The auth middleware's bare body for a missing or invalid token.
1070
+ properties:
1071
+ message:
1072
+ type: string
1073
+ description: |-
1074
+ Human-readable description of the auth failure. Known values:
1075
+ - `"Unauthorized"` — no `Authorization` header on the request.
1076
+ - `"Bearer Authentication Failed"` — header present but token
1077
+ is invalid, revoked, or expired.
1078
+ required:
1079
+ - message
1080
+ - $ref: '#/components/schemas/Error'
1076
1081
  examples:
1077
1082
  missing_token:
1078
1083
  summary: No Authorization header sent
@@ -1082,5 +1087,11 @@ components:
1082
1087
  summary: Bearer token invalid or revoked
1083
1088
  value:
1084
1089
  message: Bearer Authentication Failed
1090
+ scoped_token:
1091
+ summary: An API token with a custom scope reading a resource
1092
+ value:
1093
+ errors:
1094
+ - code: access_restricted
1095
+ message: You don't have the required permissions to perform the action.
1085
1096
  x-internal: false
1086
1097
  x-enable-proxy: true
@@ -1217,6 +1217,46 @@ components:
1217
1217
  then:
1218
1218
  required:
1219
1219
  - _connectorId
1220
+ Error:
1221
+ type: object
1222
+ description: Standard error response envelope returned by integrator.io APIs.
1223
+ properties:
1224
+ errors:
1225
+ type: array
1226
+ description: List of errors that occurred while processing the request.
1227
+ items:
1228
+ type: object
1229
+ properties:
1230
+ code:
1231
+ oneOf:
1232
+ - type: string
1233
+ - type: integer
1234
+ description: |-
1235
+ Machine-readable error code. Usually a string like
1236
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1237
+ may be an **integer** when the error mirrors an upstream HTTP
1238
+ status (e.g. `500`) — most commonly returned by connection-ping
1239
+ and adaptor-proxy responses.
1240
+ message:
1241
+ type: string
1242
+ description: Human-readable description of the error.
1243
+ field:
1244
+ type: string
1245
+ description: |-
1246
+ Optional pointer to the document field that caused the error.
1247
+ Used by structural validation errors (`missing_required_field`,
1248
+ `invalid_ref`) to indicate which field is at fault
1249
+ (e.g. `_id`, `type`, `http.baseURI`).
1250
+ source:
1251
+ type: string
1252
+ description: |-
1253
+ Optional origin layer for the error — e.g. `application` when
1254
+ the error came from the remote system the adaptor called,
1255
+ `connector` when the adaptor itself rejected the request.
1256
+ required:
1257
+ - message
1258
+ required:
1259
+ - errors
1220
1260
  FlowUsage:
1221
1261
  type: object
1222
1262
  description: Flow entitlement usage.
@@ -1771,29 +1811,34 @@ components:
1771
1811
  responses:
1772
1812
  401-unauthorized:
1773
1813
  description: |-
1774
- Unauthorized. The request lacks a valid bearer token, or the provided token
1775
- failed to authenticate.
1814
+ Unauthorized, in one of two shapes.
1815
+
1816
+ No valid bearer token: the auth middleware answers before the endpoint
1817
+ handler runs, with a bare `{message: string}` body — no `code`, no
1818
+ `errors` array — so key off the HTTP status and `message`.
1776
1819
 
1777
- Note: the 401 response is produced by the auth middleware **before** the
1778
- request reaches the endpoint handler, so it does **not** follow the
1779
- standard `{errors: [...]}` envelope. Instead the body is a bare
1780
- `{message: string}` object with no `code`, no `errors` array. Callers
1781
- handling 401s should key off the HTTP status and the `message` string,
1782
- not try to destructure an `errors[]`.
1820
+ An API token with a custom scope calling an operation its scope does not
1821
+ grant: the token authenticated, and the body is the standard
1822
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1823
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1824
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1783
1825
  content:
1784
1826
  application/json:
1785
1827
  schema:
1786
- type: object
1787
- properties:
1788
- message:
1789
- type: string
1790
- description: |-
1791
- Human-readable description of the auth failure. Known values:
1792
- - `"Unauthorized"` — no `Authorization` header on the request.
1793
- - `"Bearer Authentication Failed"` — header present but token
1794
- is invalid, revoked, or expired.
1795
- required:
1796
- - message
1828
+ oneOf:
1829
+ - type: object
1830
+ description: The auth middleware's bare body for a missing or invalid token.
1831
+ properties:
1832
+ message:
1833
+ type: string
1834
+ description: |-
1835
+ Human-readable description of the auth failure. Known values:
1836
+ - `"Unauthorized"` — no `Authorization` header on the request.
1837
+ - `"Bearer Authentication Failed"` — header present but token
1838
+ is invalid, revoked, or expired.
1839
+ required:
1840
+ - message
1841
+ - $ref: '#/components/schemas/Error'
1797
1842
  examples:
1798
1843
  missing_token:
1799
1844
  summary: No Authorization header sent
@@ -1803,5 +1848,11 @@ components:
1803
1848
  summary: Bearer token invalid or revoked
1804
1849
  value:
1805
1850
  message: Bearer Authentication Failed
1851
+ scoped_token:
1852
+ summary: An API token with a custom scope reading a resource
1853
+ value:
1854
+ errors:
1855
+ - code: access_restricted
1856
+ message: You don't have the required permissions to perform the action.
1806
1857
  x-enable-proxy: true
1807
1858
  x-internal: false
package/dist/sync.yml CHANGED
@@ -5598,29 +5598,34 @@ components:
5598
5598
  message: The requested resource was not found.
5599
5599
  401-unauthorized:
5600
5600
  description: |-
5601
- Unauthorized. The request lacks a valid bearer token, or the provided token
5602
- failed to authenticate.
5601
+ Unauthorized, in one of two shapes.
5603
5602
 
5604
- Note: the 401 response is produced by the auth middleware **before** the
5605
- request reaches the endpoint handler, so it does **not** follow the
5606
- standard `{errors: [...]}` envelope. Instead the body is a bare
5607
- `{message: string}` object with no `code`, no `errors` array. Callers
5608
- handling 401s should key off the HTTP status and the `message` string,
5609
- not try to destructure an `errors[]`.
5603
+ No valid bearer token: the auth middleware answers before the endpoint
5604
+ handler runs, with a bare `{message: string}` body — no `code`, no
5605
+ `errors` array — so key off the HTTP status and `message`.
5606
+
5607
+ An API token with a custom scope calling an operation its scope does not
5608
+ grant: the token authenticated, and the body is the standard
5609
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
5610
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
5611
+ passed both, a personal access token `GET /v1/exports/{_id}`.
5610
5612
  content:
5611
5613
  application/json:
5612
5614
  schema:
5613
- type: object
5614
- properties:
5615
- message:
5616
- type: string
5617
- description: |-
5618
- Human-readable description of the auth failure. Known values:
5619
- - `"Unauthorized"` — no `Authorization` header on the request.
5620
- - `"Bearer Authentication Failed"` — header present but token
5621
- is invalid, revoked, or expired.
5622
- required:
5623
- - message
5615
+ oneOf:
5616
+ - type: object
5617
+ description: The auth middleware's bare body for a missing or invalid token.
5618
+ properties:
5619
+ message:
5620
+ type: string
5621
+ description: |-
5622
+ Human-readable description of the auth failure. Known values:
5623
+ - `"Unauthorized"` — no `Authorization` header on the request.
5624
+ - `"Bearer Authentication Failed"` — header present but token
5625
+ is invalid, revoked, or expired.
5626
+ required:
5627
+ - message
5628
+ - $ref: '#/components/schemas/Error'
5624
5629
  examples:
5625
5630
  missing_token:
5626
5631
  summary: No Authorization header sent
@@ -5630,6 +5635,12 @@ components:
5630
5635
  summary: Bearer token invalid or revoked
5631
5636
  value:
5632
5637
  message: Bearer Authentication Failed
5638
+ scoped_token:
5639
+ summary: An API token with a custom scope reading a resource
5640
+ value:
5641
+ errors:
5642
+ - code: access_restricted
5643
+ message: You don't have the required permissions to perform the action.
5633
5644
  400-bad-request:
5634
5645
  description: |
5635
5646
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/tag.yml CHANGED
@@ -392,22 +392,6 @@ components:
392
392
  in `PUT /v1/flows/{_id}/{_stepId}/tags` `tagIds[]`.
393
393
  Server-generated and immutable: `tagId` values supplied on
394
394
  create/update are ignored and a fresh code is generated.
395
- Request:
396
- type: object
397
- description: Fields for creating or updating a tag.
398
- required:
399
- - tag
400
- properties:
401
- tag:
402
- type: string
403
- minLength: 1
404
- maxLength: 100
405
- examples:
406
- - Urgent
407
- description: |-
408
- The human-readable tag name. Case-insensitively unique within the
409
- account. Whitespace is trimmed on save; names that are empty after
410
- trimming are rejected.
411
395
  Error:
412
396
  type: object
413
397
  description: Standard error response envelope returned by integrator.io APIs.
@@ -448,6 +432,22 @@ components:
448
432
  - message
449
433
  required:
450
434
  - errors
435
+ Request:
436
+ type: object
437
+ description: Fields for creating or updating a tag.
438
+ required:
439
+ - tag
440
+ properties:
441
+ tag:
442
+ type: string
443
+ minLength: 1
444
+ maxLength: 100
445
+ examples:
446
+ - Urgent
447
+ description: |-
448
+ The human-readable tag name. Case-insensitively unique within the
449
+ account. Whitespace is trimmed on save; names that are empty after
450
+ trimming are rejected.
451
451
  JsonPatchOperation:
452
452
  type: object
453
453
  description: A single JSON Patch operation (RFC 6902).
@@ -486,29 +486,34 @@ components:
486
486
  responses:
487
487
  401-unauthorized:
488
488
  description: |-
489
- Unauthorized. The request lacks a valid bearer token, or the provided token
490
- failed to authenticate.
489
+ Unauthorized, in one of two shapes.
491
490
 
492
- Note: the 401 response is produced by the auth middleware **before** the
493
- request reaches the endpoint handler, so it does **not** follow the
494
- standard `{errors: [...]}` envelope. Instead the body is a bare
495
- `{message: string}` object with no `code`, no `errors` array. Callers
496
- handling 401s should key off the HTTP status and the `message` string,
497
- not try to destructure an `errors[]`.
491
+ No valid bearer token: the auth middleware answers before the endpoint
492
+ handler runs, with a bare `{message: string}` body — no `code`, no
493
+ `errors` array — so key off the HTTP status and `message`.
494
+
495
+ An API token with a custom scope calling an operation its scope does not
496
+ grant: the token authenticated, and the body is the standard
497
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
498
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
499
+ passed both, a personal access token `GET /v1/exports/{_id}`.
498
500
  content:
499
501
  application/json:
500
502
  schema:
501
- type: object
502
- properties:
503
- message:
504
- type: string
505
- description: |-
506
- Human-readable description of the auth failure. Known values:
507
- - `"Unauthorized"` — no `Authorization` header on the request.
508
- - `"Bearer Authentication Failed"` — header present but token
509
- is invalid, revoked, or expired.
510
- required:
511
- - message
503
+ oneOf:
504
+ - type: object
505
+ description: The auth middleware's bare body for a missing or invalid token.
506
+ properties:
507
+ message:
508
+ type: string
509
+ description: |-
510
+ Human-readable description of the auth failure. Known values:
511
+ - `"Unauthorized"` — no `Authorization` header on the request.
512
+ - `"Bearer Authentication Failed"` — header present but token
513
+ is invalid, revoked, or expired.
514
+ required:
515
+ - message
516
+ - $ref: '#/components/schemas/Error'
512
517
  examples:
513
518
  missing_token:
514
519
  summary: No Authorization header sent
@@ -518,6 +523,12 @@ components:
518
523
  summary: Bearer token invalid or revoked
519
524
  value:
520
525
  message: Bearer Authentication Failed
526
+ scoped_token:
527
+ summary: An API token with a custom scope reading a resource
528
+ value:
529
+ errors:
530
+ - code: access_restricted
531
+ message: You don't have the required permissions to perform the action.
521
532
  400-bad-request:
522
533
  description: |
523
534
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/template.yml CHANGED
@@ -1052,29 +1052,34 @@ components:
1052
1052
  responses:
1053
1053
  401-unauthorized:
1054
1054
  description: |-
1055
- Unauthorized. The request lacks a valid bearer token, or the provided token
1056
- failed to authenticate.
1055
+ Unauthorized, in one of two shapes.
1057
1056
 
1058
- Note: the 401 response is produced by the auth middleware **before** the
1059
- request reaches the endpoint handler, so it does **not** follow the
1060
- standard `{errors: [...]}` envelope. Instead the body is a bare
1061
- `{message: string}` object with no `code`, no `errors` array. Callers
1062
- handling 401s should key off the HTTP status and the `message` string,
1063
- not try to destructure an `errors[]`.
1057
+ No valid bearer token: the auth middleware answers before the endpoint
1058
+ handler runs, with a bare `{message: string}` body — no `code`, no
1059
+ `errors` array — so key off the HTTP status and `message`.
1060
+
1061
+ An API token with a custom scope calling an operation its scope does not
1062
+ grant: the token authenticated, and the body is the standard
1063
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1064
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1065
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1064
1066
  content:
1065
1067
  application/json:
1066
1068
  schema:
1067
- type: object
1068
- properties:
1069
- message:
1070
- type: string
1071
- description: |-
1072
- Human-readable description of the auth failure. Known values:
1073
- - `"Unauthorized"` — no `Authorization` header on the request.
1074
- - `"Bearer Authentication Failed"` — header present but token
1075
- is invalid, revoked, or expired.
1076
- required:
1077
- - message
1069
+ oneOf:
1070
+ - type: object
1071
+ description: The auth middleware's bare body for a missing or invalid token.
1072
+ properties:
1073
+ message:
1074
+ type: string
1075
+ description: |-
1076
+ Human-readable description of the auth failure. Known values:
1077
+ - `"Unauthorized"` — no `Authorization` header on the request.
1078
+ - `"Bearer Authentication Failed"` — header present but token
1079
+ is invalid, revoked, or expired.
1080
+ required:
1081
+ - message
1082
+ - $ref: '#/components/schemas/Error'
1078
1083
  examples:
1079
1084
  missing_token:
1080
1085
  summary: No Authorization header sent
@@ -1084,6 +1089,12 @@ components:
1084
1089
  summary: Bearer token invalid or revoked
1085
1090
  value:
1086
1091
  message: Bearer Authentication Failed
1092
+ scoped_token:
1093
+ summary: An API token with a custom scope reading a resource
1094
+ value:
1095
+ errors:
1096
+ - code: access_restricted
1097
+ message: You don't have the required permissions to perform the action.
1087
1098
  403-partner-only:
1088
1099
  description: |-
1089
1100
  The account isn't a Celigo Partner account. Every caller on such an account is refused with
package/dist/tool.yml CHANGED
@@ -7484,17 +7484,6 @@ components:
7484
7484
  - |-
7485
7485
  Contains the complete tool configuration including metadata, input/output
7486
7486
  settings, routing logic, and AI-generated descriptions.
7487
- Request:
7488
- type: object
7489
- description: |-
7490
- Request schema for creating or updating a tool. Tools are reusable processing
7491
- units that encapsulate input transformation, conditional routing, and output
7492
- mapping logic within an integration.
7493
- required:
7494
- - name
7495
- - _integrationId
7496
- allOf:
7497
- - $ref: '#/components/schemas/ToolBase'
7498
7487
  Error:
7499
7488
  type: object
7500
7489
  description: Standard error response envelope returned by integrator.io APIs.
@@ -7535,6 +7524,17 @@ components:
7535
7524
  - message
7536
7525
  required:
7537
7526
  - errors
7527
+ Request:
7528
+ type: object
7529
+ description: |-
7530
+ Request schema for creating or updating a tool. Tools are reusable processing
7531
+ units that encapsulate input transformation, conditional routing, and output
7532
+ mapping logic within an integration.
7533
+ required:
7534
+ - name
7535
+ - _integrationId
7536
+ allOf:
7537
+ - $ref: '#/components/schemas/ToolBase'
7538
7538
  JsonPatchOperation:
7539
7539
  type: object
7540
7540
  description: A single JSON Patch operation (RFC 6902).
@@ -41677,29 +41677,34 @@ components:
41677
41677
  responses:
41678
41678
  401-unauthorized:
41679
41679
  description: |-
41680
- Unauthorized. The request lacks a valid bearer token, or the provided token
41681
- failed to authenticate.
41682
-
41683
- Note: the 401 response is produced by the auth middleware **before** the
41684
- request reaches the endpoint handler, so it does **not** follow the
41685
- standard `{errors: [...]}` envelope. Instead the body is a bare
41686
- `{message: string}` object with no `code`, no `errors` array. Callers
41687
- handling 401s should key off the HTTP status and the `message` string,
41688
- not try to destructure an `errors[]`.
41680
+ Unauthorized, in one of two shapes.
41681
+
41682
+ No valid bearer token: the auth middleware answers before the endpoint
41683
+ handler runs, with a bare `{message: string}` body — no `code`, no
41684
+ `errors` array — so key off the HTTP status and `message`.
41685
+
41686
+ An API token with a custom scope calling an operation its scope does not
41687
+ grant: the token authenticated, and the body is the standard
41688
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
41689
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
41690
+ passed both, a personal access token `GET /v1/exports/{_id}`.
41689
41691
  content:
41690
41692
  application/json:
41691
41693
  schema:
41692
- type: object
41693
- properties:
41694
- message:
41695
- type: string
41696
- description: |-
41697
- Human-readable description of the auth failure. Known values:
41698
- - `"Unauthorized"` — no `Authorization` header on the request.
41699
- - `"Bearer Authentication Failed"` — header present but token
41700
- is invalid, revoked, or expired.
41701
- required:
41702
- - message
41694
+ oneOf:
41695
+ - type: object
41696
+ description: The auth middleware's bare body for a missing or invalid token.
41697
+ properties:
41698
+ message:
41699
+ type: string
41700
+ description: |-
41701
+ Human-readable description of the auth failure. Known values:
41702
+ - `"Unauthorized"` — no `Authorization` header on the request.
41703
+ - `"Bearer Authentication Failed"` — header present but token
41704
+ is invalid, revoked, or expired.
41705
+ required:
41706
+ - message
41707
+ - $ref: '#/components/schemas/Error'
41703
41708
  examples:
41704
41709
  missing_token:
41705
41710
  summary: No Authorization header sent
@@ -41709,6 +41714,12 @@ components:
41709
41714
  summary: Bearer token invalid or revoked
41710
41715
  value:
41711
41716
  message: Bearer Authentication Failed
41717
+ scoped_token:
41718
+ summary: An API token with a custom scope reading a resource
41719
+ value:
41720
+ errors:
41721
+ - code: access_restricted
41722
+ message: You don't have the required permissions to perform the action.
41712
41723
  400-bad-request:
41713
41724
  description: |
41714
41725
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.