---
descriptions:
  pipes_connected_account:
    object: Distinguishes the connected account object.
    id: The unique identifier of the connected account.
    user_id: >-
      The [User](/reference/authkit/user) identifier associated with this
      connection.
    organization_id: >-
      The [Organization](/reference/organization) identifier associated with
      this connection, or `null` if not scoped to an organization.
    scopes: The OAuth scopes granted for this connection.
    state: >
      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 scopes have changed.

      - `disconnected`: The connection has been disconnected.
    created_at: The timestamp when the connection was created.
    updated_at: The timestamp when the connection was last updated.
reference:
  curl:
    - url: /reference/pipes/connected-account
      key: pipes_connected_account
      id: pipes_connected_account
      title: connected_account
      properties:
        - key: object
          type: '"connected_account"'
          description: (pipes_connected_account.object)
        - key: id
          type: string
          description: (pipes_connected_account.id)
        - key: user_id
          type: string | null
          description: (pipes_connected_account.user_id)
        - key: organization_id
          type: string | null
          description: (pipes_connected_account.organization_id)
        - key: scopes
          type: 'string[]'
          description: (pipes_connected_account.scopes)
        - key: state
          type: '"connected" | "needs_reauthorization" | "disconnected"'
          description: (pipes_connected_account.state)
        - key: created_at
          type: string
          description: (pipes_connected_account.created_at)
        - key: updated_at
          type: string
          description: (pipes_connected_account.updated_at)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/pipes/connected-account/index.mdx
---

# Connected Account

A connected account represents a user's authorized connection to a third-party [provider](/reference/pipes/provider) through Pipes. Connected accounts store the OAuth credentials and scopes granted during the authorization flow.

When listing providers for a user, each provider includes a nested `connected_account` showing the user's connection status.

<CodeBlock
  title="Connected Account"
  referenceId="pipes_connected_account"
  file="connected-account"
/>
