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

# List connect links

> See the workspace's connect links: who made each, its networks, who it was sent to, and whether it was used.

> [!NOTE]
>
> Needs `accounts:create`, as [making a link](/docs/api-reference/accounts/connect-link.md) does, and a role in the workspace that can add accounts (owner or admin). See [Permissions](/docs/essentials/authentication.md#permissions).

Lists the workspace's connect links, 50 a page by default (`per_page` up to 100), newest first, in `data`, with `links` and `meta` (`meta.total` counts them all). It is the same list as **Connect links** under the accounts in the app.

Each link has its networks (`providers`) and the ones connected through it so far (`connected_providers`), who made it (`made_by`), the address the app emailed it to (`sent_to`, null for a link that was only copied), and its dates. `state` says what it is now:

| `state` | Meaning |
| - | - |
| `open` | It still works. Its `url` is the page to send. |
| `used` | Each of its networks was connected (`used_at`). |
| `expired` | Its 7 days are over. |
| `revoked` | Someone took it back with [Revoke a connect link](/docs/api-reference/accounts/revoke-connect-link.md) (`revoked_at`). |
| `stopped` | Whoever made it left the workspace or can no longer add accounts there, so it doesn't work. Make a new link. It works again if they come back with a role that can add accounts, unless you revoke it. |

`url` is null unless the link is open. A link stays on the list for 30 days after it expired, then it is deleted.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `accounts:create`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role in the workspace can't add accounts. | No. |
| 422 | | `workspace_id` is missing or isn't a workspace the key can reach, or a `per_page` outside 1 to 100 or a `page` below 1. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Create a connect link](/docs/api-reference/accounts/connect-link.md): make one.
* [Revoke a connect link](/docs/api-reference/accounts/revoke-connect-link.md): take one back.


## OpenAPI

````yaml GET /accounts/connect-links
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 14 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/connect-links:
    get:
      tags:
        - Accounts
      summary: List connect links
      description: >-
        Needs `accounts:create`. Your role in the workspace must also let you
        add accounts, as for making a link. A page of the workspace's connect
        links, newest first (`per_page` and `page`, with `links` and `meta` as
        the other paged lists): the networks each connects and which were
        connected, whether it is `open`, `used`, `expired`, `revoked` or
        `stopped`, who made it, the address the app emailed it to, and its
        dates. An open link has its `url`. A `stopped` link doesn't work because
        whoever made it left the workspace or can no longer add accounts there:
        make a new one rather than send it. A link stays on the list for 30 days
        after it expired. Links the PostSyncer connector's sign-in made for the
        owner's own first account aren't listed.
      operationId: listAccountConnectLinks
      parameters:
        - name: workspace_id
          in: query
          required: true
          description: The workspace whose links to read.
          schema:
            type: integer
          example: 12
        - name: per_page
          in: query
          required: false
          description: 1 to 100. Default 50.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: page
          in: query
          required: false
          description: The page, from 1.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: A page of the links.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - links
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ListedConnectLink'
                  links:
                    $ref: '#/components/schemas/PaginationLinks'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
              examples:
                default:
                  summary: An open link and a used one
                  value:
                    data:
                      - id: 346
                        workspace_id: 12
                        providers:
                          - instagram
                          - tiktok
                        connected_providers:
                          - instagram
                        mastodon_instance: null
                        state: open
                        made_by:
                          id: 7
                          name: Sara Halden
                        sent_to: client@example.com
                        created_at: '2030-03-15T09:00:00+00:00'
                        expires_at: '2030-03-22T09:00:00+00:00'
                        used_at: null
                        revoked_at: null
                        url: >-
                          https://app.postsyncer.com/connect/invite?token=CONNECT_TOKEN&provider=instagram
                      - id: 345
                        workspace_id: 12
                        providers:
                          - tiktok
                        connected_providers:
                          - tiktok
                        mastodon_instance: null
                        state: used
                        made_by:
                          id: 7
                          name: Sara Halden
                        sent_to: null
                        created_at: '2030-03-14T09:00:00+00:00'
                        expires_at: '2030-03-21T09:00:00+00:00'
                        used_at: '2030-03-14T11:20:00+00:00'
                        revoked_at: null
                        url: null
                    links:
                      first: >-
                        https://api.postsyncer.com/api/v1/accounts/connect-links?page=1
                      last: >-
                        https://api.postsyncer.com/api/v1/accounts/connect-links?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                        - url: null
                          label: '&laquo; Previous'
                          page: null
                          active: false
                        - url: >-
                            https://api.postsyncer.com/api/v1/accounts/connect-links?page=1
                          label: '1'
                          page: 1
                          active: true
                        - url: null
                          label: Next &raquo;
                          page: null
                          active: false
                      path: https://api.postsyncer.com/api/v1/accounts/connect-links
                      per_page: 50
                      to: 2
                      total: 2
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `accounts:create`, its user is inactive, or your role
            in the workspace can't add accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks accounts:create
                  value:
                    message: >-
                      This API key does not have the "accounts:create"
                      permission. Edit the key in PostSyncer under Settings →
                      API to grant it.
                role:
                  summary: The role can't add accounts
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to create accounts. Ask the workspace owner or an
                      admin to do it, or to change your role.
        '422':
          description: >-
            `workspace_id` is missing or isn't a workspace the key can reach, or
            `per_page` or `page` is out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                workspace_id:
                  summary: Not a workspace the key can reach
                  value:
                    message: Invalid workspace ID.
                    errors:
                      workspace_id:
                        - Invalid workspace ID.
        '429':
          $ref: '#/components/responses/RateLimited429'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://postsyncer.com/api/v1/accounts/connect-links?workspace_id=12' \
              --header 'Authorization: Bearer <token>'
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {Authorization: 'Bearer
            <token>'}};


            fetch('https://postsyncer.com/api/v1/accounts/connect-links?workspace_id=12',
            options)
              .then(res => res.json())
              .then(res => console.log(res))
              .catch(err => console.error(err));
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://postsyncer.com/api/v1/accounts/connect-links?workspace_id=12"


            headers = {"Authorization": "Bearer <token>"}


            response = requests.get(url, headers=headers)


            print(response.text)
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://postsyncer.com/api/v1/accounts/connect-links?workspace_id=12",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer <token>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
components:
  schemas:
    ListedConnectLink:
      type: object
      description: A connect link as the workspace's list shows it.
      required:
        - id
        - workspace_id
        - providers
        - connected_providers
        - mastodon_instance
        - state
        - made_by
        - sent_to
        - created_at
        - expires_at
        - used_at
        - revoked_at
        - url
      properties:
        id:
          type: integer
        workspace_id:
          type: integer
        providers:
          type: array
          items:
            type: string
          description: The networks it connects, one connect each.
        connected_providers:
          type: array
          items:
            type: string
          description: The networks connected through it so far.
        mastodon_instance:
          type: string
          nullable: true
        state:
          type: string
          enum:
            - open
            - used
            - expired
            - revoked
            - stopped
          description: >-
            `open`: it still works. `used`: each of its networks was connected.
            `expired`: its 7 days are over. `revoked`: someone took it back.
            `stopped`: whoever made it left the workspace or can no longer add
            accounts there, so it doesn't work; make a new link.
        made_by:
          type: object
          nullable: true
          description: Who made it; null once their PostSyncer account is deleted.
          required:
            - id
            - name
          properties:
            id:
              type: integer
            name:
              type: string
        sent_to:
          type: string
          nullable: true
          description: >-
            The address the app emailed it to; null for a link that was only
            copied.
        created_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        used_at:
          type: string
          format: date-time
          nullable: true
          description: When the last of its networks was connected.
        revoked_at:
          type: string
          format: date-time
          nullable: true
        url:
          type: string
          nullable: true
          description: >-
            The page to send, while the link is open; null otherwise, a stopped
            link's too.
    PaginationLinks:
      type: object
      description: Links to the list's first, last, previous and next pages.
      required:
        - first
        - last
        - prev
        - next
      properties:
        first:
          type: string
        last:
          type: string
        prev:
          type: string
          nullable: true
          description: Null on the first page.
        next:
          type: string
          nullable: true
          description: Null on the last page.
    PaginationMeta:
      type: object
      description: Where this page sits in the whole list.
      required:
        - current_page
        - from
        - last_page
        - links
        - path
        - per_page
        - to
        - total
      properties:
        current_page:
          type: integer
        from:
          type: integer
          nullable: true
          description: >-
            The position of this page's first item in the list; null when the
            page is empty.
        last_page:
          type: integer
        links:
          type: array
          description: 'A pager: previous, the page numbers, next.'
          items:
            type: object
            required:
              - url
              - label
              - active
            properties:
              url:
                type: string
                nullable: true
              label:
                type: string
              page:
                type: integer
                nullable: true
              active:
                type: boolean
        path:
          type: string
          description: The list's URL without the query.
        per_page:
          type: integer
        to:
          type: integer
          nullable: true
          description: >-
            The position of this page's last item in the list; null when the
            page is empty.
        total:
          type: integer
          description: Items in the whole list.
    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
  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.