@workos/openapi-spec 0.144.0 → 0.146.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.
@@ -11261,6 +11261,131 @@ paths:
11261
11261
  summary: List data integrations
11262
11262
  tags:
11263
11263
  - pipes
11264
+ /data-integrations/finish:
11265
+ post:
11266
+ description: >-
11267
+ Saves a connection that was started with `code_challenge`. After the
11268
+ user authorizes, WorkOS redirects them to `return_to` with a
11269
+ `connect_code` and `state`. Call this endpoint from your server with
11270
+ that `connect_code` and the `code_verifier` behind the challenge to save
11271
+ the connected account.
11272
+ operationId: DataIntegrationsController_finishConnection
11273
+ parameters: []
11274
+ requestBody:
11275
+ required: true
11276
+ content:
11277
+ application/json:
11278
+ schema:
11279
+ type: object
11280
+ properties:
11281
+ connect_code:
11282
+ type: string
11283
+ pattern: ^[A-Za-z0-9_-]{43}$
11284
+ description: >-
11285
+ The `connect_code` WorkOS added to `return_to` when the user
11286
+ finished authorizing. It can be used once and expires 90
11287
+ seconds after the redirect.
11288
+ example: Q3n0bWh2b0tqZ1VtV2ZsYkJ3cE9aV0J6T1hGb1lYaGo
11289
+ code_verifier:
11290
+ type: string
11291
+ pattern: ^[A-Za-z0-9._~-]{43,128}$
11292
+ description: >-
11293
+ The code verifier `code_challenge` was derived from: 43 to
11294
+ 128 characters from `A-Z`, `a-z`, `0-9`, `-`, `.`, `_` and
11295
+ `~`. A wrong verifier uses up the `connect_code`, and the
11296
+ user has to connect again.
11297
+ example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
11298
+ state:
11299
+ type: string
11300
+ description: >-
11301
+ The `state` WorkOS added to `return_to` alongside
11302
+ `connect_code`. Optional; it is only used to correlate the
11303
+ request in logs.
11304
+ example: q2czJKmVAraSBg8xFpT7M9uR
11305
+ required:
11306
+ - connect_code
11307
+ - code_verifier
11308
+ responses:
11309
+ '200':
11310
+ description: OK
11311
+ content:
11312
+ application/json:
11313
+ schema:
11314
+ $ref: '#/components/schemas/DataIntegrationFinishConnectionResponse'
11315
+ '400':
11316
+ description: >-
11317
+ The connection could not be completed, and the user must connect
11318
+ again. `invalid_connect_code` when the `connect_code` is unknown,
11319
+ expired, already used, or from another environment, or the
11320
+ `code_verifier` does not match the `code_challenge`. Other codes
11321
+ report why saving the connection failed, such as `target_deleted`
11322
+ when the connected account being reauthorized was deleted in the
11323
+ meantime. A malformed request body returns validation messages
11324
+ instead.
11325
+ content:
11326
+ application/json:
11327
+ schema:
11328
+ anyOf:
11329
+ - type: object
11330
+ properties:
11331
+ code:
11332
+ type: string
11333
+ enum:
11334
+ - invalid_connect_code
11335
+ - authorization_code_exchange_error
11336
+ - authorization_state_expired
11337
+ - auth_method_mismatch
11338
+ - concurrent_request
11339
+ - connected_account_limit_reached
11340
+ - connected_account_not_found
11341
+ - installation_failed
11342
+ - invalid_authorization_url
11343
+ - invalid_client_id
11344
+ - invalid_data_integration
11345
+ - missing_access_token
11346
+ - missing_code
11347
+ - multiple_connections_unavailable
11348
+ - provider_error
11349
+ - reauthorization_needed
11350
+ - target_deleted
11351
+ - unexpected_response_format
11352
+ description: The error code identifying the type of error.
11353
+ example: invalid_connect_code
11354
+ message:
11355
+ type: string
11356
+ description: A human-readable description of the error.
11357
+ example: Request could not be processed.
11358
+ required:
11359
+ - code
11360
+ - message
11361
+ - type: object
11362
+ properties:
11363
+ message:
11364
+ oneOf:
11365
+ - type: string
11366
+ - type: array
11367
+ items:
11368
+ type: string
11369
+ required:
11370
+ - message
11371
+ '401':
11372
+ description: Unauthorized
11373
+ '403':
11374
+ description: Forbidden
11375
+ content:
11376
+ application/json:
11377
+ schema:
11378
+ type: object
11379
+ properties:
11380
+ message:
11381
+ type: string
11382
+ description: A human-readable description of the error.
11383
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11384
+ required:
11385
+ - message
11386
+ summary: Finish connection
11387
+ tags:
11388
+ - pipes
11264
11389
  /data-integrations/{slug}:
