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

# List API keys

> Lists API keys for the active organization. Responses include `keyHint` rather than the full key value.



## OpenAPI

````yaml /api-reference/openapi.json get /api-keys
openapi: 3.1.0
info:
  title: Autoposting API
  description: >-
    Schedule, publish, and AI-enhance social content across X, LinkedIn,
    Instagram, Threads, and YouTube. All responses use the `{ "success":
    boolean, "data": ... }` envelope. Authenticate with an API key
    (`Authorization: Bearer sk-social-...` or `x-api-key: sk-social-...`).
  version: 1.0.0
servers:
  - url: https://app.autoposting.ai/api-proxy
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Agents
    description: >-
      Create and manage AI agents that autonomously generate and schedule
      content, trigger runs, inspect outputs, and track statistics.
  - name: API Keys
    description: >-
      Create, list, update, and revoke API keys for programmatic access to the
      Autoposting.ai API.
  - name: Auth
    description: >-
      Signup, login, logout, social login, profile management, email change, and
      session management.
  - name: Billing
    description: >-
      Manage subscriptions, credits, plan changes, billing history, and the
      customer portal.
  - name: Brands
    description: >-
      Create, list, update, delete, and reorder brands. Each brand maps to a set
      of social media accounts.
  - name: Carousels
    description: >-
      Create, manage, and AI-generate carousel posts for LinkedIn and other
      platforms.
  - name: Clips
    description: >-
      Upload, manage, render, and publish video clips, including multipart
      upload, AI candidate generation, and credit billing.
  - name: Knowledge Base
    description: >-
      Knowledge bases, document ingestion, semantic search, and AI content idea
      generation.
  - name: Notifications
    description: List, read, and manage in-app notifications and notification preferences.
  - name: Organizations
    description: >-
      Create, list, update, and delete organizations (workspaces), including a
      safeguarded deletion flow with a grace period.
  - name: Platform OAuth
    description: >-
      Connect social media accounts via OAuth and manage platform tokens for X,
      LinkedIn, Instagram, Threads, and YouTube.
  - name: Posts
    description: Create, manage, schedule, publish, and AI-enhance posts across platforms.
  - name: Teams
    description: >-
      Manage team members, invitations, invite links, permission groups,
      brand-level overrides, ownership transfers, and allowed email domains.
  - name: Usage
    description: >-
      Usage summaries, token breakdowns, feature access, onboarding progress,
      and account management endpoints.
  - name: Webhooks
    description: >-
      Configure outbound webhook endpoints to receive real-time event
      notifications from Autoposting.ai.
paths:
  /api-keys:
    get:
      tags:
        - API Keys
      summary: List API keys
      description: >-
        Lists API keys for the active organization. Responses include `keyHint`
        rather than the full key value.
      operationId: listApiKeys
      responses:
        '200':
          description: List of API keys.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
              example:
                success: true
                data:
                  - id: key_01HXYZ
                    name: CI/CD Pipeline Key
                    keyHint: ap_live_abc1...xyz7
                    scopes:
                      - posts:read
                      - posts:write
                      - brands:read
                    lastUsedAt: '2024-01-10T08:00:00Z'
                    expiresAt: null
                    createdAt: '2024-01-01T00:00:00Z'
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeysError'
              example:
                success: false
                error: unauthorized
                message: Missing or invalid API key.
components:
  schemas:
    ApiKey:
      type: object
      description: >-
        An API key and its metadata. The full `key` field is present only in the
        create response; list responses include `keyHint` instead.
      properties:
        id:
          type: string
          example: key_01HXYZ
        name:
          type: string
          example: CI/CD Pipeline Key
        key:
          type: string
          description: Full API key value. Returned only once, at creation time.
          example: ap_live_abc123xyz789...
        keyHint:
          type: string
          description: Truncated key value shown for identification in list responses.
          example: ap_live_abc1...xyz7
        scopes:
          type: array
          items:
            type: string
          example:
            - posts:read
            - posts:write
            - brands:read
        lastUsedAt:
          type:
            - string
            - 'null'
          format: date-time
          example: '2024-01-10T08:00:00Z'
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
          example: null
        createdAt:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-10T00:00:00Z'
    ApiKeysError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: unauthorized
        message:
          type: string
          example: Missing or invalid API key.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key as `Authorization: Bearer sk-social-...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API key as `x-api-key: sk-social-...`'

````