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

# List post filters

> Returns the available filter keys and their valid values for post search. Use this to discover what filters your team can apply before calling POST /posts/search.

<Tip>Call this first when building a filter UI. The response tells you exactly which filter keys exist and what values are valid for each.</Tip>


## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/posts/filters
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/posts/filters:
    get:
      tags:
        - Posts
      summary: List post filters
      description: >-
        Returns the available filter keys and their valid values for post
        search. Use this to discover what filters your team can apply before
        calling POST /posts/search.
      operationId: listPostFilters
      responses:
        '200':
          description: Available post filters
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - filters
                    properties:
                      filters:
                        type: array
                        items:
                          $ref: '#/components/schemas/PostFilter'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          description: Filter discovery request timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: FILTER_LOOKUP_TIMEOUT
                  message: Filter discovery request timed out
      security:
        - bearerAuth: []
components:
  schemas:
    PostFilter:
      type: object
      required:
        - key
        - displayName
        - values
      properties:
        key:
          type: string
          example: templateType
        displayName:
          type: string
          example: Template Type
        values:
          type: array
          items:
            $ref: '#/components/schemas/PostFilterValueOption'
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
    PostFilterValueOption:
      type: object
      required:
        - key
        - displayName
      properties:
        key:
          type: string
          example: scorecard
        displayName:
          type: string
          example: Scorecard
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````