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

# Utworzenie filtra

> Tworzy nowy filtr obwieszczeń. Zawartość (`content`) to listy identyfikatorów (NIP, KRS, PESEL, nazwy, sygnatury). Limit pozycji oraz liczba filtrów przypadająca na konto zależy od abonamentu.



## OpenAPI

````yaml /openapi.json post /v1/filters
openapi: 3.1.0
info:
  title: krdata API
  description: >

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, biała lista VAT)

    w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API przekazywany w nagłówku
    `x-api-key`.

    Limity zapytań oraz dzienne pule (PDF, WPV, raporty) wynikają z wybranego
    abonamentu —

    szczegóły zwraca endpoint `GET /v1/usage/summary`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/filters:
    post:
      tags:
        - Filters
      summary: Utworzenie filtra
      description: >-
        Tworzy nowy filtr obwieszczeń. Zawartość (`content`) to listy
        identyfikatorów (NIP, KRS, PESEL, nazwy, sygnatury). Limit pozycji oraz
        liczba filtrów przypadająca na konto zależy od abonamentu.
      operationId: filters-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    FilterCreate:
      properties:
        name:
          type: string
          title: Name
        content:
          $ref: '#/components/schemas/FilterContent'
      type: object
      required:
        - name
        - content
      title: FilterCreate
    FilterOut:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        content:
          $ref: '#/components/schemas/FilterContent'
        item_count:
          type: integer
          title: Item Count
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - content
        - item_count
        - created_at
        - updated_at
      title: FilterOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FilterContent:
      properties:
        krs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Nip
        regon:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Regon
        pesel:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Pesel
        krz_signature:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Krz Signature
        msig_signature:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Msig Signature
        name:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Name
        subject_id:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Subject Id
      type: object
      title: FilterContent
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````