11265
11390
  get:
11266
11391
  description: Retrieves the user-owned data integration by its slug.
@@ -11939,8 +12064,34 @@ paths:
11939
12064
  return_to:
11940
12065
  type: string
11941
12066
  format: uri
11942
- description: The URL to redirect the user to after authorization.
12067
+ description: >-
12068
+ The URL to redirect the user to after authorization.
12069
+ Required with `code_challenge`, and must then exactly match
12070
+ a redirect URI registered on one of the environment's
12071
+ applications. Loopback URLs match on any port; wildcard
12072
+ redirect URIs are not honored, and a `return_to` with a
12073
+ query string or fragment never matches.
11943
12074
  example: https://example.com/callback
12075
+ code_challenge:
12076
+ type: string
12077
+ pattern: ^[A-Za-z0-9_-]{43}$
12078
+ description: >-
12079
+ A PKCE-style code challenge: the base64url-encoded SHA-256
12080
+ of a `code_verifier` your app keeps. When set, the
12081
+ connection isn't saved when the user finishes authorizing.
12082
+ Instead, the user is redirected to `return_to` with a
12083
+ `connect_code` and `state`, and your app must call [Finish
12084
+ connection](/reference/pipes/connected-account/finish-connection)
12085
+ with the `connect_code` and `code_verifier` within 90
12086
+ seconds to save it.
12087
+ example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
12088
+ code_challenge_method:
12089
+ type: string
12090
+ description: >-
12091
+ The method used to derive `code_challenge`. Only `S256` is
12092
+ supported, and it is the default. Requires `code_challenge`.
12093
+ example: S256
12094
+ const: S256
11944
12095
  config:
11945
12096
  type: object
11946
12097
  additionalProperties:
@@ -11984,20 +12135,43 @@ paths:
11984
12135
  schema:
11985
12136
  $ref: '#/components/schemas/DataIntegrationAuthorizeUrlResponse'
11986
12137
  '400':
11987
- description: Bad Request
12138
+ description: >-
12139
+ The request was invalid. With `code_challenge`: `invalid_return_to`
12140
+ when `return_to` is missing or does not exactly match a registered
12141
+ redirect URI, `return_to_requires_exact_match` when only a wildcard
12142
+ redirect URI matches it, and `connect_finish_unavailable` when
12143
+ `code_challenge` is not available for the environment.
11988
12144
  content:
11989
12145
  application/json:
11990
12146
  schema:
11991
- type: object
11992
- properties:
11993
- message:
11994
- oneOf:
11995
- - type: string
11996
- - type: array
11997
- items:
11998
- type: string
11999
- required:
12000
- - message
12147
+ anyOf:
12148
+ - type: object
12149
+ properties:
12150
+ code:
12151
+ type: string
12152
+ enum:
12153
+ - invalid_return_to
12154
+ - return_to_requires_exact_match
12155
+ - connect_finish_unavailable
12156
+ description: The error code identifying the type of error.
12157
+ example: invalid_return_to
12158
+ message:
12159
+ type: string
12160
+ description: A human-readable description of the error.
12161
+ example: Request could not be processed.
12162
+ required:
12163
+ - code
12164
+ - message
12165
+ - type: object
12166
+ properties:
12167
+ message:
12168
+ oneOf:
12169
+ - type: string
12170
+ - type: array
12171
+ items:
12172
+ type: string
12173
+ required:
12174
+ - message
12001
12175
  '401':
12002
12176
  description: Unauthorized
12003
12177
  '403':
@@ -16279,6 +16453,100 @@ paths:
16279
16453
  summary: List Group members
16280
16454
  tags:
16281
16455
  - groups
