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

> Add a phone number, email address or WhatsApp user id to the do-not-contact list, optionally until a date. Idempotent and only ever strengthens an existing block.

# Block an address from outbound contact



## OpenAPI

````yaml post /outbound/blocklist
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /outbound/blocklist:
    post:
      summary: Block an address from outbound contact
      description: >-
        Adds a phone number, email address, or WhatsApp user id to the
        do-not-contact list. Sequences will not contact a blocked address on any
        channel.


        Safe to call repeatedly — blocking an address that is already blocked
        updates the existing entry instead of failing, so retrying a queued job
        is harmless.


        Blocking only ever strengthens: re-blocking an address never shortens an
        existing expiry and never makes a permanent block temporary. Use the
        unblock endpoint to lift a block.
      operationId: addToOutboundBlocklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddToOutboundBlocklistDto'
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutboundBlocklistEntryDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    AddToOutboundBlocklistDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/AddToOutboundBlocklistDtoInput'
      type: object
      properties:
        identity_type:
          type: string
          enum:
            - phone
            - email
            - whatsapp_user_id
          description: >-
            What kind of address this is. "phone" is stored in international
            format, "email" is lowercased, and "whatsapp_user_id" is the
            WhatsApp id of a contact whose phone number is hidden.
        identity_value:
          type: string
          minLength: 1
          maxLength: 320
          description: The address itself — e.g. "+962790007001" or "lead@example.com".
        reason:
          description: Why this address is being blocked. Stored for your own auditing.
          type: string
          maxLength: 500
        expires_at:
          description: >-
            When the block should lift automatically, as an ISO 8601 timestamp.
            Must be in the future. Omit for a permanent block.
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
      required:
        - identity_type
        - identity_value
    OutboundBlocklistEntryDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/OutboundBlocklistEntryDto'
      type: object
      properties:
        id:
          type: string
        identity_type:
          type: string
          description: '"phone", "email" or "whatsapp_user_id".'
        identity_value:
          type: string
          description: The address, as we stored it after normalizing.
        channel:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The channel this entry covers. Null means every channel — that is
            what entries added through this API always are. A specific channel
            appears when someone opted out of that channel alone.
        reason:
          type: string
          description: Why the address was blocked.
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Where the entry came from. "api" is one you added. Anything else was
            recorded when the person opted out themselves, and is not removable
            by default.
        created_at:
          type: string
          format: date-time
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the block lifts automatically. Null means it never does.
      required:
        - id
        - identity_type
        - identity_value
        - channel
        - reason
        - source
        - created_at
        - expires_at
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````