@celigo/api-specs 0.2.1
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.
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/dist/account.yml +592 -0
- package/dist/agent.yml +908 -0
- package/dist/ai-agent.yml +5471 -0
- package/dist/api.yml +4140 -0
- package/dist/apim.yml +1286 -0
- package/dist/asynchelper.yml +3391 -0
- package/dist/audit.yml +2006 -0
- package/dist/connection.yml +8665 -0
- package/dist/connector.yml +1406 -0
- package/dist/ediprofile.yml +911 -0
- package/dist/editransaction.yml +1210 -0
- package/dist/enduser.yml +1724 -0
- package/dist/environment.yml +568 -0
- package/dist/eventreport.yml +692 -0
- package/dist/export.yml +17610 -0
- package/dist/filedefinition.yml +1396 -0
- package/dist/filestorage.yml +3102 -0
- package/dist/flow.yml +7928 -0
- package/dist/guardrail.yml +2763 -0
- package/dist/httpconnector.yml +2277 -0
- package/dist/httpconnectorendpoint.yml +722 -0
- package/dist/httpconnectorresource.yml +396 -0
- package/dist/iclient.yml +4452 -0
- package/dist/import.yml +15381 -0
- package/dist/integration.yml +4406 -0
- package/dist/job.yml +2014 -0
- package/dist/lookupcache.yml +1325 -0
- package/dist/marketplace.yml +685 -0
- package/dist/mcp-oauth-provider.yml +590 -0
- package/dist/mcp-server.yml +2656 -0
- package/dist/notification.yml +488 -0
- package/dist/processor.yml +1253 -0
- package/dist/profile.yml +455 -0
- package/dist/recyclebin.yml +768 -0
- package/dist/script.yml +1128 -0
- package/dist/stack.yml +1291 -0
- package/dist/state.yml +894 -0
- package/dist/subscription.yml +1405 -0
- package/dist/sync.yml +4857 -0
- package/dist/tag.yml +553 -0
- package/dist/template.yml +897 -0
- package/dist/tool.yml +33656 -0
- package/dist/tradingpartnerconnector.yml +1490 -0
- package/dist/user.yml +831 -0
- package/package.json +41 -0
- package/schemas.json +8420 -0
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
openapi: 3.2.0
|
|
2
|
+
info:
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: Notifications
|
|
5
|
+
description: API for managing Celigo notification subscriptions — per-user alert routing for flow, connection, integration, and sync events.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://api.integrator.io
|
|
8
|
+
description: Production (US / default region)
|
|
9
|
+
- url: https://api.eu.integrator.io
|
|
10
|
+
description: Production (EU region)
|
|
11
|
+
- url: https://api.au.integrator.io
|
|
12
|
+
description: Production (AU region)
|
|
13
|
+
- url: https://api.ca.integrator.io
|
|
14
|
+
description: Production (CA region)
|
|
15
|
+
security:
|
|
16
|
+
- bearerAuth: []
|
|
17
|
+
tags:
|
|
18
|
+
- name: Notifications
|
|
19
|
+
description: |-
|
|
20
|
+
Notification subscriptions control which users receive alerts for
|
|
21
|
+
resource-level events (errors, status changes, completions) on flows,
|
|
22
|
+
connections, integrations, and syncs. Each subscription routes alerts
|
|
23
|
+
to the email of the subscribed user.
|
|
24
|
+
|
|
25
|
+
Subscriptions are account-scoped — an account admin can manage
|
|
26
|
+
subscriptions on behalf of any user, not just their own.
|
|
27
|
+
|
|
28
|
+
## Notification schema
|
|
29
|
+
|
|
30
|
+
{% openapi-schemas spec="notification" schemas="Notification" grouped="true" %}
|
|
31
|
+
paths:
|
|
32
|
+
/v1/notifications:
|
|
33
|
+
get:
|
|
34
|
+
x-internal: false
|
|
35
|
+
operationId: listNotifications
|
|
36
|
+
tags:
|
|
37
|
+
- Notifications
|
|
38
|
+
summary: List notification subscriptions
|
|
39
|
+
description: |-
|
|
40
|
+
Returns notification subscriptions for flows, connections, integrations,
|
|
41
|
+
and syncs in the account. Without the `users=all` query parameter, the response is
|
|
42
|
+
scoped to the caller's own subscriptions. With `users=all`, every user's
|
|
43
|
+
subscriptions in the account are returned.
|
|
44
|
+
|
|
45
|
+
Returns an empty response when the caller has no subscriptions in the
|
|
46
|
+
current scope. With `users=all`, an empty array is returned only in
|
|
47
|
+
accounts with zero subscriptions across all users.
|
|
48
|
+
parameters:
|
|
49
|
+
- name: users
|
|
50
|
+
in: query
|
|
51
|
+
required: false
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
enum:
|
|
55
|
+
- all
|
|
56
|
+
x-enumDescriptions:
|
|
57
|
+
all: Return subscriptions for every user in the account.
|
|
58
|
+
description: |-
|
|
59
|
+
When set to `all`, returns subscriptions for every user in the
|
|
60
|
+
account. When omitted, returns only the caller's own subscriptions.
|
|
61
|
+
responses:
|
|
62
|
+
'200':
|
|
63
|
+
description: Array of notification subscriptions.
|
|
64
|
+
content:
|
|
65
|
+
application/json:
|
|
66
|
+
schema:
|
|
67
|
+
type: array
|
|
68
|
+
items:
|
|
69
|
+
$ref: '#/components/schemas/Notification'
|
|
70
|
+
examples:
|
|
71
|
+
mixed:
|
|
72
|
+
summary: Subscriptions across flow / connection / integration / sync
|
|
73
|
+
value:
|
|
74
|
+
- _id: 612e68884d644e604724250a
|
|
75
|
+
type: connection
|
|
76
|
+
_connectionId: 5e5eb06fdd83ed4f8206a4ea
|
|
77
|
+
lastModified: '2021-08-31T17:36:09.092Z'
|
|
78
|
+
subscribedByUser:
|
|
79
|
+
name: James Roth
|
|
80
|
+
email: james.roth@celigo.com
|
|
81
|
+
- _id: 698abc1234567890abcdef01
|
|
82
|
+
type: flow
|
|
83
|
+
_flowId: 69497fc443fc1f9a03d31bd9
|
|
84
|
+
lastModified: '2026-04-01T12:00:00.000Z'
|
|
85
|
+
subscribedByUser:
|
|
86
|
+
name: Jane Doe
|
|
87
|
+
email: jane@example.com
|
|
88
|
+
- _id: 69e754caae7bf0aeb0f69f3a
|
|
89
|
+
type: sync
|
|
90
|
+
_syncId: 69e7549b0f8b6cd703e5d3b2
|
|
91
|
+
lastModified: '2026-04-21T10:43:22.077Z'
|
|
92
|
+
subscribedByUser:
|
|
93
|
+
name: Bhavik Shah
|
|
94
|
+
email: bhavik.shah@celigo.com
|
|
95
|
+
'204':
|
|
96
|
+
description: |-
|
|
97
|
+
Caller has no subscriptions in the current scope (default scope when
|
|
98
|
+
`users=all` is omitted). Not the same as 200 with `[]`.
|
|
99
|
+
'400':
|
|
100
|
+
$ref: '#/components/responses/400-bad-request'
|
|
101
|
+
'401':
|
|
102
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
103
|
+
put:
|
|
104
|
+
x-internal: false
|
|
105
|
+
operationId: upsertNotifications
|
|
106
|
+
tags:
|
|
107
|
+
- Notifications
|
|
108
|
+
summary: Subscribe / unsubscribe users to resource notifications
|
|
109
|
+
description: |-
|
|
110
|
+
Upserts a batch of notification subscriptions. Each item targets exactly one
|
|
111
|
+
resource (`_flowId`, `_connectionId`, or `_integrationId`) plus a
|
|
112
|
+
`subscribedByUserEmail`. `subscribed: true` creates (or keeps) the
|
|
113
|
+
subscription; `subscribed: false` removes it.
|
|
114
|
+
|
|
115
|
+
Returns a parallel array of per-item results — one entry per request item,
|
|
116
|
+
in the same order. Each result carries `statusCode` (**201** when a subscription
|
|
117
|
+
was created, **200** when updated or removed, 422 when a referenced resource
|
|
118
|
+
doesn't exist) plus an `errors[]` array on failures. An empty request body
|
|
119
|
+
returns an empty array.
|
|
120
|
+
|
|
121
|
+
The body is a bare array (maximum 500 items). Each item must carry
|
|
122
|
+
exactly one of `_flowId` / `_connectionId` / `_integrationId` /
|
|
123
|
+
`_syncId`. The response is a per-item status array; referencing a
|
|
124
|
+
non-existent resource fails that item with `statusCode: 422` but
|
|
125
|
+
does not fail the whole request.
|
|
126
|
+
requestBody:
|
|
127
|
+
required: true
|
|
128
|
+
content:
|
|
129
|
+
application/json:
|
|
130
|
+
schema:
|
|
131
|
+
$ref: '#/components/schemas/NotificationsUpsertRequest'
|
|
132
|
+
examples:
|
|
133
|
+
subscribeFlow:
|
|
134
|
+
summary: Subscribe jane@example.com to a flow
|
|
135
|
+
value:
|
|
136
|
+
- _flowId: 69497fc443fc1f9a03d31bd9
|
|
137
|
+
subscribed: true
|
|
138
|
+
subscribedByUserEmail: jane@example.com
|
|
139
|
+
unsubscribeConnections:
|
|
140
|
+
summary: Unsubscribe jane from two connections
|
|
141
|
+
value:
|
|
142
|
+
- _connectionId: 5e5eb06fdd83ed4f8206a4ea
|
|
143
|
+
subscribed: false
|
|
144
|
+
subscribedByUserEmail: jane@example.com
|
|
145
|
+
- _connectionId: 5efe49fd2c1111472296f389
|
|
146
|
+
subscribed: false
|
|
147
|
+
subscribedByUserEmail: jane@example.com
|
|
148
|
+
responses:
|
|
149
|
+
'200':
|
|
150
|
+
description: |-
|
|
151
|
+
Per-item result array (parallel to the request). Each entry is
|
|
152
|
+
`{statusCode, errors?}` — `statusCode: 200` on success, or a non-200
|
|
153
|
+
status with an `errors[]` array on per-item failures. Overall HTTP is
|
|
154
|
+
still 200 even when individual items fail.
|
|
155
|
+
content:
|
|
156
|
+
application/json:
|
|
157
|
+
schema:
|
|
158
|
+
type: array
|
|
159
|
+
items:
|
|
160
|
+
type: object
|
|
161
|
+
description: Per-item upsert result.
|
|
162
|
+
properties:
|
|
163
|
+
statusCode:
|
|
164
|
+
type: integer
|
|
165
|
+
description: |-
|
|
166
|
+
Per-item outcome: 200 when the subscription was created,
|
|
167
|
+
updated, or left unchanged; 422 when the referenced
|
|
168
|
+
resource doesn't exist (details in `errors[]`).
|
|
169
|
+
errors:
|
|
170
|
+
type: array
|
|
171
|
+
description: Per-item error details — present on non-200 results.
|
|
172
|
+
items:
|
|
173
|
+
type: object
|
|
174
|
+
properties:
|
|
175
|
+
field:
|
|
176
|
+
type: string
|
|
177
|
+
examples:
|
|
178
|
+
- _connectionId
|
|
179
|
+
code:
|
|
180
|
+
type: string
|
|
181
|
+
examples:
|
|
182
|
+
- invalid_ref
|
|
183
|
+
message:
|
|
184
|
+
type: string
|
|
185
|
+
examples:
|
|
186
|
+
- Please ensure that connection with 000000000000000000000001 exists for creating the notification.
|
|
187
|
+
examples:
|
|
188
|
+
allSuccess:
|
|
189
|
+
summary: All items applied cleanly
|
|
190
|
+
value:
|
|
191
|
+
- statusCode: 200
|
|
192
|
+
- statusCode: 200
|
|
193
|
+
mixed:
|
|
194
|
+
summary: One item referenced a non-existent connection
|
|
195
|
+
value:
|
|
196
|
+
- statusCode: 200
|
|
197
|
+
- statusCode: 422
|
|
198
|
+
errors:
|
|
199
|
+
- field: _connectionId
|
|
200
|
+
code: invalid_ref
|
|
201
|
+
message: Please ensure that connection with 000000000000000000000001 exists for creating the notification.
|
|
202
|
+
'400':
|
|
203
|
+
$ref: '#/components/responses/400-bad-request'
|
|
204
|
+
'401':
|
|
205
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
206
|
+
components:
|
|
207
|
+
securitySchemes:
|
|
208
|
+
bearerAuth:
|
|
209
|
+
type: http
|
|
210
|
+
scheme: bearer
|
|
211
|
+
schemas:
|
|
212
|
+
ResourceResponse:
|
|
213
|
+
type: object
|
|
214
|
+
description: Response
|
|
215
|
+
x-celigo-ai-guidance:
|
|
216
|
+
- Core response fields shared by all Celigo resources
|
|
217
|
+
properties:
|
|
218
|
+
_id:
|
|
219
|
+
type: string
|
|
220
|
+
format: objectId
|
|
221
|
+
readOnly: true
|
|
222
|
+
description: Unique identifier for the resource. Format is a 24-character hexadecimal string.
|
|
223
|
+
x-celigo-ai-guidance:
|
|
224
|
+
- |-
|
|
225
|
+
The _id is used in:
|
|
226
|
+
- API endpoints that operate on a specific resource (e.g., GET, PUT, DELETE)
|
|
227
|
+
- References from other resources (e.g., flows that use this resource)
|
|
228
|
+
- Job history and error tracking
|
|
229
|
+
examples:
|
|
230
|
+
- 5f8d43a1b9e5a80011a35f2c
|
|
231
|
+
createdAt:
|
|
232
|
+
type: string
|
|
233
|
+
format: date-time
|
|
234
|
+
readOnly: true
|
|
235
|
+
description: Timestamp when the resource was created. Set automatically and cannot be modified.
|
|
236
|
+
x-celigo-ai-guidance:
|
|
237
|
+
- Recorded in ISO 8601 with a UTC timezone (Z suffix).
|
|
238
|
+
examples:
|
|
239
|
+
- '2023-04-01T09:15:32Z'
|
|
240
|
+
lastModified:
|
|
241
|
+
type: string
|
|
242
|
+
format: date-time
|
|
243
|
+
readOnly: true
|
|
244
|
+
description: Timestamp when the resource was last updated. Changes whenever any property is modified.
|
|
245
|
+
x-celigo-ai-guidance:
|
|
246
|
+
- Recorded in ISO 8601 with a UTC timezone (Z suffix); always equal to or later than `createdAt`.
|
|
247
|
+
examples:
|
|
248
|
+
- '2023-04-15T14:30:15Z'
|
|
249
|
+
deletedAt:
|
|
250
|
+
type:
|
|
251
|
+
- string
|
|
252
|
+
- 'null'
|
|
253
|
+
format: date-time
|
|
254
|
+
readOnly: true
|
|
255
|
+
description: Timestamp when the resource was soft-deleted. When null or absent, the resource is active.
|
|
256
|
+
x-celigo-ai-guidance:
|
|
257
|
+
- Non-null means the resource is soft-deleted (in the recycle bin) — recoverable within the retention period before permanent removal.
|
|
258
|
+
examples:
|
|
259
|
+
- '2023-05-20T11:45:32Z'
|
|
260
|
+
required:
|
|
261
|
+
- _id
|
|
262
|
+
Notification:
|
|
263
|
+
type: object
|
|
264
|
+
required:
|
|
265
|
+
- _id
|
|
266
|
+
- type
|
|
267
|
+
- lastModified
|
|
268
|
+
description: |-
|
|
269
|
+
A notification subscription linking a user email to a single resource
|
|
270
|
+
(flow, connection, integration, or sync). When the resource emits an
|
|
271
|
+
alert (error, state change, etc.), the subscribed user is notified.
|
|
272
|
+
allOf:
|
|
273
|
+
- $ref: '#/components/schemas/ResourceResponse'
|
|
274
|
+
- type: object
|
|
275
|
+
properties:
|
|
276
|
+
type:
|
|
277
|
+
type: string
|
|
278
|
+
enum:
|
|
279
|
+
- flow
|
|
280
|
+
- connection
|
|
281
|
+
- integration
|
|
282
|
+
- sync
|
|
283
|
+
x-enumDescriptions:
|
|
284
|
+
flow: Subscription targets a flow resource.
|
|
285
|
+
connection: Subscription targets a connection resource.
|
|
286
|
+
integration: Subscription targets an integration resource.
|
|
287
|
+
sync: Subscription targets a sync resource.
|
|
288
|
+
description: |-
|
|
289
|
+
Which resource class this subscription targets. Implies which of
|
|
290
|
+
`_flowId` / `_connectionId` / `_integrationId` / `_syncId` is populated.
|
|
291
|
+
_flowId:
|
|
292
|
+
type: string
|
|
293
|
+
format: objectId
|
|
294
|
+
description: 'Flow id when `type: flow`.'
|
|
295
|
+
x-celigo-refModel: flows
|
|
296
|
+
examples:
|
|
297
|
+
- 69497fc443fc1f9a03d31bd9
|
|
298
|
+
_connectionId:
|
|
299
|
+
type: string
|
|
300
|
+
format: objectId
|
|
301
|
+
description: 'Connection id when `type: connection`.'
|
|
302
|
+
x-celigo-refModel: connections
|
|
303
|
+
examples:
|
|
304
|
+
- 5e5eb06fdd83ed4f8206a4ea
|
|
305
|
+
_integrationId:
|
|
306
|
+
type: string
|
|
307
|
+
format: objectId
|
|
308
|
+
description: 'Integration id when `type: integration`.'
|
|
309
|
+
x-celigo-refModel: integrations
|
|
310
|
+
examples:
|
|
311
|
+
- 5d2c5a8f3e9b1c4a7f6d2e80
|
|
312
|
+
_syncId:
|
|
313
|
+
type: string
|
|
314
|
+
format: objectId
|
|
315
|
+
description: 'Sync id when `type: sync`.'
|
|
316
|
+
x-celigo-refModel: syncs
|
|
317
|
+
examples:
|
|
318
|
+
- 69e7549b0f8b6cd703e5d3b2
|
|
319
|
+
subscribedByUser:
|
|
320
|
+
type: object
|
|
321
|
+
description: Minimal user descriptor for whoever owns this subscription.
|
|
322
|
+
properties:
|
|
323
|
+
name:
|
|
324
|
+
type: string
|
|
325
|
+
description: Display name of the subscribed user.
|
|
326
|
+
examples:
|
|
327
|
+
- James Roth
|
|
328
|
+
email:
|
|
329
|
+
type: string
|
|
330
|
+
format: email
|
|
331
|
+
description: Email address the notifications are routed to.
|
|
332
|
+
examples:
|
|
333
|
+
- james.roth@celigo.com
|
|
334
|
+
Error:
|
|
335
|
+
type: object
|
|
336
|
+
description: Standard error response envelope returned by integrator.io APIs.
|
|
337
|
+
properties:
|
|
338
|
+
errors:
|
|
339
|
+
type: array
|
|
340
|
+
description: List of errors that occurred while processing the request.
|
|
341
|
+
items:
|
|
342
|
+
type: object
|
|
343
|
+
properties:
|
|
344
|
+
code:
|
|
345
|
+
oneOf:
|
|
346
|
+
- type: string
|
|
347
|
+
- type: integer
|
|
348
|
+
description: |-
|
|
349
|
+
Machine-readable error code. Usually a string like
|
|
350
|
+
`invalid_ref`, `missing_required_field`, or `unauthorized`;
|
|
351
|
+
may be an **integer** when the error mirrors an upstream HTTP
|
|
352
|
+
status (e.g. `500`) — most commonly returned by connection-ping
|
|
353
|
+
and adaptor-proxy responses.
|
|
354
|
+
message:
|
|
355
|
+
type: string
|
|
356
|
+
description: Human-readable description of the error.
|
|
357
|
+
field:
|
|
358
|
+
type: string
|
|
359
|
+
description: |-
|
|
360
|
+
Optional pointer to the document field that caused the error.
|
|
361
|
+
Used by structural validation errors (`missing_required_field`,
|
|
362
|
+
`invalid_ref`) to indicate which field is at fault
|
|
363
|
+
(e.g. `_id`, `type`, `http.baseURI`).
|
|
364
|
+
source:
|
|
365
|
+
type: string
|
|
366
|
+
description: |-
|
|
367
|
+
Optional origin layer for the error — e.g. `application` when
|
|
368
|
+
the error came from the remote system the adaptor called,
|
|
369
|
+
`connector` when the adaptor itself rejected the request.
|
|
370
|
+
required:
|
|
371
|
+
- message
|
|
372
|
+
required:
|
|
373
|
+
- errors
|
|
374
|
+
NotificationsUpsertRequest:
|
|
375
|
+
type: array
|
|
376
|
+
maxItems: 500
|
|
377
|
+
description: |-
|
|
378
|
+
Bare array (no wrapping envelope) of upsert items. Each item targets a
|
|
379
|
+
single resource and flips subscription state on or off for one user.
|
|
380
|
+
items:
|
|
381
|
+
type: object
|
|
382
|
+
description: |-
|
|
383
|
+
A single subscribe / unsubscribe directive. Set exactly one of
|
|
384
|
+
`_flowId`, `_connectionId`, `_integrationId`, or `_syncId`.
|
|
385
|
+
oneOf:
|
|
386
|
+
- required:
|
|
387
|
+
- _flowId
|
|
388
|
+
- required:
|
|
389
|
+
- _connectionId
|
|
390
|
+
- required:
|
|
391
|
+
- _integrationId
|
|
392
|
+
- required:
|
|
393
|
+
- _syncId
|
|
394
|
+
properties:
|
|
395
|
+
_flowId:
|
|
396
|
+
type: string
|
|
397
|
+
format: objectId
|
|
398
|
+
description: Flow id to subscribe / unsubscribe. Set exactly one of `_flowId` / `_connectionId` / `_integrationId` / `_syncId`.
|
|
399
|
+
x-celigo-refModel: flows
|
|
400
|
+
examples:
|
|
401
|
+
- 69497fc443fc1f9a03d31bd9
|
|
402
|
+
_connectionId:
|
|
403
|
+
type: string
|
|
404
|
+
format: objectId
|
|
405
|
+
description: Connection id to subscribe / unsubscribe.
|
|
406
|
+
x-celigo-refModel: connections
|
|
407
|
+
examples:
|
|
408
|
+
- 5e5eb06fdd83ed4f8206a4ea
|
|
409
|
+
_integrationId:
|
|
410
|
+
type: string
|
|
411
|
+
format: objectId
|
|
412
|
+
description: Integration id to subscribe / unsubscribe.
|
|
413
|
+
x-celigo-refModel: integrations
|
|
414
|
+
examples:
|
|
415
|
+
- 5d2c5a8f3e9b1c4a7f6d2e80
|
|
416
|
+
_syncId:
|
|
417
|
+
type: string
|
|
418
|
+
format: objectId
|
|
419
|
+
description: Sync id to subscribe / unsubscribe.
|
|
420
|
+
x-celigo-refModel: syncs
|
|
421
|
+
examples:
|
|
422
|
+
- 69e7549b0f8b6cd703e5d3b2
|
|
423
|
+
subscribed:
|
|
424
|
+
type: boolean
|
|
425
|
+
description: |-
|
|
426
|
+
`true` creates the subscription (or no-ops if it already exists);
|
|
427
|
+
`false` removes it.
|
|
428
|
+
subscribedByUserEmail:
|
|
429
|
+
type: string
|
|
430
|
+
format: email
|
|
431
|
+
description: |-
|
|
432
|
+
Email of the user whose subscription is being modified. Must match a
|
|
433
|
+
user in the account — unknown emails are silently ignored (no-op).
|
|
434
|
+
examples:
|
|
435
|
+
- jane@example.com
|
|
436
|
+
required:
|
|
437
|
+
- subscribed
|
|
438
|
+
- subscribedByUserEmail
|
|
439
|
+
responses:
|
|
440
|
+
400-bad-request:
|
|
441
|
+
description: |
|
|
442
|
+
Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
|
|
443
|
+
content:
|
|
444
|
+
application/json:
|
|
445
|
+
schema:
|
|
446
|
+
$ref: '#/components/schemas/Error'
|
|
447
|
+
examples:
|
|
448
|
+
default:
|
|
449
|
+
value:
|
|
450
|
+
errors:
|
|
451
|
+
- code: invalid_request
|
|
452
|
+
message: The request body failed validation.
|
|
453
|
+
401-unauthorized:
|
|
454
|
+
description: |-
|
|
455
|
+
Unauthorized. The request lacks a valid bearer token, or the provided token
|
|
456
|
+
failed to authenticate.
|
|
457
|
+
|
|
458
|
+
Note: the 401 response is produced by the auth middleware **before** the
|
|
459
|
+
request reaches the endpoint handler, so it does **not** follow the
|
|
460
|
+
standard `{errors: [...]}` envelope. Instead the body is a bare
|
|
461
|
+
`{message: string}` object with no `code`, no `errors` array. Callers
|
|
462
|
+
handling 401s should key off the HTTP status and the `message` string,
|
|
463
|
+
not try to destructure an `errors[]`.
|
|
464
|
+
content:
|
|
465
|
+
application/json:
|
|
466
|
+
schema:
|
|
467
|
+
type: object
|
|
468
|
+
properties:
|
|
469
|
+
message:
|
|
470
|
+
type: string
|
|
471
|
+
description: |-
|
|
472
|
+
Human-readable description of the auth failure. Known values:
|
|
473
|
+
- `"Unauthorized"` — no `Authorization` header on the request.
|
|
474
|
+
- `"Bearer Authentication Failed"` — header present but token
|
|
475
|
+
is invalid, revoked, or expired.
|
|
476
|
+
required:
|
|
477
|
+
- message
|
|
478
|
+
examples:
|
|
479
|
+
missing_token:
|
|
480
|
+
summary: No Authorization header sent
|
|
481
|
+
value:
|
|
482
|
+
message: Unauthorized
|
|
483
|
+
invalid_token:
|
|
484
|
+
summary: Bearer token invalid or revoked
|
|
485
|
+
value:
|
|
486
|
+
message: Bearer Authentication Failed
|
|
487
|
+
x-enable-proxy: true
|
|
488
|
+
x-internal: false
|