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

# Create Filter

> Creates a new filter



## OpenAPI

````yaml POST /filter
openapi: 3.0.1
info:
  title: Ck IT Solutions API
  description: An API that can be used to mange Ck IT Solutions products and services.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.ck-itsolutions.nl/v1
security:
  - ApiKeyAuth: []
paths:
  /filter:
    post:
      description: Creates a new filter
      requestBody:
        description: Plant to add to the store
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/new_filter'
        required: true
      responses:
        '200':
          description: Returns newly created filters with uuid as json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list_rules'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    new_filter:
      allOf:
        - $ref: '#/components/schemas/list_rules'
        - required:
            - dst
            - port
            - filter
            - priority
          type: object
          properties:
            dst:
              description: >-
                Destination IP the filter needs to be created for (subnets
                supported).
              type: string
            src:
              description: Source IP the filter needs to match.
              type: object
              properties:
                start:
                  type: string
                  description: Start IP address for source IP range
                end:
                  type: string
                  description: End IP address for source IP range
            port:
              type: object
              properties:
                src:
                  type: object
                  properties:
                    start:
                      type: integer
                      description: Start port number for source port range
                    end:
                      type: integer
                      description: End port number for source port range
                dst:
                  type: object
                  properties:
                    start:
                      type: integer
                      description: Start port number for destination port range
                    end:
                      type: integer
                      description: End port number for destination port range
            priority:
              description: Rule priority with 1 being highest priority.
              type: integer
            filter:
              description: >-
                Filter ID, see DDoS Protection documentation for supported
                filters
              type: integer
            ratelimit:
              description: Ratelimit 1 - 25000
              type: integer
    list_rules:
      required:
        - name
      type: object
    Error:
      required:
        - error
        - message
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````