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

# Add an IP to the blocklist

> Validates and adds an IPv4/IPv6 address to the org blocklist (de-duplicated via $addToSet). Invalidates the Redis blocklist cache and force-disconnects any active webchat sockets currently connected from that IP.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/organizations/{organizationId}/blocked-ips
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/organizations/{organizationId}/blocked-ips:
    post:
      tags:
        - Organizations
      summary: Add an IP to the blocklist
      description: >-
        Validates and adds an IPv4/IPv6 address to the org blocklist
        (de-duplicated via $addToSet). Invalidates the Redis blocklist cache and
        force-disconnects any active webchat sockets currently connected from
        that IP.
      operationId: post_organizations_organizationId_blocked_ips
      parameters:
        - in: path
          name: organizationId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddBlockedIPRequest'
      responses:
        '200':
          description: IP blocked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockedIPMutationResponse'
        '400':
          description: Invalid IP address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AddBlockedIPRequest:
      type: object
      properties:
        ip:
          type: string
          description: >-
            IPv4 or IPv6 address to add to the organization's blocklist; webchat
            requests from this address are rejected with the configured block
            message.
      required:
        - ip
      additionalProperties: true
      example:
        ip: 203.0.113.42
    BlockedIPMutationResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            blockedIPs:
              type: array
              items:
                type: string
          additionalProperties: true
      additionalProperties: true
      example:
        success: true
        message: IP blocked successfully
        data:
          blockedIPs:
            - 203.0.113.42
    OrganizationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
      additionalProperties: true
      example:
        error: Organization not found
        details: No organization exists with the provided id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````