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

# Add Webhook/Websocket Tweet Filter Rule

> Add a tweet filter rule. Default rule is not activated.You must call update_rule to activate the rule.



## OpenAPI

````yaml POST /oapi/tweet_filter/add_rule
openapi: 3.0.1
info:
  title: TwitterAPI.io the most stable/fastest/cheapest twitter api.
  description: Provide the most stable/fastest/cheapest twitter api.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twitterapi.io
security:
  - ApiKeyAuth: []
paths:
  /oapi/tweet_filter/add_rule:
    post:
      description: >-
        Add a tweet filter rule. Default rule is not activated.You must call
        update_rule to activate the rule.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - tag
                - value
                - interval_seconds
              properties:
                tag:
                  type: string
                  description: >-
                    Custom tag to identify the rule.Must be set.Max length is
                    255
                value:
                  type: string
                  description: >-
                    Rule to filter tweets.eg "from:elonmusk OR
                    from:kaitoeasyapi".Must be set.Max length is 255
                interval_seconds:
                  type: number
                  description: >-
                    Interval (in seconds) to check tweets. Min 0.05, max 86400
                    (24h). Default 60 if omitted.
      responses:
        '200':
          description: Tweet filter rule add response
          content:
            application/json:
              schema:
                type: object
                properties:
                  rule_id:
                    type: string
                    description: ID of the added rule
                  status:
                    type: string
                    description: Status of the request.success or error
                    enum:
                      - success
                      - error
                  msg:
                    type: string
                    description: Message of the request.error message
                required:
                  - rule_id
                  - status
                  - msg
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````