@workos/openapi-spec 0.122.0 → 0.124.0

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.
@@ -2302,6 +2302,25 @@ paths:
2302
2302
  description: The list of records for the current page.
2303
2303
  items:
2304
2304
  $ref: '#/components/schemas/AuditLogActionJson'
2305
+ '402':
2306
+ description: ''
2307
+ content:
2308
+ application/json:
2309
+ schema:
2310
+ type: object
2311
+ properties:
2312
+ code:
2313
+ type: string
2314
+ description: The error code identifying the type of error.
2315
+ example: production_feature_requires_billing
2316
+ const: production_feature_requires_billing
2317
+ message:
2318
+ type: string
2319
+ description: A human-readable description of the error.
2320
+ example: Request could not be processed.
2321
+ required:
2322
+ - code
2323
+ - message
2305
2324
  '404':
2306
2325
  description: Not Found
2307
2326
  content:
@@ -2359,6 +2378,25 @@ paths:
2359
2378
  application/json:
2360
2379
  schema:
2361
2380
  $ref: '#/components/schemas/AuditLogSchemaJson'
2381
+ '402':
2382
+ description: ''
2383
+ content:
2384
+ application/json:
2385
+ schema:
2386
+ type: object
2387
+ properties:
2388
+ code:
2389
+ type: string
2390
+ description: The error code identifying the type of error.
2391
+ example: production_feature_requires_billing
2392
+ const: production_feature_requires_billing
2393
+ message:
2394
+ type: string
2395
+ description: A human-readable description of the error.
2396
+ example: Request could not be processed.
2397
+ required:
2398
+ - code
2399
+ - message
2362
2400
  '422':
2363
2401
  description: Unprocessable Entity
2364
2402
  content:
@@ -2471,6 +2509,25 @@ paths:
2471
2509
  description: The list of records for the current page.
2472
2510
  items:
2473
2511
  $ref: '#/components/schemas/AuditLogSchemaJson'
2512
+ '402':
2513
+ description: ''
2514
+ content:
2515
+ application/json:
2516
+ schema:
2517
+ type: object
2518
+ properties:
2519
+ code:
2520
+ type: string
2521
+ description: The error code identifying the type of error.
2522
+ example: production_feature_requires_billing
2523
+ const: production_feature_requires_billing
2524
+ message:
2525
+ type: string
2526
+ description: A human-readable description of the error.
2527
+ example: Request could not be processed.
2528
+ required:
2529
+ - code
2530
+ - message
2474
2531
  '404':
2475
2532
  description: Not Found
2476
2533
  content:
