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

# Unblock several blacklist entries

> Send exactly one of three forms:

- `ids`: each entry is unblocked on its own and reported in `results`; one the user cannot see fails with
`RESOURCE_NOT_FOUND` without stopping the others. An entry that is no longer active fails with
`CHANNEL_BLACKLIST_ENTRY_NOT_ACTIVE`.
- `select_all` with the list's filters in `filters` (the parameters of `GET /channel-blacklists`), minus
`except_ids`: runs in the background and answers with `queued` and the number of entries. Entries created
after the request are left out, and the user gets a `conversation_bulk_operation` notification with how many
blocks were lifted and how many were skipped, by error code.
- the criteria `channel_id`, `customer_id`, `reasons`, `blocked_before`, `expired_only` (at least one): lifts
the active blocks matching all of them and answers with their `count`.

Each lifted block is broadcast to the open chat screens like a single unblock.



## OpenAPI

````yaml /api-referansi/openapi.json post /v1/channel-blacklists/bulk-unblock
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/channel-blacklists/bulk-unblock:
    post:
      tags:
        - ChannelBlacklist
      summary: Unblock several blacklist entries
      description: >-
        Send exactly one of three forms:


        - `ids`: each entry is unblocked on its own and reported in `results`;
        one the user cannot see fails with

        `RESOURCE_NOT_FOUND` without stopping the others. An entry that is no
        longer active fails with

        `CHANNEL_BLACKLIST_ENTRY_NOT_ACTIVE`.

        - `select_all` with the list's filters in `filters` (the parameters of
        `GET /channel-blacklists`), minus

        `except_ids`: runs in the background and answers with `queued` and the
        number of entries. Entries created

        after the request are left out, and the user gets a
        `conversation_bulk_operation` notification with how many

        blocks were lifted and how many were skipped, by error code.

        - the criteria `channel_id`, `customer_id`, `reasons`, `blocked_before`,
        `expired_only` (at least one): lifts

        the active blocks matching all of them and answers with their `count`.


        Each lifted block is broadcast to the open chat screens like a single
        unblock.
      operationId: channelBlacklist.bulkUnblock
      parameters:
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelBlacklistBulkUnblockRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    anyOf:
                      - type: object
                        properties:
                          success_count:
                            type: integer
                          failed_count:
                            type: integer
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                blacklist_id:
                                  type: integer
                                success:
                                  type: boolean
                                error_code:
                                  type: string
                                message:
                                  type: string
                              required:
                                - blacklist_id
                                - success
                        required:
                          - success_count
                          - failed_count
                          - results
                      - type: object
                        properties:
                          queued:
                            type: boolean
                          count:
                            type: integer
                        required:
                          - queued
                          - count
                      - type: object
                        properties:
                          count:
                            type: integer
                        required:
                          - count
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  schemas:
    ChannelBlacklistBulkUnblockRequest:
      type: object
      description: >-
        Three forms, one per request: the ticked `ids`; `select_all` with the
        list's filters in

        `filters` (the parameters of `GET /channel-blacklists`); or the original
        criteria

        (`channel_id`, `customer_id`, `reasons`, `blocked_before`,
        `expired_only`), kept for clients

        that already send them.
      properties:
        ids:
          type: array
          description: >-
            The identifiers of the blacklist entries to unblock, at most 100.
            Send these, `select_all`, or the criteria below.
          items:
            type: integer
            minimum: 1
          minItems: 1
          maxItems: 100
        select_all:
          type: boolean
          description: >-
            Select every record the list shows with the filters in `filters`.
            The action then runs in the background and the response only carries
            the number of records.
        filters:
          type:
            - object
            - 'null'
          description: >-
            With `select_all`, the filters the list shows, as an object: the
            query parameters of `GET /api/v1/channel-blacklists` with the same
            names and values, array parameters without the `[]`. Paging and
            sorting parameters are ignored.
          properties:
            channel_id:
              type:
                - integer
                - 'null'
              description: Filter by channel id.
            customer_id:
              type:
                - integer
                - 'null'
              description: Filter by customer id.
            is_active:
              type:
                - boolean
                - 'null'
              description: Filter by active status.
            reason:
              type: array
              description: A block reason to include.
              items:
                $ref: '#/components/schemas/SpamType'
            is_permanent:
              type:
                - boolean
                - 'null'
              description: Filter permanent blocks (true) or blocks with an expiry (false).
            expiry_state:
              anyOf:
                - $ref: '#/components/schemas/ChannelBlacklistExpiryState'
                  description: >-
                    Filter by expiry: `active` blocks the customer now,
                    `expired` is past its expiry (whether or not the sweep has
                    deactivated it yet), `expiring_soon` is active and expires
                    within 24 hours.
                - type: 'null'
            search:
              type:
                - string
                - 'null'
              description: Search by the blocked customer's name or phone number.
              maxLength: 255
            blocked_at_from:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                Only entries blocked at or after this date-time (tenant timezone
                when no offset is given).
            blocked_at_to:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                Only entries blocked at or before this date-time; a date-only
                value includes the whole day.
        except_ids:
          type:
            - array
            - 'null'
          description: >-
            With `select_all`, the identifiers of the records to leave out, at
            most 1000.
          items:
            type: integer
            description: A record identifier to leave out.
            minimum: 1
          maxItems: 1000
        channel_id:
          type:
            - integer
            - 'null'
          description: 'Criteria form: only lift blocks on this channel.'
        customer_id:
          type:
            - integer
            - 'null'
          description: 'Criteria form: only lift blocks of this customer.'
        reasons:
          type:
            - array
            - 'null'
          description: 'Criteria form: only lift blocks with one of these reasons.'
          items:
            $ref: '#/components/schemas/SpamType'
            description: A block reason to include.
        blocked_before:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Criteria form: only lift blocks that started before this date-time
            (tenant timezone when no offset is given).
        expired_only:
          type:
            - boolean
            - 'null'
          description: >-
            Criteria form: only lift blocks that are already past their expiry
            but not yet swept.
      title: ChannelBlacklistBulkUnblockRequest
    SpamType:
      type: string
      enum:
        - rate_limit
        - llm_spam
        - manual
        - security_threat
        - abusive_language
      title: SpamType
    ChannelBlacklistExpiryState:
      type: string
      enum:
        - active
        - expired
        - expiring_soon
      title: ChannelBlacklistExpiryState
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.flextell.ai/oauth/authorize
          tokenUrl: https://app.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.