> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postbreeze.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List connected channels

> Returns the social accounts you've connected — Instagram pages, TikTok profiles, LinkedIn accounts, and so on.

By default, you get accounts from every workspace your API key can reach. Each row tells you which workspace it belongs to, so you can group or filter them in your code. To narrow the list to one workspace, add `?workspaceId=…`.

Disconnected accounts are hidden — only active accounts (and ones with expired tokens that need reconnecting) come back.



## OpenAPI

````yaml /openapi.json get /social-accounts
openapi: 3.0.0
info:
  title: Postbreeze API
  description: >-
    Public REST API for scheduling and managing social posts. Authenticate every
    request with `Authorization: Bearer pb_live_…`. All endpoints are scoped to
    a single workspace; an API key issued for workspace A cannot access
    workspace B.
  version: 1.0.0
  contact: {}
servers:
  - url: http://localhost:4100/api/v1
security:
  - bearer: []
tags: []
paths:
  /social-accounts:
    get:
      tags:
        - Channels
      summary: List connected channels
      description: >-
        Returns the social accounts you've connected — Instagram pages, TikTok
        profiles, LinkedIn accounts, and so on.


        By default, you get accounts from every workspace your API key can
        reach. Each row tells you which workspace it belongs to, so you can
        group or filter them in your code. To narrow the list to one workspace,
        add `?workspaceId=…`.


        Disconnected accounts are hidden — only active accounts (and ones with
        expired tokens that need reconnecting) come back.
      operationId: SocialAccountsV1Controller_list
      parameters:
        - name: workspaceId
          required: false
          in: query
          description: >-
            Optional. When set, returns accounts in only this workspace. When
            omitted, returns accounts across every workspace the API key can
            reach.
          schema:
            type: string
      responses:
        '200':
          description: Connected channels visible to the caller, newest-connected first.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Prefixed cuid identifier of the connection.
                    workspaceId:
                      type: string
                      description: >-
                        Workspace this account is connected to. Returned on
                        every row so fan-out listings can be grouped client-side
                        without a second call.
                    platform:
                      type: string
                      enum:
                        - INSTAGRAM
                        - FACEBOOK_PAGE
                        - X
                        - LINKEDIN_PERSON
                        - LINKEDIN_COMPANY
                        - TIKTOK_BUSINESS
                        - TIKTOK_PERSONAL
                        - YOUTUBE
                        - PINTEREST
                        - THREADS
                        - BLUESKY
                      description: Which social platform this account lives on.
                    externalId:
                      type: string
                      description: >-
                        Stable per-platform identifier (e.g. an Instagram user
                        id). Combined with `(workspaceId, platform)` it's unique
                        across the system.
                    handle:
                      type: string
                      description: The account's user-facing handle (e.g. `@brand`).
                    displayName:
                      type: string
                      nullable: true
                      description: >-
                        Human-readable name. Some platforms (LinkedIn personal)
                        only surface a real display name post-OAuth; null when
                        unavailable.
                    avatarUrl:
                      type: string
                      nullable: true
                      description: Profile avatar URL when the platform provides one.
                    status:
                      type: string
                      enum:
                        - ACTIVE
                        - TOKEN_EXPIRED
                        - REVOKED
                        - DISCONNECTED
                      description: >-
                        Lifecycle status. `ACTIVE` is publishable;
                        `TOKEN_EXPIRED` needs a reconnect before the next
                        publish; `DISCONNECTED` rows are excluded from listings.
                    scopes:
                      description: >-
                        OAuth scopes the connection was granted. Used by the
                        publisher to fail fast when a needed scope is missing.
                      type: array
                      items:
                        type: string
                    connectedAt:
                      type: string
                      format: date-time
                      description: When the connection was first established.
                    lastRefreshedAt:
                      type: string
                      format: date-time
                      nullable: true
                      description: >-
                        Last successful token refresh. Null on accounts whose
                        platform issues non-expiring tokens.
                    tokenExpiresAt:
                      type: string
                      format: date-time
                      nullable: true
                      description: >-
                        When the current access token expires. Null when not
                        applicable.
                    lastRefreshAttemptAt:
                      type: string
                      format: date-time
                      nullable: true
                      description: >-
                        Last time the worker attempted to refresh tokens for
                        this account, even if it failed.
                    lastRefreshError:
                      type: string
                      nullable: true
                      description: >-
                        Latest token-refresh failure reason. Surfaced by the UI
                        to explain why a reconnect is required.
                    lastRefreshErrorStatus:
                      type: integer
                      nullable: true
                      description: >-
                        HTTP status code from the last failed refresh, when
                        known.
                    meta:
                      type: object
                      additionalProperties: true
                      nullable: true
                      description: >-
                        Free-form per-provider metadata (e.g. cached profile
                        fields, Pinterest default board id, X premium flag).
                    defaultBoardId:
                      type: string
                      nullable: true
                      description: >-
                        Pinterest only — pre-fills the compose board dropdown
                        when a default was picked at connect time.
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 400
                  code:
                    type: string
                    example: VALIDATION_FAILED
                  message:
                    type: string
                  requestId:
                    type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized
                  requestId:
                    type: string
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Your Postbreeze API key

````