16456
+ patch:
16457
+ description: >-
16458
+ Adds and removes organization memberships for a group in a single atomic
16459
+ operation. Organization memberships not listed in `add` or `remove` are
16460
+ left unchanged. Adding a member that is already in the group or removing
16461
+ a member that isn't in the group has no effect. A membership listed in
16462
+ both `add` and `remove` is rejected. `add` and `remove` must contain
16463
+ between 1 and 100 entries combined.
16464
+ operationId: GroupMembershipsController_updateMembers
16465
+ parameters:
16466
+ - name: organizationId
16467
+ required: true
16468
+ in: path
16469
+ description: Unique identifier of the Organization.
16470
+ schema:
16471
+ type: string
16472
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
16473
+ - name: groupId
16474
+ required: true
16475
+ in: path
16476
+ description: Unique identifier of the Group.
16477
+ schema:
16478
+ type: string
16479
+ example: group_01HXYZ123456789ABCDEFGHIJ
16480
+ requestBody:
16481
+ required: true
16482
+ content:
16483
+ application/json:
16484
+ schema:
16485
+ $ref: '#/components/schemas/PatchGroupMembershipsDto'
16486
+ responses:
16487
+ '204':
16488
+ description: No Content
16489
+ '400':
16490
+ description: Bad Request
16491
+ content:
16492
+ application/json:
16493
+ schema:
16494
+ type: object
16495
+ properties:
16496
+ code:
16497
+ type: string
16498
+ description: The error code identifying the type of error.
16499
+ example: group_membership_update_overlap
16500
+ const: group_membership_update_overlap
16501
+ message:
16502
+ type: string
16503
+ description: A human-readable description of the error.
16504
+ example: Request could not be processed.
16505
+ required:
16506
+ - code
16507
+ - message
16508
+ '403':
16509
+ description: Forbidden
16510
+ content:
16511
+ application/json:
16512
+ schema:
16513
+ type: object
16514
+ properties:
16515
+ message:
16516
+ type: string
16517
+ description: A human-readable description of the error.
16518
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
16519
+ required:
16520
+ - message
16521
+ '404':
16522
+ description: Not Found
16523
+ content:
16524
+ application/json:
16525
+ schema:
16526
+ type: object
16527
+ properties:
16528
+ message:
16529
+ type: string
16530
+ description: A human-readable description of the error.
16531
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
16532
+ required:
16533
+ - message
16534
+ '422':
16535
+ description: Unprocessable Entity
16536
+ content:
16537
+ application/json:
16538
+ schema:
16539
+ type: object
16540
+ properties:
16541
+ message:
16542
+ type: string
16543
+ description: A human-readable description of the error.
16544
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
16545
+ required:
16546
+ - message
16547
+ summary: Update Group members
16548
+ tags:
16549
+ - groups
16282
16550
  /organizations/{organizationId}/groups/{groupId}/organization-memberships/{omId}:
16283
16551
  delete:
16284
16552
  description: Remove an organization membership from a group.
@@ -16497,10 +16765,7 @@ paths:
16497
16765
  - user:email
16498
16766
  auth_method: oauth
16499
16767
  api_key_last_4: null
16500
- client_id: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
16501
- client_secret_last_4: cdef
16502
- config:
16503
- instance_url: https://example.my.salesforce.com
16768
+ config: {}
16504
16769
  state: connected
16505
16770
  established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
16506
16771
  state_reason: null
@@ -16722,10 +16987,7 @@ paths:
16722
16987
  - user:email
16723
16988
  auth_method: oauth
16724
16989
  api_key_last_4: null
16725
- client_id: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
16726
- client_secret_last_4: cdef
16727
- config:
16728
- instance_url: https://example.my.salesforce.com
16990
+ config: {}
16729
16991
  state: connected
16730
16992
  established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
16731
16993
  state_reason: null
@@ -16989,10 +17251,7 @@ paths:
16989
17251
  - user:email
16990
17252
  auth_method: oauth
16991
17253
  api_key_last_4: null
16992
- client_id: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
16993
- client_secret_last_4: cdef
16994
- config:
16995
- instance_url: https://example.my.salesforce.com
17254
+ config: {}
16996
17255
  state: connected
16997
17256
  established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
16998
17257
  state_reason: null
@@ -17160,10 +17419,7 @@ paths:
17160
17419
  - user:email
17161
17420
  auth_method: oauth
17162
17421
  api_key_last_4: null
17163
- client_id: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
17164
- client_secret_last_4: cdef
17165
- config:
17166
- instance_url: https://example.my.salesforce.com
17422
+ config: {}
17167
17423
  state: connected
17168
17424
  established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
17169
17425
  state_reason: null
