WorkOS · Schema
ConnectedAccount
AuthenticationIdentity ProviderSSOSAMLOIDCSCIMDirectory SyncAuthorizationFGAAudit LogsMFAB2B SaaSAgentsMCP
Properties
| Name | Type | Description |
|---|---|---|
| object | string | Distinguishes the connected account object. |
| id | string | The unique identifier of the connected account. |
| user_id | stringnull | The [User](/reference/authkit/user) identifier associated with this connection. |
| organization_id | stringnull | The [Organization](/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. |
| scopes | array | The OAuth scopes granted for this connection. |
| state | string | The state of the connected account: - `connected`: The connection is active and tokens are valid. - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required sc |
| created_at | string | The timestamp when the connection was created. |
| updated_at | string | The timestamp when the connection was last updated. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/ConnectedAccount",
"title": "ConnectedAccount",
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Distinguishes the connected account object.",
"const": "connected_account"
},
"id": {
"type": "string",
"description": "The unique identifier of the connected account.",
"example": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
},
"user_id": {
"type": [
"string",
"null"
],
"description": "The [User](/reference/authkit/user) identifier associated with this connection.",
"example": "user_01EHZNVPK3SFK441A1RGBFSHRT"
},
"organization_id": {
"type": [
"string",
"null"
],
"description": "The [Organization](/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization.",
"example": null
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The OAuth scopes granted for this connection.",
"example": [
"repo",
"user:email"
]
},
"state": {
"type": "string",
"enum": [
"connected",
"needs_reauthorization",
"disconnected"
],
"description": "The state of the connected account:\n- `connected`: The connection is active and tokens are valid.\n- `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed.\n- `disconnected`: The connection has been disconnected.",
"example": "connected"
},
"created_at": {
"type": "string",
"description": "The timestamp when the connection was created.",
"example": "2024-01-16T14:20:00.000Z"
},
"updated_at": {
"type": "string",
"description": "The timestamp when the connection was last updated.",
"example": "2024-01-16T14:20:00.000Z"
}
},
"required": [
"object",
"id",
"user_id",
"organization_id",
"scopes",
"state",
"created_at",
"updated_at"
]
}