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

# List API keys

> List your API keys, without the keys themselves.

> [!NOTE]
>
> Needs `api_keys:read`, and you must own a workspace: API keys are the workspace owner's, as in Settings → API. See [Permissions](https://docs.postsyncer.com/essentials/authentication.md#permissions).

Lists your API keys, oldest first, in `data`. Each has its `name`, its `permissions` as `resource:action` (a key from before permissions existed lists what its old scopes cover), `has_all_permissions`, when it was made, last used and stops working, and `current: true` on the key this request used. Not paged.

The keys themselves are never shown: a key is shown once, when it is made in the app. No route makes or edits a key; that is done in the app, under Settings → API.

## Errors

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

## Related

* [Delete an API key](https://docs.postsyncer.com/api-reference/api-keys/delete.md): stop a key working.
* [Permissions](https://docs.postsyncer.com/essentials/authentication.md#permissions): what each permission allows.


## OpenAPI

````yaml GET /api-keys
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:
  /api-keys:
    get:
      tags:
        - API keys
      summary: List API keys
      description: >-
        Needs `api_keys:read`. You must also own a workspace: API keys are the
        workspace owner's, as in Settings → API. Lists your API keys, oldest
        first, in `data`: each one's name, permissions and dates, and `current:
        true` on the key this request used. The keys themselves are never shown;
        a key is shown once, when it is made in the app. Not paged. Every plan.
      operationId: listApiKeys
      responses:
        '200':
          description: Your API keys.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
              examples:
                default:
                  summary: Two keys
                  value:
                    data:
                      - id: 118
                        name: Zapier
                        permissions:
                          - accounts:read
                          - posts:read
                          - posts:create
                        has_all_permissions: false
                        last_used_at: '2030-03-14T09:20:11.000000Z'
                        created_at: '2030-02-01T12:00:00.000000Z'
                        expires_at: null
                        has_signing_secret: false
                        current: false
                      - id: 131
                        name: Monthly report script
                        permissions:
                          - workspaces:read
                          - analytics:read
                        has_all_permissions: false
                        last_used_at: '2030-03-15T07:02:45.000000Z'
                        created_at: '2030-03-01T08:30:00.000000Z'
                        expires_at: '2031-03-01T00:00:00.000000Z'
                        has_signing_secret: false
                        current: true
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `api_keys:read`, its user is inactive, or you don't
            own a workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks api_keys:read
                  value:
                    message: >-
                      This API key does not have the "api_keys:read" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                not_owner:
                  summary: You don't own a workspace
                  value:
                    message: Only a workspace owner can see or delete API keys.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    ApiKey:
      type: object
      description: An API key, without the key itself.
      required:
        - id
        - name
        - permissions
        - has_all_permissions
        - last_used_at
        - created_at
        - expires_at
        - has_signing_secret
        - current
      properties:
        id:
          type: integer
        name:
          type: string
        permissions:
          type: array
          items:
            type: string
          description: >-
            What the key may do, as `resource:action` permissions. A key made
            before permissions existed lists what its old scopes cover.
        has_all_permissions:
          type: boolean
          description: True for a key with every permission, including ones added later.
        last_used_at:
          type: string
          format: date-time
          nullable: true
          description: Null until it is used.
        created_at:
          type: string
          format: date-time
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: Null for a key that never stops working.
        has_signing_secret:
          type: boolean
          description: Whether the key has a signing secret, for OAuth delegation.
        current:
          type: boolean
          description: True for the key this request used.
    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).
  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.