@@ -29774,6 +30030,29 @@ components:
29774
30030
  example: om_01HXYZ123456789ABCDEFGHIJ
29775
30031
  required:
29776
30032
  - organization_membership_id
30033
+ PatchGroupMembershipsDto:
30034
+ type: object
30035
+ properties:
30036
+ add:
30037
+ default: []
30038
+ description: >-
30039
+ The IDs of the organization memberships to add to the group. Adding
30040
+ a membership that's already in the group has no effect.
30041
+ example:
30042
+ - om_01HXYZ123456789ABCDEFGHIJ
30043
+ type: array
30044
+ items:
30045
+ type: string
30046
+ remove:
30047
+ default: []
30048
+ description: >-
30049
+ The IDs of the organization memberships to remove from the group.
30050
+ Removing a membership that isn't in the group has no effect.
30051
+ example:
30052
+ - om_01HXYZ987654321ABCDEFGHIJ
30053
+ type: array
30054
+ items:
30055
+ type: string
29777
30056
  CreateGroupDto:
29778
30057
  type: object
29779
30058
  properties:
@@ -47745,6 +48024,229 @@ components:
47745
48024
  - object
47746
48025
  - data
47747
48026
  - list_metadata
48027
+ ConnectedAccount:
48028
+ type: object
48029
+ properties:
48030
+ object:
48031
+ type: string
48032
+ description: Distinguishes the connected account object.
48033
+ const: connected_account
48034
+ id:
48035
+ type: string
48036
+ description: The unique identifier of the connected account.
48037
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
48038
+ connection_role:
48039
+ type: string
48040
+ enum:
48041
+ - compatibility
48042
+ - standard
48043
+ description: >-
48044
+ Whether this row is the compatibility connection visible to
48045
+ undeclared clients or a standard peer for plural-aware clients. The
48046
+ role does not indicate preference or creation order.
48047
+ example: compatibility
48048
+ account_identifier:
48049
+ type:
48050
+ - string
48051
+ - 'null'
48052
+ description: >-
48053
+ A best-effort identifier for the provider account this connection
48054
+ points at. It is correlation metadata, not the connection identifier
48055
+ or a selector.
48056
+ example: workspace_123
48057
+ account_display_name:
48058
+ type:
48059
+ - string
48060
+ - 'null'
48061
+ description: >-
48062
+ A mutable, non-unique display name for the provider account
48063
+ connection.
48064
+ example: Acme production
48065
+ user_id:
48066
+ type:
48067
+ - string
48068
+ - 'null'
48069
+ description: >-
48070
+ The [User](/reference/authkit/user) identifier associated with this
48071
+ connection.
48072
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48073
+ organization_id:
48074
+ type:
48075
+ - string
48076
+ - 'null'
48077
+ description: >-
48078
+ The [Organization](/reference/organization) identifier associated
48079
+ with this connection, or `null` if not scoped to an organization.
48080
+ example: null
48081
+ scopes:
48082
+ type: array
48083
+ items:
48084
+ type: string
48085
+ description: The OAuth scopes granted for this connection.
48086
+ example:
48087
+ - repo
48088
+ - user:email
48089
+ auth_method:
48090
+ type: string
48091
+ enum:
48092
+ - oauth
48093
+ - api_key
48094
+ - client_credentials
48095
+ description: >-
48096
+ The authentication method used for this connection (`oauth`,
48097
+ `api_key`, or `client_credentials`). Defaults to `oauth` if absent.
48098
+ example: oauth
48099
+ api_key_last_4:
48100
+ type:
48101
+ - string
48102
+ - 'null'
48103
+ description: >-
48104
+ The last four characters of the API key, or `null` for OAuth
48105
+ connections.
48106
+ example: null
48107
+ client_id:
48108
+ type:
48109
+ - string
48110
+ - 'null'
48111
+ description: >-
48112
+ The client ID supplied for this connection. Only present when
48113
+ `auth_method` is `client_credentials`.
48114
+ example: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
48115
+ client_secret_last_4:
48116
+ type:
48117
+ - string
48118
+ - 'null'
48119
+ description: >-
48120
+ The last four characters of the client secret supplied for this
48121
+ connection, or `null` when it can't be read. Only present when
48122
+ `auth_method` is `client_credentials`.
48123
+ example: cdef
48124
+ config:
48125
+ type: object
48126
+ additionalProperties:
48127
+ type: string
48128
+ description: >-
48129
+ The connection-level configuration values stored for this connection
48130
+ — the fields the provider declares at `installation` scope,
48131
+ excluding secret and undeclared fields. Returned for every
48132
+ authentication method; empty when no stored values can be disclosed.
48133
+ example:
48134
+ instance_url: https://example.my.salesforce.com
48135
+ state:
48136
+ type: string
48137
+ enum:
48138
+ - connected
48139
+ - needs_reauthorization
48140
+ - disconnected
48141
+ description: >-
48142
+ The state of the connected account:
48143
+
48144
+ - `connected`: The connection is active and tokens are valid.
48145
+
48146
+ - `needs_reauthorization`: The user needs to reauthorize the
48147
+ connection, typically because required scopes have changed.
48148
+ `state_reason` explains why when WorkOS invalidated the connection
48149
+ itself.
48150
+
48151
+ - `disconnected`: The connection has been disconnected.
48152
+ example: connected
48153
+ established_by_user_id:
48154
+ type:
48155
+ - string
48156
+ - 'null'
48157
+ description: >-
48158
+ The [User](/reference/authkit/user) whose authorization established
48159
+ this connection. `null` when the connection is developer-managed or
48160
+ its establisher is unknown, and when the establishing member lost
48161
+ access to the organization — in which case `state_reason` is
48162
+ `establishing_member_membership_ended`.
48163
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
48164
+ state_reason:
48165
+ description: >-
48166
+ Why WorkOS put the connection in its current `state`, or `null` when
48167
+ there is no WorkOS-recorded reason:
48168
+
48169
+ - `establishing_member_membership_ended`: The member who established
48170
+ this organization-owned connection is no longer an active member of
48171
+ the organization, so its credentials were cleared. An organization
48172
+ admin must provide new credentials.
48173
+
48174
+
48175
+ Additional values may be added; treat an unrecognized value as an
48176
+ unknown reason.
48177
+ example: null
48178
+ oneOf:
48179
+ - type: string
48180
+ const: establishing_member_membership_ended
48181
+ - type: 'null'
48182
+ created_at:
48183
+ type: string
48184
+ description: The timestamp when the connection was created.
48185
+ example: '2024-01-16T14:20:00.000Z'
48186
+ updated_at:
48187
+ type: string
48188
+ description: The timestamp when the connection was last updated.
48189
+ example: '2024-01-16T14:20:00.000Z'
48190
+ warnings:
48191
+ type: array
48192
+ items:
48193
+ type: object
48194
+ properties:
48195
+ code:
48196
+ type: string
48197
+ const: duplicate_account_display_name
48198
+ message:
48199
+ type: string
48200
+ description: A human-readable explanation of the non-blocking warning.
48201
+ example: >-
48202
+ Another connection for this provider and owner has the same
48203
+ label.
48204
+ required:
48205
+ - code
48206
+ - message
48207
+ description: >-
48208
+ Non-blocking warnings about an explicitly supplied label. Only
48209
+ writes return it, and only when another connection already uses the
48210
+ label; reads omit it.
48211
+ required:
48212
+ - object
48213
+ - id
48214
+ - connection_role
48215
+ - account_identifier
48216
+ - account_display_name
48217
+ - user_id
48218
+ - organization_id
48219
+ - scopes
48220
+ - state
48221
+ - created_at
48222
+ - updated_at
48223
+ example:
48224
+ object: connected_account
48225
+ id: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
48226
+ connection_role: compatibility
48227
+ account_identifier: workspace_123
48228
+ account_display_name: Acme production
48229
+ user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
48230
+ organization_id: null
48231
+ scopes:
48232
+ - repo
48233
+ - user:email
48234
+ auth_method: oauth
48235
+ api_key_last_4: null
48236
+ config: {}
48237
+ state: connected
48238
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
48239
+ state_reason: null
48240
+ created_at: '2024-01-16T14:20:00.000Z'
48241
+ updated_at: '2024-01-16T14:20:00.000Z'
48242
+ DataIntegrationFinishConnectionResponse:
48243
+ type: object
48244
+ properties:
48245
+ connected_account:
48246
+ $ref: '#/components/schemas/ConnectedAccount'
48247
+ description: The connected account that was saved.
48248
+ required:
48249
+ - connected_account
47748
48250
  DataIntegrationAuthorizeUrlResponse:
47749
48251
  type: object
47750
48252
  properties:
@@ -47753,6 +48255,15 @@ components:
47753
48255
  description: The OAuth authorization URL to redirect the user to.
47754
48256
  example: >-
47755
48257
  https://api.workos.com/data-integrations/q2czJKmVAraSBg8xFpT7M9uR/authorize-redirect
48258
+ completion:
48259
+ type: string
48260
+ description: >-
48261
+ `finish_required` when the request included `code_challenge`: the
48262
+ connection will be held until your app finishes it. Omitted
48263
+ otherwise. If you sent `code_challenge` and this is missing, don't
48264
+ redirect the user.
48265
+ example: finish_required
48266
+ const: finish_required
47756
48267
  required:
47757
48268
  - url
47758
48269
  AuthMethodMismatchError:
@@ -48131,202 +48642,6 @@ components:
48131
48642
  required:
48132
48643
  - active
48133
48644
  - error
48134
- ConnectedAccount:
48135
- type: object
48136
- properties:
48137
- object:
48138
- type: string
48139
- description: Distinguishes the connected account object.
48140
- const: connected_account
48141
- id:
48142
- type: string
48143
- description: The unique identifier of the connected account.
48144
- example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
48145
- connection_role:
48146
- type: string
48147
- enum:
48148
- - compatibility
48149
- - standard
48150
- description: >-
48151
- Whether this row is the compatibility connection visible to
48152
- undeclared clients or a standard peer for plural-aware clients. The
48153
- role does not indicate preference or creation order.
48154
- example: compatibility
48155
- account_identifier:
48156
- type:
48157
- - string
48158
- - 'null'
48159
- description: >-
48160
- A best-effort identifier for the provider account this connection
48161
- points at. It is correlation metadata, not the connection identifier
48162
- or a selector.
48163
- example: workspace_123
48164
- account_display_name:
48165
- type:
48166
- - string
48167
- - 'null'
48168
- description: >-
48169
- A mutable, non-unique display name for the provider account
48170
- connection.
48171
- example: Acme production
48172
- user_id:
48173
- type:
48174
- - string
48175
- - 'null'
48176
- description: >-
48177
- The [User](/reference/authkit/user) identifier associated with this
48178
- connection.
48179
- example: user_01EHZNVPK3SFK441A1RGBFSHRT
48180
- organization_id:
48181
- type:
48182
- - string
48183
- - 'null'
48184
- description: >-
48185
- The [Organization](/reference/organization) identifier associated
48186
- with this connection, or `null` if not scoped to an organization.
48187
- example: null
48188
- scopes:
48189
- type: array
48190
- items:
48191
- type: string
48192
- description: The OAuth scopes granted for this connection.
48193
- example:
48194
- - repo
48195
- - user:email
48196
- auth_method:
48197
- type: string
48198
- enum:
48199
- - oauth
48200
- - api_key
48201
- - client_credentials
48202
- description: >-
48203
- The authentication method used for this connection (`oauth`,
48204
- `api_key`, or `client_credentials`). Defaults to `oauth` if absent.
48205
- example: oauth
48206
- api_key_last_4:
48207
- type:
48208
- - string
48209
- - 'null'
48210
- description: >-
48211
- The last four characters of the API key, or `null` for OAuth
48212
- connections.
48213
- example: null
48214
- client_id:
48215
- type:
48216
- - string
48217
- - 'null'
48218
- description: >-
48219
- The client ID supplied for this connection. Only present when
48220
- `auth_method` is `client_credentials`.
48221
- example: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
48222
- client_secret_last_4:
48223
- type:
48224
- - string
48225
- - 'null'
48226
- description: >-
48227
- The last four characters of the client secret supplied for this
48228
- connection, or `null` when it can't be read. Only present when
48229
- `auth_method` is `client_credentials`.
48230
- example: cdef
48231
- config:
48232
- type: object
48233
- additionalProperties:
48234
- type: string
48235
- description: >-
48236
- The connection-level configuration values stored for this connection
48237
- — the fields the provider declares at `installation` scope,
48238
- excluding secret and undeclared fields. Returned for every
48239
- authentication method; empty when no stored values can be disclosed.
48240
- example:
48241
- instance_url: https://example.my.salesforce.com
48242
- state:
48243
- type: string
48244
- enum:
48245
- - connected
48246
- - needs_reauthorization
48247
- - disconnected
48248
- description: >-
48249
- The state of the connected account:
48250
-
48251
- - `connected`: The connection is active and tokens are valid.
48252
-
48253
- - `needs_reauthorization`: The user needs to reauthorize the
48254
- connection, typically because required scopes have changed.
48255
- `state_reason` explains why when WorkOS invalidated the connection
48256
- itself.
48257
-
48258
- - `disconnected`: The connection has been disconnected.
48259
- example: connected
48260
- established_by_user_id:
48261
- type:
48262
- - string
48263
- - 'null'
48264
- description: >-
48265
- The [User](/reference/authkit/user) whose authorization established
48266
- this connection. `null` when the connection is developer-managed or
48267
- its establisher is unknown, and when the establishing member lost
48268
- access to the organization — in which case `state_reason` is
48269
- `establishing_member_membership_ended`.
48270
- example: user_01EHZNVPK3SFK441A1RGBFSHRT
48271
- state_reason:
48272
- description: >-
48273
- Why WorkOS put the connection in its current `state`, or `null` when
48274
- there is no WorkOS-recorded reason:
48275
-
48276
- - `establishing_member_membership_ended`: The member who established
48277
- this organization-owned connection is no longer an active member of
48278
- the organization, so its credentials were cleared. An organization
48279
- admin must provide new credentials.
48280
-
48281
-
48282
- Additional values may be added; treat an unrecognized value as an
48283
- unknown reason.
48284
- example: null
48285
- oneOf:
48286
- - type: string
48287
- const: establishing_member_membership_ended
48288
- - type: 'null'
48289
- created_at:
48290
- type: string
48291
- description: The timestamp when the connection was created.
48292
- example: '2024-01-16T14:20:00.000Z'
48293
- updated_at:
48294
- type: string
48295
- description: The timestamp when the connection was last updated.
48296
- example: '2024-01-16T14:20:00.000Z'
48297
- warnings:
48298
- type: array
48299
- items:
48300
- type: object
48301
- properties:
48302
- code:
48303
- type: string
48304
- const: duplicate_account_display_name
48305
- message:
48306
- type: string
48307
- description: A human-readable explanation of the non-blocking warning.
48308
- example: >-
48309
- Another connection for this provider and owner has the same
48310
- label.
48311
- required:
48312
- - code
48313
- - message
48314
- description: >-
48315
- Non-blocking warnings about an explicitly supplied label. Only
48316
- writes return it, and only when another connection already uses the
48317
- label; reads omit it.
48318
- required:
48319
- - object
48320
- - id
48321
- - connection_role
48322
- - account_identifier
48323
- - account_display_name
48324
- - user_id
48325
- - organization_id
48326
- - scopes
48327
- - state
48328
- - created_at
48329
- - updated_at
48330
48645
  DataIntegrationsListResponse:
48331
48646
  type: object
48332
48647
  properties:
@@ -48446,6 +48761,29 @@ components:
48446
48761
  deprecated: true
48447
48762
  description: Use updated_at instead.
48448
48763
  connected_account:
48764
+ example: &ref_42
48765
+ object: connected_account
48766
+ id: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
48767
+ connection_role: compatibility
48768
+ account_identifier: workspace_123
48769
+ account_display_name: Acme production
48770
+ user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
48771
+ organization_id: null
48772
+ scopes:
48773
+ - repo
48774
+ - user:email
48775
+ auth_method: oauth
48776
+ api_key_last_4: null
48777
+ config: {}
48778
+ state: connected
48779
+ established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
48780
+ state_reason: null
48781
+ created_at: '2024-01-16T14:20:00.000Z'
48782
+ updated_at: '2024-01-16T14:20:00.000Z'
48783
+ userlandUserId: user_01EHZNVPK3SFK441A1RGBFSHRT
48784
+ organizationId: null
48785
+ createdAt: '2024-01-16T14:20:00.000Z'
48786
+ updatedAt: '2024-01-16T14:20:00.000Z'
48449
48787
  description: >-
48450
48788
  The user's compatibility [connected
48451
48789
  account](/reference/pipes/connected-account) for this
@@ -48912,6 +49250,7 @@ components:
48912
49250
  - organizationId
48913
49251
  - createdAt
48914
49252
  - updatedAt
49253
+ example: *ref_42
48915
49254
  description: >-
48916
49255
  The user's connected accounts for this provider in the
48917
49256
  requested ownership context. This contains only the