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

# List accounts

> List every connected social account in the workspaces the key can reach.

> [!NOTE]
>
> Needs `accounts:read`. See [Permissions](/docs/essentials/authentication.md#permissions).

Returns connected accounts in the workspaces the key can reach, as a list (not wrapped in `data`). Optionally filter with `workspace_id` and `provider` (alias `platform`). Posts take an account's `id` in `accounts[].id`.

Before posting, check four fields. `needs_reconnect` means the sign-in no longer works: the account can't post until someone reconnects it in PostSyncer, and a new post leaves it out. `platform_hold` means the network holds the account until its owner acts there; the sign-in still works. `renewal_failing` means it still posts, but only until `works_until`. `plan_allows_posting: false` means the owner's plan doesn't let new posts go to it (on Free, new posts go to 2 accounts, outside a first week): a post that names it is refused with `403` and `"limit": "free_accounts"`, so leave it out or save a draft. A post with no `accounts` leaves it out of the default accounts and lists it in `skipped_accounts`.

Pinterest accounts come with their `boards` (cached for 15 minutes). On the Free plan an owner can connect 2 accounts in all. When PostSyncer offers a first week, owners who sign up then get 10 accounts, unlimited posts and Analytics for their first 7 days. See [Plan limits](/docs/plan-limits.md#accounts-on-free).

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `accounts:read`, or its user is inactive. | No: grant it in Settings → API. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Get an account](/docs/api-reference/accounts/get.md): one account, with its scheduled posts.
* [Create a connect link](/docs/api-reference/accounts/connect-link.md): connect another account.
* [Account events](/docs/api-reference/webhooks/overview.md#other-events): `account.needs_reconnect`, `account.paused`, `account.expires_soon`.


## OpenAPI

````yaml GET /accounts
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /accounts:
    get:
      tags:
        - Accounts
      summary: List accounts
      description: >-
        Needs `accounts:read`. Connected accounts in the workspaces the key can
        reach, as a list (not wrapped in `data`). Optionally filter by
        `workspace_id` or `provider`. Pinterest accounts come with their
        `boards` (cached for 15 minutes). Check `needs_reconnect`,
        `platform_hold`, `renewal_failing` and `plan_allows_posting` before
        posting: they say which accounts can't post now or soon.
        `plan_allows_posting: false` means the owner's plan doesn't let new
        posts go to the account (on Free, new posts go to 2 accounts, outside a
        first week); a post that names it is refused with `403` and `limit:
        free_accounts`, and a post with no `accounts` leaves it out of the
        default accounts and lists it in `skipped_accounts`. On the Free plan an
        owner can connect 2 accounts in all. When PostSyncer offers a first
        week, owners who sign up then get 10 accounts, unlimited posts and
        Analytics for their first 7 days; each account's `plan_allows_posting`
        says what applies.
      operationId: listAccounts
      parameters:
        - name: workspace_id
          in: query
          required: false
          description: Filter accounts to one workspace.
          schema:
            type: integer
        - name: provider
          in: query
          required: false
          description: >-
            Filter by platform, one or more comma-separated: `tiktok`,
            `twitter`, `youtube`, `facebook`, `instagram`, `threads`,
            `linkedin`, `telegram`, `pinterest`, `bluesky`, `mastodon`,
            `google_business`. Alias: `platform`. An unknown value is refused
            with `422` naming the valid ones.
          schema:
            type: string
      responses:
        '200':
          description: The accounts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Account'
              examples:
                default:
                  summary: Four accounts of Halden Coffee
                  value:
                    - id: 301
                      workspace_id: 12
                      platform: instagram
                      username: haldencoffee
                      name: Halden Coffee
                      avatar: >-
                        https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                      has_expired: false
                      needs_reconnect: false
                      reconnect_reason: null
                      platform_hold: null
                      renewal_failing: null
                      sign_in_ends_at: null
                      profile_url: https://www.instagram.com/haldencoffee/
                      is_default: true
                      support_threads: false
                      is_verified: false
                      plan_allows_posting: true
                      analytics_unavailable: null
                      boards: []
                    - id: 302
                      workspace_id: 12
                      platform: linkedin
                      username: halden-coffee
                      name: Halden Coffee
                      avatar: >-
                        https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                      has_expired: false
                      needs_reconnect: false
                      reconnect_reason: null
                      platform_hold: null
                      renewal_failing: null
                      sign_in_ends_at: '2031-01-20T10:15:00+00:00'
                      profile_url: https://www.linkedin.com/company/88412345
                      is_default: true
                      support_threads: false
                      is_verified: false
                      plan_allows_posting: true
                      analytics_unavailable: null
                      is_page: true
                      boards: []
                    - id: 303
                      workspace_id: 12
                      platform: pinterest
                      username: haldencoffee
                      name: Halden Coffee
                      avatar: >-
                        https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                      has_expired: false
                      needs_reconnect: false
                      reconnect_reason: null
                      platform_hold: null
                      renewal_failing: null
                      sign_in_ends_at: null
                      profile_url: https://www.pinterest.com/haldencoffee/
                      is_default: false
                      support_threads: false
                      is_verified: false
                      plan_allows_posting: true
                      analytics_unavailable: null
                      boards:
                        - id: '987654321098765432'
                          name: Coffee at home
                          image_cover_url: https://cdn.postsyncer.com/examples/latte-art.jpg
                        - id: '987654321098765433'
                          name: Spring menu
                          image_cover_url: null
                    - id: 304
                      workspace_id: 12
                      platform: google_business
                      username: halden-coffee-harbourside
                      name: Halden Coffee · Harbourside
                      avatar: >-
                        https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                      has_expired: false
                      needs_reconnect: false
                      reconnect_reason: null
                      platform_hold: null
                      renewal_failing: null
                      sign_in_ends_at: null
                      profile_url: https://maps.google.com/?cid=4512345678901234567
                      is_default: false
                      support_threads: false
                      is_verified: false
                      plan_allows_posting: true
                      analytics_unavailable:
                        reason: google_business_no_post_stats
                        message: Google doesn't share numbers for single posts
                      location:
                        address: 22 Harbour Street, Bristol BS1 5TT
                        verified: true
                        can_post: true
                        maps_uri: https://maps.google.com/?cid=4512345678901234567
                        new_review_uri: >-
                          https://search.google.com/local/writereview?placeid=EXAMPLE_PLACE_ID
                      boards: []
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: The key lacks `accounts:read`, or its user is inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks accounts:read
                  value:
                    message: >-
                      This API key does not have the "accounts:read" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '422':
          description: >-
            An unknown `provider` (or `platform`). `errors` names the valid
            values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                unknown_provider:
                  summary: A platform name with a typo
                  value:
                    message: >-
                      Unknown provider: tiktokk. Use one or more of: tiktok,
                      twitter, youtube, facebook, instagram, threads, linkedin,
                      telegram, pinterest, bluesky, mastodon, google_business
                      (comma-separated).
                    errors:
                      provider:
                        - >-
                          Unknown provider: tiktokk. Use one or more of: tiktok,
                          twitter, youtube, facebook, instagram, threads,
                          linkedin, telegram, pinterest, bluesky, mastodon,
                          google_business (comma-separated).
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    Account:
      type: object
      description: A connected social account.
      required:
        - id
        - workspace_id
        - platform
        - username
        - name
        - avatar
        - has_expired
        - needs_reconnect
        - reconnect_reason
        - platform_hold
        - renewal_failing
        - sign_in_ends_at
        - profile_url
        - is_default
        - support_threads
        - is_verified
        - plan_allows_posting
        - analytics_unavailable
      properties:
        id:
          type: integer
          description: The account's id. Posts take it in `accounts[].id`.
        workspace_id:
          type: integer
        platform:
          type: string
          enum:
            - twitter
            - linkedin
            - instagram
            - facebook
            - tiktok
            - youtube
            - threads
            - pinterest
            - bluesky
            - telegram
            - mastodon
            - google_business
          description: >-
            The network. `twitter` is X; `google_business` is Google Business
            Profile.
        username:
          type: string
          nullable: true
          description: >-
            The handle on the network, without `@` (a Mastodon handle includes
            its server).
        name:
          type: string
          nullable: true
          description: The display name on the network.
        avatar:
          type: string
          description: >-
            The profile picture, or an avatar made from the name when there is
            none.
        has_expired:
          type: boolean
          description: The same as `needs_reconnect`, kept for older integrations.
        needs_reconnect:
          type: boolean
          description: >-
            True when the sign-in no longer works, so the account can't post
            until someone reconnects it in PostSyncer. A new post leaves it out
            and lists it in `skipped_accounts`.
        reconnect_reason:
          type: string
          nullable: true
          description: >-
            The network's reason the account needs reconnecting, when it gave
            one. Null when `needs_reconnect` is false.
        platform_hold:
          type: object
          nullable: true
          description: >-
            Set when the network holds the account until its owner acts there
            (an identity check, a lock, a suspension, a restriction, the bot
            removed from a channel). The sign-in still works, so no reconnect is
            needed: posts to it fail with the network's reason until the hold is
            resolved there, and trying a failed post again asks the network
            again. Null when not held.
          required:
            - reason
            - scope
            - since
            - next_check_at
          properties:
            reason:
              type: string
              nullable: true
              description: The network's own words.
            scope:
              type: string
              nullable: true
              enum:
                - publish
                - all
                - null
              description: >-
                `publish`: only posting is held. `all`: everything the account
                does is.
            since:
              type: string
              format: date-time
              nullable: true
              description: When the network first refused.
            next_check_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                When PostSyncer asks the network again (every 3 hours). Null
                while a retry is letting posts through.
        renewal_failing:
          type: object
          nullable: true
          description: >-
            Set when the network refused to renew a sign-in that still works.
            The account keeps posting until `works_until`; if the renewal is
            still refused then, it needs a reconnect. Null when renewals are
            fine.
          required:
            - reason
            - since
            - works_until
          properties:
            reason:
              type: string
              nullable: true
              description: The network's reason for refusing.
            since:
              type: string
              format: date-time
              nullable: true
              description: When the renewal was first refused.
            works_until:
              type: string
              format: date-time
              nullable: true
              description: >-
                When the sign-in stops working. Reconnect the account before
                then.
        sign_in_ends_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the network ends this sign-in whatever PostSyncer does
            (LinkedIn: a year after it was connected). Reconnect the account
            before then. Null when the network doesn't say.
        profile_url:
          type: string
          nullable: true
          description: >-
            The account's own page on its network. Null when PostSyncer can't
            make one, for example a Mastodon account without its server, or a
            Telegram channel with no public name.
        is_default:
          type: boolean
          description: Whether the account is picked by default for new posts.
        support_threads:
          type: boolean
          nullable: true
          description: >-
            Whether a post can be a thread of several parts on this network (X,
            Threads, Bluesky and Mastodon).
        is_verified:
          type: boolean
          nullable: true
          description: >-
            Whether the network marks the account verified (X only; false
            elsewhere).
        plan_allows_posting:
          type: boolean
          description: >-
            False when the owner's plan doesn't let new posts go to this account
            (Free outside a first week: 2 picked accounts). Drafts, replies and
            analytics still work.
        can_publish_articles:
          type: boolean
          description: >-
            X accounts only: true when X lets the account publish Articles (X
            Premium or Premium+). Absent for other networks.
        analytics_unavailable:
          type: object
          nullable: true
          description: >-
            Why this account's post numbers can't be read, or null when they
            can. Its posts' numbers are not read meanwhile.
          required:
            - reason
            - message
          properties:
            reason:
              type: string
              enum:
                - x_private
                - linkedin_reconnect
                - pinterest_not_business
                - google_business_no_post_stats
                - telegram_private
              description: >-
                `x_private`: a private X account. `linkedin_reconnect`: a
                LinkedIn profile on the older connection; reconnect it.
                `pinterest_not_business`: not a Pinterest business account.
                `google_business_no_post_stats`: Google gives numbers for a
                location, never for one post. `telegram_private`: a private
                Telegram channel shows no views (subscribers are still counted).
            message:
              type: string
              description: The same, in words to show a person.
        is_page:
          type: boolean
          description: >-
            LinkedIn accounts only: true for a Company Page, false for a person.
            Absent for other networks.
        location:
          type: object
          description: >-
            Google Business Profile accounts only: the location this account is.
            Absent for other networks.
          required:
            - address
            - verified
            - can_post
            - maps_uri
            - new_review_uri
          properties:
            address:
              type: string
              nullable: true
            verified:
              type: boolean
              description: Whether Google verified the location.
            can_post:
              type: boolean
              description: Whether Google lets the location publish posts.
            maps_uri:
              type: string
              nullable: true
              description: The location on Google Maps.
            new_review_uri:
              type: string
              nullable: true
              description: The link that opens Google's form for a new review.
        boards:
          type: array
          description: >-
            List accounts and Get account only. A Pinterest account's boards,
            read from Pinterest; `[]` for other networks, and when Pinterest
            can't be read. Pass a board's `id` as `accounts[].settings.board_id`
            on a post.
          items:
            type: object
            required:
              - id
              - name
              - image_cover_url
            properties:
              id:
                type: string
                nullable: true
              name:
                type: string
              image_cover_url:
                type: string
                nullable: true
        playlists:
          type: array
          nullable: true
          description: >-
            Get account only. A YouTube channel's own playlists, read from
            YouTube, up to 500. `[]` for other networks and when
            `playlists_reconnect` is `true`. `null` when YouTube didn't answer:
            the channel may still have playlists, so try again later. Pass a
            playlist's `id` as `accounts[].settings.playlist_id` on a post to
            add the video to it.
          items:
            type: object
            required:
              - id
              - title
              - privacy_status
              - video_count
            properties:
              id:
                type: string
              title:
                type: string
              privacy_status:
                type: string
                nullable: true
                enum:
                  - public
                  - unlisted
                  - private
                  - null
                description: Who can see the playlist.
              video_count:
                type: integer
                nullable: true
                description: How many videos it holds.
        playlists_reconnect:
          type: boolean
          description: >-
            Get account only. `true` for a YouTube channel that must be
            reconnected to list its playlists and add videos to them: it was
            connected before PostSyncer asked YouTube for that permission, or
            its sign-in no longer works. `false` for every other account.
        scheduled_posts:
          type: object
          description: >-
            Get account only. Scheduled posts still to go out to this account.
            Deleting the account moves the ones that go only to it to drafts
            (they keep their time); the others still go to their other accounts.
          required:
            - total
            - only_this_account
          properties:
            total:
              type: integer
            only_this_account:
              type: integer
              description: The ones with no other account.
        posts_to_put_back:
          type: object
          nullable: true
          description: >-
            Get account only. Set when this profile was disconnected and
            connected again to the same workspace, and posts it was on can get
            it back with [Put back account
            posts](/api-reference/accounts/put-back-posts). Null otherwise.
          required:
            - posts
            - counts
            - relinked
            - disconnected_at
          properties:
            posts:
              type: integer
              description: Posts that would get the account back.
            counts:
              $ref: '#/components/schemas/PutBackCounts'
            relinked:
              type: integer
              description: >-
                Published posts already linked to the account again, with their
                link, numbers and comments. That happens on its own at the
                reconnect and sends nothing.
            disconnected_at:
              type: string
              format: date-time
              nullable: true
              description: When the profile was disconnected.
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
    PutBackCounts:
      type: object
      description: >-
        Posts by what putting back does with them (all 11 are always there):
        `scheduled_again` (a draft the disconnect took off the schedule,
        unchanged since, scheduled again at its time), `added_to_scheduled`
        (scheduled or waiting for approval: the account is added, the time
        stays), `added_to_draft` (a draft stays a draft),
        `added_to_draft_time_passed` and `added_to_draft_changed` (taken off the
        schedule by the disconnect, but its time passed or it was edited since,
        so it stays a draft), `added_to_draft_refused` (kept a draft because the
        plan's post limit refused scheduling it), `skipped_deleted`,
        `skipped_already_there`, `skipped_went_out` (published, failed or
        sending), `skipped_time_passed` (due within 5 minutes), and `not_done`
        (an error stopped it; calling again tries it again).
      required:
        - scheduled_again
        - added_to_scheduled
        - added_to_draft
        - added_to_draft_time_passed
        - added_to_draft_changed
        - added_to_draft_refused
        - skipped_deleted
        - skipped_already_there
        - skipped_went_out
        - skipped_time_passed
        - not_done
      properties:
        scheduled_again:
          type: integer
        added_to_scheduled:
          type: integer
        added_to_draft:
          type: integer
        added_to_draft_time_passed:
          type: integer
        added_to_draft_changed:
          type: integer
        added_to_draft_refused:
          type: integer
        skipped_deleted:
          type: integer
        skipped_already_there:
          type: integer
        skipped_went_out:
          type: integer
        skipped_time_passed:
          type: integer
        not_done:
          type: integer
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.