@@ -2519,10 +2576,6 @@ paths:
2519
2576
  response. We suggest using [v4
2520
2577
  UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for
2521
2578
  idempotency keys to avoid collisions.
2522
-
2523
-
2524
- Idempotency keys expire after 24 hours. The API will generate a new
2525
- response if you submit a request with an expired key.
2526
2579
  operationId: AuditLogEventsController_create
2527
2580
  parameters:
2528
2581
  - name: idempotency-key
@@ -2530,7 +2583,7 @@ paths:
2530
2583
  description: >-
2531
2584
  A unique string to prevent duplicate requests. Each subsequent
2532
2585
  request matching this unique string will return the same response.
2533
- We suggest using v4 UUIDs. Keys expire after 24 hours.
2586
+ We suggest using v4 UUIDs.
2534
2587
  required: false
2535
2588
  schema:
2536
2589
  type: string
@@ -2599,6 +2652,25 @@ paths:
2599
2652
  errors:
2600
2653
  - instancePath: /targets
2601
2654
  description: Bad Request
2655
+ '402':
2656
+ description: ''
2657
+ content:
2658
+ application/json:
2659
+ schema:
2660
+ type: object
2661
+ properties:
2662
+ code:
2663
+ type: string
2664
+ description: The error code identifying the type of error.
2665
+ example: production_feature_requires_billing
2666
+ const: production_feature_requires_billing
2667
+ message:
2668
+ type: string
2669
+ description: A human-readable description of the error.
2670
+ example: Request could not be processed.
2671
+ required:
2672
+ - code
2673
+ - message
2602
2674
  '404':
2603
2675
  content:
2604
2676
  application/json:
@@ -2737,6 +2809,25 @@ paths:
2737
2809
  example:
2738
2810
  message: Invalid date range
2739
2811
  code: invalid_audit_log_export_range_date
2812
+ '402':
2813
+ description: ''
2814
+ content:
2815
+ application/json:
2816
+ schema:
2817
+ type: object
2818
+ properties:
2819
+ code:
2820
+ type: string
2821
+ description: The error code identifying the type of error.
2822
+ example: production_feature_requires_billing
2823
+ const: production_feature_requires_billing
2824
+ message:
2825
+ type: string
2826
+ description: A human-readable description of the error.
2827
+ example: Request could not be processed.
2828
+ required:
2829
+ - code
2830
+ - message
2740
2831
  summary: Create Export
2741
2832
  tags:
2742
2833
  - audit-logs
@@ -2769,6 +2860,25 @@ paths:
2769
2860
  url: https://exports.audit-logs.com/audit-log-exports/export.csv
2770
2861
  created_at: '2022-09-02T17:14:57.094Z'
2771
2862
  updated_at: '2022-09-02T17:14:57.094Z'
2863
+ '402':
2864
+ description: ''
2865
+ content:
2866
+ application/json:
2867
+ schema:
2868
+ type: object
2869
+ properties:
2870
+ code:
2871
+ type: string
2872
+ description: The error code identifying the type of error.
2873
+ example: production_feature_requires_billing
2874
+ const: production_feature_requires_billing
2875
+ message:
2876
+ type: string
2877
+ description: A human-readable description of the error.
2878
+ example: Request could not be processed.
2879
+ required:
2880
+ - code
2881
+ - message
2772
2882
  '404':
2773
2883
  description: Audit Log Export not found.
2774
2884
  content:
@@ -3346,6 +3456,25 @@ paths:
3346
3456
  application/json:
3347
3457
  schema:
3348
3458
  $ref: '#/components/schemas/GroupRoleAssignmentList'
3459
+ '402':
3460
+ description: ''
3461
+ content:
3462
+ application/json:
3463
+ schema:
3464
+ type: object
3465
+ properties:
3466
+ code:
3467
+ type: string
3468
+ description: The error code identifying the type of error.
3469
+ example: production_feature_requires_billing
3470
+ const: production_feature_requires_billing
3471
+ message:
3472
+ type: string
3473
+ description: A human-readable description of the error.
3474
+ example: Request could not be processed.
3475
+ required:
3476
+ - code
3477
+ - message
3349
3478
  '403':
3350
3479
  description: Forbidden
3351
3480
  content:
@@ -3399,6 +3528,25 @@ paths:
3399
3528
  application/json:
3400
3529
  schema:
3401
3530
  $ref: '#/components/schemas/GroupRoleAssignment'
3531
+ '402':
3532
+ description: ''
3533
+ content:
3534
+ application/json:
3535
+ schema:
3536
+ type: object
3537
+ properties:
3538
+ code:
3539
+ type: string
3540
+ description: The error code identifying the type of error.
3541
+ example: production_feature_requires_billing
3542
+ const: production_feature_requires_billing
3543
+ message:
3544
+ type: string
3545
+ description: A human-readable description of the error.
3546
+ example: Request could not be processed.
3547
+ required:
3548
+ - code
3549
+ - message
3402
3550
  '403':
3403
3551
  description: Forbidden
3404
3552
  content:
@@ -3486,6 +3634,25 @@ paths:
3486
3634
  application/json:
3487
3635
  schema:
3488
3636
  $ref: '#/components/schemas/GroupRoleAssignmentList'
3637
+ '402':
3638
+ description: ''
3639
+ content:
3640
+ application/json:
3641
+ schema:
3642
+ type: object
3643
+ properties:
3644
+ code:
3645
+ type: string
3646
+ description: The error code identifying the type of error.
3647
+ example: production_feature_requires_billing
3648
+ const: production_feature_requires_billing
3649
+ message:
3650
+ type: string
3651
+ description: A human-readable description of the error.
3652
+ example: Request could not be processed.
3653
+ required:
3654
+ - code
3655
+ - message
3489
3656
  '403':
3490
3657
  description: Forbidden
3491
3658
  content:
@@ -3618,6 +3785,25 @@ paths:
3618
3785
  application/json:
3619
3786
  schema:
3620
3787
  $ref: '#/components/schemas/GroupRoleAssignment'
3788
+ '402':
3789
+ description: ''
3790
+ content:
3791
+ application/json:
3792
+ schema:
3793
+ type: object
3794
+ properties:
3795
+ code:
3796
+ type: string
3797
+ description: The error code identifying the type of error.
3798
+ example: production_feature_requires_billing
3799
+ const: production_feature_requires_billing
3800
+ message:
3801
+ type: string
3802
+ description: A human-readable description of the error.
3803
+ example: Request could not be processed.
3804
+ required:
3805
+ - code
3806
+ - message
3621
3807
  '403':
3622
3808
  description: Forbidden
3623
3809
  content:
@@ -3725,6 +3911,25 @@ paths:
3725
3911
  application/json:
3726
3912
  schema:
3727
3913
  $ref: '#/components/schemas/AuthorizationCheck'
3914
+ '402':
3915
+ description: ''
3916
+ content:
3917
+ application/json:
3918
+ schema:
3919
+ type: object
3920
+ properties:
3921
+ code:
3922
+ type: string
3923
+ description: The error code identifying the type of error.
3924
+ example: production_feature_requires_billing
3925
+ const: production_feature_requires_billing
3926
+ message:
3927
+ type: string
3928
+ description: A human-readable description of the error.
3929
+ example: Request could not be processed.
3930
+ required:
3931
+ - code
3932
+ - message
3728
3933
  '403':
3729
3934
  description: Forbidden
3730
3935
  content:
@@ -3911,6 +4116,25 @@ paths:
3911
4116
  required:
3912
4117
  - code
3913
4118
  - message
4119
+ '402':
4120
+ description: ''
4121
+ content:
4122
+ application/json:
4123
+ schema:
4124
+ type: object
4125
+ properties:
4126
+ code:
4127
+ type: string
4128
+ description: The error code identifying the type of error.
4129
+ example: production_feature_requires_billing
4130
+ const: production_feature_requires_billing
4131
+ message:
4132
+ type: string
4133
+ description: A human-readable description of the error.
4134
+ example: Request could not be processed.
4135
+ required:
4136
+ - code
4137
+ - message
3914
4138
  '403':
3915
4139
  description: Forbidden
3916
4140
  content:
@@ -4040,6 +4264,25 @@ paths:
4040
4264
  application/json:
4041
4265
  schema:
4042
4266
  $ref: '#/components/schemas/AuthorizationPermissionList'
4267
+ '402':
4268
+ description: ''
4269
+ content:
4270
+ application/json:
4271
+ schema:
4272
+ type: object
4273
+ properties:
4274
+ code:
4275
+ type: string
4276
+ description: The error code identifying the type of error.
4277
+ example: production_feature_requires_billing
4278
+ const: production_feature_requires_billing
4279
+ message:
4280
+ type: string
4281
+ description: A human-readable description of the error.
4282
+ example: Request could not be processed.
4283
+ required:
4284
+ - code
4285
+ - message
4043
4286
  '403':
4044
4287
  description: Forbidden
4045
4288
  content:
@@ -4167,6 +4410,25 @@ paths:
4167
4410
  application/json:
4168
4411
  schema:
4169
4412
  $ref: '#/components/schemas/AuthorizationPermissionList'
4413
+ '402':
4414
+ description: ''
4415
+ content:
4416
+ application/json:
4417
+ schema:
4418
+ type: object
4419
+ properties:
4420
+ code:
4421
+ type: string
4422
+ description: The error code identifying the type of error.
4423
+ example: production_feature_requires_billing
4424
+ const: production_feature_requires_billing
4425
+ message:
4426
+ type: string
4427
+ description: A human-readable description of the error.
4428
+ example: Request could not be processed.
4429
+ required:
4430
+ - code
4431
+ - message
4170
4432
  '403':
4171
4433
  description: Forbidden
4172
4434
  content:
@@ -4300,6 +4562,25 @@ paths:
4300
4562
  application/json:
4301
4563
  schema:
4302
4564
  $ref: '#/components/schemas/UserRoleAssignmentList'
4565
+ '402':
4566
+ description: ''
4567
+ content:
4568
+ application/json:
4569
+ schema:
4570
+ type: object
4571
+ properties:
4572
+ code:
4573
+ type: string
4574
+ description: The error code identifying the type of error.
4575
+ example: production_feature_requires_billing
4576
+ const: production_feature_requires_billing
4577
+ message:
4578
+ type: string
4579
+ description: A human-readable description of the error.
4580
+ example: Request could not be processed.
4581
+ required:
4582
+ - code
4583
+ - message
4303
4584
  '403':
4304
4585
  description: Forbidden
4305
4586
  content:
@@ -4369,6 +4650,25 @@ paths:
4369
4650
  created_at: '2026-01-15T12:00:00.000Z'
4370
4651
  updated_at: '2026-01-15T12:00:00.000Z'
4371
4652
  description: Created
4653
+ '402':
4654
+ description: ''
4655
+ content:
4656
+ application/json:
4657
+ schema:
4658
+ type: object
4659
+ properties:
4660
+ code:
4661
+ type: string
4662
+ description: The error code identifying the type of error.
4663
+ example: production_feature_requires_billing
4664
+ const: production_feature_requires_billing
4665
+ message:
4666
+ type: string
4667
+ description: A human-readable description of the error.
4668
+ example: Request could not be processed.
4669
+ required:
4670
+ - code
4671
+ - message
4372
4672
  '403':
4373
4673
  description: Forbidden
4374
4674
  content:
@@ -5553,6 +5853,25 @@ paths:
5553
5853
  application/json:
5554
5854
  schema:
5555
5855
  $ref: '#/components/schemas/AuthorizationResource'
5856
+ '402':
5857
+ description: ''
5858
+ content:
5859
+ application/json:
5860
+ schema:
5861
+ type: object
5862
+ properties:
5863
+ code:
5864
+ type: string
5865
+ description: The error code identifying the type of error.
5866
+ example: production_feature_requires_billing
5867
+ const: production_feature_requires_billing
5868
+ message:
5869
+ type: string
5870
+ description: A human-readable description of the error.
5871
+ example: Request could not be processed.
5872
+ required:
5873
+ - code
5874
+ - message
5556
5875
  '403':
5557
5876
  description: Forbidden
5558
5877
  content:
@@ -5700,6 +6019,25 @@ paths:
5700
6019
  required:
5701
6020
  - code
5702
6021
  - message
6022
+ '402':
6023
+ description: ''
6024
+ content:
6025
+ application/json:
6026
+ schema:
6027
+ type: object
6028
+ properties:
6029
+ code:
6030
+ type: string
6031
+ description: The error code identifying the type of error.
6032
+ example: production_feature_requires_billing
6033
+ const: production_feature_requires_billing
6034
+ message:
6035
+ type: string
6036
+ description: A human-readable description of the error.
6037
+ example: Request could not be processed.
6038
+ required:
6039
+ - code
6040
+ - message
5703
6041
  '403':
5704
6042
  description: Forbidden
5705
6043
  content:
@@ -6018,6 +6356,25 @@ paths:
6018
6356
  required:
6019
6357
  - code
6020
6358
  - message
6359
+ '402':
6360
+ description: ''
6361
+ content:
6362
+ application/json:
6363
+ schema:
6364
+ type: object
6365
+ properties:
6366
+ code:
6367
+ type: string
6368
+ description: The error code identifying the type of error.
6369
+ example: production_feature_requires_billing
6370
+ const: production_feature_requires_billing
6371
+ message:
6372
+ type: string
6373
+ description: A human-readable description of the error.
6374
+ example: Request could not be processed.
6375
+ required:
6376
+ - code
6377
+ - message
6021
6378
  '403':
6022
6379
  description: Forbidden
6023
6380
  content:
@@ -6150,6 +6507,25 @@ paths:
6150
6507
  application/json:
6151
6508
  schema:
6152
6509
  $ref: '#/components/schemas/UserRoleAssignmentList'
6510
+ '402':
6511
+ description: ''
6512
+ content:
6513
+ application/json:
6514
+ schema:
6515
+ type: object
6516
+ properties:
6517
+ code:
6518
+ type: string
6519
+ description: The error code identifying the type of error.
6520
+ example: production_feature_requires_billing
6521
+ const: production_feature_requires_billing
6522
+ message:
6523
+ type: string
6524
+ description: A human-readable description of the error.
6525
+ example: Request could not be processed.
6526
+ required:
6527
+ - code
6528
+ - message
6153
6529
  '403':
6154
6530
  description: Forbidden
6155
6531
  content:
@@ -6679,6 +7055,25 @@ paths:
6679
7055
  required:
6680
7056
  - code
6681
7057
  - message
7058
+ '402':
7059
+ description: ''
7060
+ content:
7061
+ application/json:
7062
+ schema:
7063
+ type: object
7064
+ properties:
7065
+ code:
7066
+ type: string
7067
+ description: The error code identifying the type of error.
7068
+ example: production_feature_requires_billing
7069
+ const: production_feature_requires_billing
7070
+ message:
7071
+ type: string
7072
+ description: A human-readable description of the error.
7073
+ example: Request could not be processed.
7074
+ required:
7075
+ - code
7076
+ - message
6682
7077
  '403':
6683
7078
  description: Forbidden
6684
7079
  content:
@@ -6829,6 +7224,25 @@ paths:
6829
7224
  required:
6830
7225
  - code
6831
7226
  - message
7227
+ '402':
7228
+ description: ''
7229
+ content:
7230
+ application/json:
7231
+ schema:
7232
+ type: object
7233
+ properties:
7234
+ code:
7235
+ type: string
7236
+ description: The error code identifying the type of error.
7237
+ example: production_feature_requires_billing
7238
+ const: production_feature_requires_billing
7239
+ message:
7240
+ type: string
7241
+ description: A human-readable description of the error.
7242
+ example: Request could not be processed.
7243
+ required:
7244
+ - code
7245
+ - message
6832
7246
  '403':
6833
7247
  description: Forbidden
6834
7248
  content:
@@ -6933,6 +7347,25 @@ paths:
6933
7347
  application/json:
6934
7348
  schema:
6935
7349
  $ref: '#/components/schemas/AuthorizationResource'
7350
+ '402':
7351
+ description: ''
7352
+ content:
7353
+ application/json:
7354
+ schema:
7355
+ type: object
7356
+ properties:
7357
+ code:
7358
+ type: string
7359
+ description: The error code identifying the type of error.
7360
+ example: production_feature_requires_billing
7361
+ const: production_feature_requires_billing
7362
+ message:
7363
+ type: string
7364
+ description: A human-readable description of the error.
7365
+ example: Request could not be processed.
7366
+ required:
7367
+ - code
7368
+ - message
6936
7369
  '403':
6937
7370
  description: Forbidden
6938
7371
  content:
@@ -7079,6 +7512,25 @@ paths:
7079
7512
  required:
7080
7513
  - code
7081
7514
  - message
7515
+ '402':
7516
+ description: ''
7517
+ content:
7518
+ application/json:
7519
+ schema:
7520
+ type: object
7521
+ properties:
7522
+ code:
7523
+ type: string
7524
+ description: The error code identifying the type of error.
7525
+ example: production_feature_requires_billing
7526
+ const: production_feature_requires_billing
7527
+ message:
7528
+ type: string
7529
+ description: A human-readable description of the error.
7530
+ example: Request could not be processed.
7531
+ required:
7532
+ - code
7533
+ - message
7082
7534
  '403':
7083
7535
  description: Forbidden
7084
7536
  content:
@@ -7357,6 +7809,25 @@ paths:
7357
7809
  required:
7358
7810
  - code
7359
7811
  - message
7812
+ '402':
7813
+ description: ''
7814
+ content:
7815
+ application/json:
7816
+ schema:
7817
+ type: object
7818
+ properties:
7819
+ code:
7820
+ type: string
7821
+ description: The error code identifying the type of error.
7822
+ example: production_feature_requires_billing
7823
+ const: production_feature_requires_billing
7824
+ message:
7825
+ type: string
7826
+ description: A human-readable description of the error.
7827
+ example: Request could not be processed.
7828
+ required:
7829
+ - code
7830
+ - message
7360
7831
  '403':
7361
7832
  description: Forbidden
7362
7833
  content:
@@ -7473,6 +7944,25 @@ paths:
7473
7944
  application/json:
7474
7945
  schema:
7475
7946
  $ref: '#/components/schemas/UserRoleAssignmentList'
7947
+ '402':
7948
+ description: ''
7949
+ content:
7950
+ application/json:
7951
+ schema:
7952
+ type: object
7953
+ properties:
7954
+ code:
7955
+ type: string
7956
+ description: The error code identifying the type of error.
7957
+ example: production_feature_requires_billing
7958
+ const: production_feature_requires_billing
7959
+ message:
7960
+ type: string
7961
+ description: A human-readable description of the error.
7962
+ example: Request could not be processed.
7963
+ required:
7964
+ - code
7965
+ - message
7476
7966
  '403':
7477
7967
  description: Forbidden
7478
7968
  content:
@@ -10816,6 +11306,21 @@ paths:
10816
11306
  schema:
10817
11307
  example: github
10818
11308
  type: string
11309
+ - name: idempotency-key
11310
+ in: header
11311
+ description: >-
11312
+ Makes retries of this explicit add return the connection the first
11313
+ attempt created instead of creating another. Reuse the same key for
11314
+ every retry of one request. A matching retry within 24 hours returns
11315
+ the existing connection; reusing the key for a different owner,
11316
+ integration, or authentication method, or after 24 hours while that
11317
+ connection exists, returns 409 `idempotency_key_conflict`. If that
11318
+ connection was deleted, the key creates a new one. Requests without
11319
+ a key are not retry-safe.
11320
+ required: false
11321
+ schema:
11322
+ type: string
11323
+ example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80
10819
11324
  requestBody:
10820
11325
  required: true
10821
11326
  content:
@@ -10980,7 +11485,9 @@ paths:
10980
11485
  '409':
10981
11486
  description: >-
10982
11487
  `connected_account_limit_reached` when the provider and owner
10983
- already have 25 connections.
11488
+ already have 25 connections, or `idempotency_key_conflict` when the
11489
+ `Idempotency-Key` was already used for a different connection
11490
+ request or its replay window has passed.
10984
11491
  content:
10985
11492
  application/json:
10986
11493
  schema:
@@ -10989,9 +11496,11 @@ paths:
10989
11496
  properties:
10990
11497
  code:
10991
11498
  type: string
11499
+ enum:
11500
+ - connected_account_limit_reached
11501
+ - idempotency_key_conflict
10992
11502
  description: The error code identifying the type of error.
10993
11503
  example: connected_account_limit_reached
10994
- const: connected_account_limit_reached
10995
11504
  message:
10996
11505
  type: string
10997
11506
  description: A human-readable description of the error.
@@ -11722,6 +12231,21 @@ paths:
11722
12231
  schema:
11723
12232
  example: salesforce
11724
12233
  type: string
12234
+ - name: idempotency-key
12235
+ in: header
12236
+ description: >-
12237
+ Makes retries of this explicit add return the connection the first
12238
+ attempt created instead of creating another. Reuse the same key for
12239
+ every retry of one request. A matching retry within 24 hours returns
12240
+ the existing connection; reusing the key for a different owner,
12241
+ integration, or authentication method, or after 24 hours while that
12242
+ connection exists, returns 409 `idempotency_key_conflict`. If that
12243
+ connection was deleted, the key creates a new one. Requests without
12244
+ a key are not retry-safe.
12245
+ required: false
12246
+ schema:
12247
+ type: string
12248
+ example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80
11725
12249
  requestBody:
11726
12250
  required: true
11727
12251
  content:
@@ -11901,7 +12425,9 @@ paths:
11901
12425
  '409':
11902
12426
  description: >-
11903
12427
  `connected_account_limit_reached` when the provider and owner
11904
- already have 25 connections.
12428
+ already have 25 connections, or `idempotency_key_conflict` when the
12429
+ `Idempotency-Key` was already used for a different connection
12430
+ request or its replay window has passed.
11905
12431
  content:
11906
12432
  application/json:
11907
12433
  schema:
@@ -11910,9 +12436,11 @@ paths:
11910
12436
  properties:
11911
12437
  code:
11912
12438
  type: string
12439
+ enum:
12440
+ - connected_account_limit_reached
12441
+ - idempotency_key_conflict
11913
12442
  description: The error code identifying the type of error.
11914
12443
  example: connected_account_limit_reached
11915
- const: connected_account_limit_reached
11916
12444
  message:
11917
12445
  type: string
11918
12446
  description: A human-readable description of the error.
@@ -13944,6 +14472,25 @@ paths:
13944
14472
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
13945
14473
  required:
13946
14474
  - message
14475
+ '409':
14476
+ description: ''
14477
+ content:
14478
+ application/json:
14479
+ schema:
14480
+ type: object
14481
+ properties:
14482
+ code:
14483
+ type: string
14484
+ description: The error code identifying the type of error.
14485
+ example: concurrent_flag_target_update
14486
+ const: concurrent_flag_target_update
14487
+ message:
14488
+ type: string
14489
+ description: A human-readable description of the error.
14490
+ example: Request could not be processed.
14491
+ required:
14492
+ - code
14493
+ - message
13947
14494
  summary: Disable a feature flag
13948
14495
  tags:
13949
14496
  - feature-flags
@@ -14074,6 +14621,25 @@ paths:
14074
14621
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
14075
14622
  required:
14076
14623
  - message
14624
+ '409':
14625
+ description: ''
14626
+ content:
14627
+ application/json:
14628
+ schema:
14629
+ type: object
14630
+ properties:
14631
+ code:
14632
+ type: string
14633
+ description: The error code identifying the type of error.
14634
+ example: concurrent_flag_target_update
14635
+ const: concurrent_flag_target_update
14636
+ message:
14637
+ type: string
14638
+ description: A human-readable description of the error.
14639
+ example: Request could not be processed.
14640
+ required:
14641
+ - code
14642
+ - message
14077
14643
  summary: Enable a feature flag
14078
14644
  tags:
14079
14645
  - feature-flags
@@ -14937,6 +15503,25 @@ paths:
14937
15503
  application/json:
14938
15504
  schema:
14939
15505
  $ref: '#/components/schemas/AuditLogsRetentionJson'
15506
+ '402':
15507
+ description: ''
15508
+ content:
15509
+ application/json:
15510
+ schema:
15511
+ type: object
15512
+ properties:
15513
+ code:
15514
+ type: string
15515
+ description: The error code identifying the type of error.
15516
+ example: production_feature_requires_billing
15517
+ const: production_feature_requires_billing
15518
+ message:
15519
+ type: string
15520
+ description: A human-readable description of the error.
15521
+ example: Request could not be processed.
15522
+ required:
15523
+ - code
15524
+ - message
14940
15525
  '404':
14941
15526
  description: Not Found
14942
15527
  content:
@@ -14977,6 +15562,25 @@ paths:
14977
15562
  application/json:
14978
15563
  schema:
14979
15564
  $ref: '#/components/schemas/AuditLogsRetentionJson'
15565
+ '402':
15566
+ description: ''
15567
+ content:
15568
+ application/json:
15569
+ schema:
15570
+ type: object
15571
+ properties:
15572
+ code:
15573
+ type: string
15574
+ description: The error code identifying the type of error.
15575
+ example: production_feature_requires_billing
15576
+ const: production_feature_requires_billing
15577
+ message:
15578
+ type: string
15579
+ description: A human-readable description of the error.
15580
+ example: Request could not be processed.
15581
+ required:
15582
+ - code
15583
+ - message
14980
15584
  '404':
14981
15585
  description: Not Found
14982
15586
  content:
@@ -16164,6 +16768,8 @@ paths:
16164
16768
  config:
16165
16769
  instance_url: https://example.my.salesforce.com
16166
16770
  state: connected
16771
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
16772
+ state_reason: null
16167
16773
  created_at: '2024-01-16T14:20:00.000Z'
16168
16774
  updated_at: '2024-01-16T14:20:00.000Z'
16169
16775
  '400':
@@ -16341,6 +16947,21 @@ paths:
16341
16947
  schema:
16342
16948
  example: github
16343
16949
  type: string
16950
+ - name: idempotency-key
16951
+ in: header
16952
+ description: >-
16953
+ Makes retries of this explicit add return the connection the first
16954
+ attempt created instead of creating another. Reuse the same key for
16955
+ every retry of one request. A matching retry within 24 hours returns
16956
+ the existing connection; reusing the key for a different owner,
16957
+ integration, or authentication method, or after 24 hours while that
16958
+ connection exists, returns 409 `idempotency_key_conflict`. If that
16959
+ connection was deleted, the key creates a new one. Requests without
16960
+ a key are not retry-safe.
16961
+ required: false
16962
+ schema:
16963
+ type: string
16964
+ example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80
16344
16965
  requestBody:
16345
16966
  required: true
16346
16967
  content:
@@ -16372,6 +16993,8 @@ paths:
16372
16993
  config:
16373
16994
  instance_url: https://example.my.salesforce.com
16374
16995
  state: connected
16996
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
16997
+ state_reason: null
16375
16998
  created_at: '2024-01-16T14:20:00.000Z'
16376
16999
  updated_at: '2024-01-16T14:20:00.000Z'
16377
17000
  '401':
@@ -16428,9 +17051,11 @@ paths:
16428
17051
  '409':
16429
17052
  description: >-
16430
17053
  The compatibility connection already exists for this organization
16431
- and integration, or `connected_account_limit_reached` when
17054
+ and integration, `connected_account_limit_reached` when
16432
17055
  `connection_intent: add` would create a standard connection and the
16433
- owner already has 25 connections.
17056
+ owner already has 25 connections, or `idempotency_key_conflict` when
17057
+ the `Idempotency-Key` was already used for a different connection
17058
+ request or its replay window has passed.
16434
17059
  content:
16435
17060
  application/json:
16436
17061
  schema:
@@ -16439,9 +17064,11 @@ paths:
16439
17064
  properties:
16440
17065
  code:
16441
17066
  type: string
17067
+ enum:
17068
+ - connected_account_limit_reached
17069
+ - idempotency_key_conflict
16442
17070
  description: The error code identifying the type of error.
16443
17071
  example: connected_account_limit_reached
16444
- const: connected_account_limit_reached
16445
17072
  message:
16446
17073
  type: string
16447
17074
  description: A human-readable description of the error.
@@ -16633,6 +17260,8 @@ paths:
16633
17260
  config:
16634
17261
  instance_url: https://example.my.salesforce.com
16635
17262
  state: connected
17263
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
17264
+ state_reason: null
16636
17265
  created_at: '2024-01-16T14:20:00.000Z'
16637
17266
  updated_at: '2024-01-16T14:20:00.000Z'
16638
17267
  '400':
@@ -16802,6 +17431,8 @@ paths:
16802
17431
  config:
16803
17432
  instance_url: https://example.my.salesforce.com
16804
17433
  state: connected
17434
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
17435
+ state_reason: null
16805
17436
  created_at: '2024-01-16T14:20:00.000Z'
16806
17437
  updated_at: '2024-01-16T14:20:00.000Z'
16807
17438
  userlandUserId: null
@@ -17086,6 +17717,25 @@ paths:
17086
17717
  responses:
17087
17718
  '204':
17088
17719
  description: No Content
17720
+ '402':
17721
+ description: ''
17722
+ content:
17723
+ application/json:
17724
+ schema:
17725
+ type: object
17726
+ properties:
17727
+ code:
17728
+ type: string
17729
+ description: The error code identifying the type of error.
17730
+ example: production_feature_requires_billing
17731
+ const: production_feature_requires_billing
17732
+ message:
17733
+ type: string
17734
+ description: A human-readable description of the error.
17735
+ example: Request could not be processed.
17736
+ required:
17737
+ - code
17738
+ - message
17089
17739
  '403':
17090
17740
  description: Forbidden
17091
17741
  content:
@@ -17371,6 +18021,25 @@ paths:
17371
18021
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
17372
18022
  required:
17373
18023
  - message
18024
+ '402':
18025
+ description: ''
18026
+ content:
18027
+ application/json:
18028
+ schema:
18029
+ type: object
18030
+ properties:
18031
+ code:
18032
+ type: string
18033
+ description: The error code identifying the type of error.
18034
+ example: production_feature_requires_billing
18035
+ const: production_feature_requires_billing
18036
+ message:
18037
+ type: string
18038
+ description: A human-readable description of the error.
18039
+ example: Request could not be processed.
18040
+ required:
18041
+ - code
18042
+ - message
17374
18043
  '403':
17375
18044
  description: Forbidden
17376
18045
  content:
@@ -17413,6 +18082,56 @@ paths:
17413
18082
  summary: Generate a Portal Link
17414
18083
  tags:
17415
18084
  - admin-portal
18085
+ /portal/revoke_link:
18086
+ post:
18087
+ description: >-
18088
+ Revokes every Portal Link generated for the given organization with the
18089
+ given `external_user_id`, and immediately ends any Admin Portal sessions
18090
+ that were started from those links. Use this when an admin is
18091
+ deprovisioned from your application: unopened links stop working, and
18092
+ their already-open portal sessions are ended. Only links that were
18093
+ generated with an `external_user_id` can be revoked, so pass one to
18094
+ `generate_link` for every admin you may later need to deprovision.
18095
+ operationId: PortalSessionsController_revokeLink
18096
+ parameters: []
18097
+ requestBody:
18098
+ required: true
18099
+ content:
18100
+ application/json:
18101
+ schema:
18102
+ $ref: '#/components/schemas/RevokeLinkDto'
18103
+ responses:
18104
+ '200':
18105
+ description: OK
18106
+ '404':
18107
+ description: Not Found
18108
+ content:
18109
+ application/json:
18110
+ schema:
18111
+ type: object
18112
+ properties:
18113
+ message:
18114
+ type: string
18115
+ description: A human-readable description of the error.
18116
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
18117
+ required:
18118
+ - message
18119
+ '422':
18120
+ description: Unprocessable Entity
18121
+ content:
18122
+ application/json:
18123
+ schema:
18124
+ type: object
18125
+ properties:
18126
+ message:
18127
+ type: string
18128
+ description: A human-readable description of the error.
18129
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
18130
+ required:
18131
+ - message
18132
+ summary: Revoke Portal Links
18133
+ tags:
18134
+ - admin-portal
17416
18135
  /radar/attempts:
17417
18136
  post:
17418
18137
  description: Assess a request for risk using the Radar engine and receive a verdict.
@@ -17488,6 +18207,25 @@ paths:
17488
18207
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
17489
18208
  required:
17490
18209
  - message
18210
+ '402':
18211
+ description: ''
18212
+ content:
18213
+ application/json:
18214
+ schema:
18215
+ type: object
18216
+ properties:
18217
+ code:
18218
+ type: string
18219
+ description: The error code identifying the type of error.
18220
+ example: production_feature_requires_billing
18221
+ const: production_feature_requires_billing
18222
+ message:
18223
+ type: string
18224
+ description: A human-readable description of the error.
18225
+ example: Request could not be processed.
18226
+ required:
18227
+ - code
18228
+ - message
17491
18229
  summary: Create an attempt
17492
18230
  tags:
17493
18231
  - radar
@@ -17541,6 +18279,25 @@ paths:
17541
18279
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
17542
18280
  required:
17543
18281
  - message
18282
+ '402':
18283
+ description: ''
18284
+ content:
18285
+ application/json:
18286
+ schema:
18287
+ type: object
18288
+ properties:
18289
+ code:
18290
+ type: string
18291
+ description: The error code identifying the type of error.
18292
+ example: production_feature_requires_billing
18293
+ const: production_feature_requires_billing
18294
+ message:
18295
+ type: string
18296
+ description: A human-readable description of the error.
18297
+ example: Request could not be processed.
18298
+ required:
18299
+ - code
18300
+ - message
17544
18301
  '404':
17545
18302
  description: Not Found
17546
18303
  content:
@@ -17629,6 +18386,25 @@ paths:
17629
18386
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
17630
18387
  required:
17631
18388
  - message
18389
+ '402':
18390
+ description: ''
18391
+ content:
18392
+ application/json:
18393
+ schema:
18394
+ type: object
18395
+ properties:
18396
+ code:
18397
+ type: string
18398
+ description: The error code identifying the type of error.
18399
+ example: production_feature_requires_billing
18400
+ const: production_feature_requires_billing
18401
+ message:
18402
+ type: string
18403
+ description: A human-readable description of the error.
18404
+ example: Request could not be processed.
18405
+ required:
18406
+ - code
18407
+ - message
17632
18408
  summary: Add an entry to a Radar list
17633
18409
  tags:
17634
18410
  - radar
@@ -20539,6 +21315,25 @@ paths:
20539
21315
  required:
20540
21316
  - code
20541
21317
  - message
21318
+ '402':
21319
+ description: ''
21320
+ content:
21321
+ application/json:
21322
+ schema:
21323
+ type: object
21324
+ properties:
21325
+ code:
21326
+ type: string
21327
+ description: The error code identifying the type of error.
21328
+ example: production_feature_requires_billing
21329
+ const: production_feature_requires_billing
21330
+ message:
21331
+ type: string
21332
+ description: A human-readable description of the error.
21333
+ example: Request could not be processed.
21334
+ required:
21335
+ - code
21336
+ - message
20542
21337
  '404':
20543
21338
  description: Not Found
20544
21339
  content:
@@ -20899,6 +21694,25 @@ paths:
20899
21694
  required:
20900
21695
  - code
20901
21696
  - message
21697
+ '402':
21698
+ description: ''
21699
+ content:
21700
+ application/json:
21701
+ schema:
21702
+ type: object
21703
+ properties:
21704
+ code:
21705
+ type: string
21706
+ description: The error code identifying the type of error.
21707
+ example: production_feature_requires_billing
21708
+ const: production_feature_requires_billing
21709
+ message:
21710
+ type: string
21711
+ description: A human-readable description of the error.
21712
+ example: Request could not be processed.
21713
+ required:
21714
+ - code
21715
+ - message
20902
21716
  '404':
20903
21717
  description: Not Found
20904
21718
  content:
@@ -25219,6 +26033,21 @@ paths:
25219
26033
  schema:
25220
26034
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
25221
26035
  type: string
26036
+ - name: idempotency-key
26037
+ in: header
26038
+ description: >-
26039
+ Makes retries of this explicit add return the connection the first
26040
+ attempt created instead of creating another. Reuse the same key for
26041
+ every retry of one request. A matching retry within 24 hours returns
26042
+ the existing connection; reusing the key for a different owner,
26043
+ integration, or authentication method, or after 24 hours while that
26044
+ connection exists, returns 409 `idempotency_key_conflict`. If that
26045
+ connection was deleted, the key creates a new one. Requests without
26046
+ a key are not retry-safe.
26047
+ required: false
26048
+ schema:
26049
+ type: string
26050
+ example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80
25222
26051
  requestBody:
25223
26052
  required: true
25224
26053
  content:
@@ -25273,9 +26102,11 @@ paths:
25273
26102
  '409':
25274
26103
  description: >-
25275
26104
  The compatibility connection already exists for this user,
25276
- integration, and organization, or `connected_account_limit_reached`
26105
+ integration, and organization, `connected_account_limit_reached`
25277
26106
  when `connection_intent: add` would create a standard connection and
25278
- the owner already has 25 connections.
26107
+ the owner already has 25 connections, or `idempotency_key_conflict`
26108
+ when the `Idempotency-Key` was already used for a different
26109
+ connection request or its replay window has passed.
25279
26110
  content:
25280
26111
  application/json:
25281
26112
  schema:
@@ -25284,9 +26115,11 @@ paths:
25284
26115
  properties:
25285
26116
  code:
25286
26117
  type: string
26118
+ enum:
26119
+ - connected_account_limit_reached
26120
+ - idempotency_key_conflict
25287
26121
  description: The error code identifying the type of error.
25288
26122
  example: connected_account_limit_reached
25289
- const: connected_account_limit_reached
25290
26123
  message:
25291
26124
  type: string
25292
26125
  description: A human-readable description of the error.
@@ -25897,6 +26730,25 @@ paths:
25897
26730
  - updated_at
25898
26731
  - object
25899
26732
  x-inline-with-overrides: true
26733
+ '402':
26734
+ description: ''
26735
+ content:
26736
+ application/json:
26737
+ schema:
26738
+ type: object
26739
+ properties:
26740
+ code:
26741
+ type: string
26742
+ description: The error code identifying the type of error.
26743
+ example: production_feature_requires_billing
26744
+ const: production_feature_requires_billing
26745
+ message:
26746
+ type: string
26747
+ description: A human-readable description of the error.
26748
+ example: Request could not be processed.
26749
+ required:
26750
+ - code
26751
+ - message
25900
26752
  '404':
25901
26753
  description: Not Found
25902
26754
  content:
@@ -29933,6 +30785,16 @@ components:
29933
30785
  type: string
29934
30786
  description: An [Organization](/reference/organization) identifier.
29935
30787
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
30788
+ external_user_id:
30789
+ type: string
30790
+ minLength: 1
30791
+ maxLength: 255
30792
+ description: >-
30793
+ The ID of the user in your application the link is generated for.
30794
+ The link and any Admin Portal sessions started from it can later be
30795
+ revoked by this ID, for example when that user is deprovisioned from
30796
+ your application.
30797
+ example: user_12345
29936
30798
  intent:
29937
30799
  type: string
29938
30800
  description: |2-
@@ -29967,6 +30829,25 @@ components:
29967
30829
  type: array
29968
30830
  required:
29969
30831
  - organization
30832
+ RevokeLinkDto:
30833
+ type: object
30834
+ properties:
30835
+ organization:
30836
+ type: string
30837
+ description: An [Organization](/reference/organization) identifier.
30838
+ example: org_01EHZNVPK3SFK441A1RGBFSHRT
30839
+ external_user_id:
30840
+ type: string
30841
+ minLength: 1
30842
+ maxLength: 255
30843
+ description: >-
30844
+ The `external_user_id` the Portal Links were generated with for this
30845
+ organization. Every matching link is revoked, along with any Admin
30846
+ Portal sessions started from those links.
30847
+ example: user_12345
30848
+ required:
30849
+ - organization
30850
+ - external_user_id
29970
30851
  SendRadarSmsChallengeDto:
29971
30852
  type: object
29972
30853
  properties:
@@ -31132,6 +32013,14 @@ components:
31132
32013
  - authorization_code
31133
32014
  - urn:ietf:params:oauth:grant-type:token-exchange
31134
32015
  example: authorization_code
32016
+ code_verifier:
32017
+ type: string
32018
+ description: >-
32019
+ The PKCE code verifier matching the `code_challenge` sent with the
32020
+ authorization request. Required when the authorization request
32021
+ included a `code_challenge`. Must be sent in the request body.
32022
+ example: code_verifier_value
32023
+ format: password
31135
32024
  subject_token:
31136
32025
  type: string
31137
32026
  description: >-
@@ -34912,6 +35801,29 @@ components:
34912
35801
  - needs_reauthorization
34913
35802
  description: The state of the connected account.
34914
35803
  example: connected
35804
+ established_by_user_id:
35805
+ type:
35806
+ - string
35807
+ - 'null'
35808
+ description: >-
35809
+ The ID of the User whose authorization established the connected
35810
+ account, or null when it is developer-managed, its establisher is
35811
+ unknown, or the establishing member left the organization.
35812
+ Historical events may omit this field.
35813
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
35814
+ state_reason:
35815
+ description: >-
35816
+ Why WorkOS put the connected account in its current state, or null
35817
+ when there is no WorkOS-recorded reason.
35818
+ `establishing_member_membership_ended` means the member who
35819
+ established an organization-owned connection is no longer an active
35820
+ member. Additional values may be added. Historical events may omit
35821
+ this field.
35822
+ example: null
35823
+ oneOf:
35824
+ - type: string
35825
+ const: establishing_member_membership_ended
35826
+ - type: 'null'
34915
35827
  created_at:
34916
35828
  format: date-time
34917
35829
  type: string
@@ -47070,9 +47982,40 @@ components:
47070
47982
 
47071
47983
  - `needs_reauthorization`: The user needs to reauthorize the
47072
47984
  connection, typically because required scopes have changed.
47985
+ `state_reason` explains why when WorkOS invalidated the connection
47986
+ itself.
47073
47987
 
47074
47988
  - `disconnected`: The connection has been disconnected.
47075
47989
  example: connected
47990
+ established_by_user_id:
47991
+ type:
47992
+ - string
47993
+ - 'null'
47994
+ description: >-
47995
+ The [User](/reference/authkit/user) whose authorization established
47996
+ this connection. `null` when the connection is developer-managed or
47997
+ its establisher is unknown, and when the establishing member lost
47998
+ access to the organization — in which case `state_reason` is
47999
+ `establishing_member_membership_ended`.
48000
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48001
+ state_reason:
48002
+ description: >-
48003
+ Why WorkOS put the connection in its current `state`, or `null` when
48004
+ there is no WorkOS-recorded reason:
48005
+
48006
+ - `establishing_member_membership_ended`: The member who established
48007
+ this organization-owned connection is no longer an active member of
48008
+ the organization, so its credentials were cleared. An organization
48009
+ admin must provide new credentials.
48010
+
48011
+
48012
+ Additional values may be added; treat an unrecognized value as an
48013
+ unknown reason.
48014
+ example: null
48015
+ oneOf:
48016
+ - type: string
48017
+ const: establishing_member_membership_ended
48018
+ - type: 'null'
47076
48019
  created_at:
47077
48020
  type: string
47078
48021
  description: The timestamp when the connection was created.
@@ -47364,11 +48307,44 @@ components:
47364
48307
 
47365
48308
  - `needs_reauthorization`: The user needs to
47366
48309
  reauthorize the connection, typically because required
47367
- scopes have changed.
48310
+ scopes have changed. `state_reason` explains why when
48311
+ WorkOS invalidated the connection itself.
47368
48312
 
47369
48313
  - `disconnected`: The connection has been
47370
48314
  disconnected.
47371
48315
  example: connected
48316
+ established_by_user_id:
48317
+ type:
48318
+ - string
48319
+ - 'null'
48320
+ description: >-
48321
+ The [User](/reference/authkit/user) whose
48322
+ authorization established this connection. `null` when
48323
+ the connection is developer-managed or its establisher
48324
+ is unknown, and when the establishing member lost
48325
+ access to the organization — in which case
48326
+ `state_reason` is
48327
+ `establishing_member_membership_ended`.
48328
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48329
+ state_reason:
48330
+ description: >-
48331
+ Why WorkOS put the connection in its current `state`,
48332
+ or `null` when there is no WorkOS-recorded reason:
48333
+
48334
+ - `establishing_member_membership_ended`: The member
48335
+ who established this organization-owned connection is
48336
+ no longer an active member of the organization, so its
48337
+ credentials were cleared. An organization admin must
48338
+ provide new credentials.
48339
+
48340
+
48341
+ Additional values may be added; treat an unrecognized
48342
+ value as an unknown reason.
48343
+ example: null
48344
+ oneOf:
48345
+ - type: string
48346
+ const: establishing_member_membership_ended
48347
+ - type: 'null'
47372
48348
  created_at:
47373
48349
  type: string
47374
48350
  description: The timestamp when the connection was created.
@@ -47539,10 +48515,42 @@ components:
47539
48515
 
47540
48516
  - `needs_reauthorization`: The user needs to reauthorize
47541
48517
  the connection, typically because required scopes have
47542
- changed.
48518
+ changed. `state_reason` explains why when WorkOS
48519
+ invalidated the connection itself.
47543
48520
 
47544
48521
  - `disconnected`: The connection has been disconnected.
47545
48522
  example: connected
48523
+ established_by_user_id:
48524
+ type:
48525
+ - string
48526
+ - 'null'
48527
+ description: >-
48528
+ The [User](/reference/authkit/user) whose authorization
48529
+ established this connection. `null` when the connection
48530
+ is developer-managed or its establisher is unknown, and
48531
+ when the establishing member lost access to the
48532
+ organization — in which case `state_reason` is
48533
+ `establishing_member_membership_ended`.
48534
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48535
+ state_reason:
48536
+ description: >-
48537
+ Why WorkOS put the connection in its current `state`, or
48538
+ `null` when there is no WorkOS-recorded reason:
48539
+
48540
+ - `establishing_member_membership_ended`: The member who
48541
+ established this organization-owned connection is no
48542
+ longer an active member of the organization, so its
48543
+ credentials were cleared. An organization admin must
48544
+ provide new credentials.
48545
+
48546
+
48547
+ Additional values may be added; treat an unrecognized
48548
+ value as an unknown reason.
48549
+ example: null
48550
+ oneOf:
48551
+ - type: string
48552
+ const: establishing_member_membership_ended
48553
+ - type: 'null'
47546
48554
  created_at:
47547
48555
  type: string
47548
48556
  description: The timestamp when the connection was created.
@@ -47739,9 +48747,40 @@ components:
47739
48747
 
47740
48748
  - `needs_reauthorization`: The user needs to reauthorize the
47741
48749
  connection, typically because required scopes have changed.
48750
+ `state_reason` explains why when WorkOS invalidated the connection
48751
+ itself.
47742
48752
 
47743
48753
  - `disconnected`: The connection has been disconnected.
47744
48754
  example: connected
48755
+ established_by_user_id:
48756
+ type:
48757
+ - string
48758
+ - 'null'
48759
+ description: >-
48760
+ The [User](/reference/authkit/user) whose authorization established
48761
+ this connection. `null` when the connection is developer-managed or
48762
+ its establisher is unknown, and when the establishing member lost
48763
+ access to the organization — in which case `state_reason` is
48764
+ `establishing_member_membership_ended`.
48765
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48766
+ state_reason:
48767
+ description: >-
48768
+ Why WorkOS put the connection in its current `state`, or `null` when
48769
+ there is no WorkOS-recorded reason:
48770
+
48771
+ - `establishing_member_membership_ended`: The member who established
48772
+ this organization-owned connection is no longer an active member of
48773
+ the organization, so its credentials were cleared. An organization
48774
+ admin must provide new credentials.
48775
+
48776
+
48777
+ Additional values may be added; treat an unrecognized value as an
48778
+ unknown reason.
48779
+ example: null
48780
+ oneOf:
48781
+ - type: string
48782
+ const: establishing_member_membership_ended
48783
+ - type: 'null'
47745
48784
  created_at:
47746
48785
  type: string
47747
48786
  description: The timestamp when the connection was created.
@@ -47769,8 +48808,7 @@ components:
47769
48808
  type: string
47770
48809
  format: password
47771
48810
  description: An ephemeral link to initiate the Admin Portal.
47772
- example: >-
47773
- https://setup.workos.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
48811
+ example: https://setup.workos.com/init?apiToken=01EHZNVPK3SFK441A1RGBFSHRT
47774
48812
  required:
47775
48813
  - link
47776
48814
  RadarChallenge: