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

# Unblock users

> Removes users from the blocklist so they can send messages to the specified
WhatsApp business phone number again. You must have management permissions
for this business phone number. YCloud synchronizes the operation with Meta's WhatsApp platform.

Provide at least one non-empty list: `users` for phone numbers in E.164 format or
`userIds` for WhatsApp Business-scoped user IDs (BSUIDs). You can provide both lists,
with at most 100 entries in total. Check `block_users.removed_users` for successful
results and `block_users.failed_users` for per-user failures.



## OpenAPI

````yaml /openapi/endpoints/ycloud-api-v2.yaml post /whatsapp/{businessPhoneNumber}/unblockUsers
openapi: 3.0.0
info:
  description: >-
    The [YCloud](https://ycloud.com) API is organized around
    [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). Our
    API is designed to have predictable, resource-oriented URLs, return
    [JSON](https://www.json.org) responses, and use standard HTTP response codes
    and verbs.
  version: v2
  title: YCloud API
  termsOfService: https://ycloud.com/terms-service
  contact:
    email: service@ycloud.com
servers:
  - url: https://api.ycloud.com/v2
    description: Base URL
security:
  - api_key: []
tags:
  - name: Balance
  - name: Contacts
  - name: Custom Events
  - name: Emails
  - name: SMS
  - name: Unsubscribers
  - name: Verify
  - name: Voices
  - name: Webhook Endpoints
  - name: WhatsApp Business Accounts
  - name: WhatsApp Inbound Messages
  - name: WhatsApp Media
  - name: WhatsApp Messages
  - name: WhatsApp Blocked Users
  - name: WhatsApp Groups
  - name: WhatsApp Calling
  - name: WhatsApp Phone Numbers
  - name: WhatsApp Templates
  - name: WhatsApp Flows
  - name: Meta Business Agent
  - name: WhatsApp Group Messages
externalDocs:
  description: Homepage
  url: https://ycloud.com
paths:
  /whatsapp/{businessPhoneNumber}/unblockUsers:
    post:
      tags:
        - WhatsApp Blocked Users
      summary: Unblock users
      description: >-
        Removes users from the blocklist so they can send messages to the
        specified

        WhatsApp business phone number again. You must have management
        permissions

        for this business phone number. YCloud synchronizes the operation with
        Meta's WhatsApp platform.


        Provide at least one non-empty list: `users` for phone numbers in E.164
        format or

        `userIds` for WhatsApp Business-scoped user IDs (BSUIDs). You can
        provide both lists,

        with at most 100 entries in total. Check `block_users.removed_users` for
        successful

        results and `block_users.failed_users` for per-user failures.
      operationId: whatsapp_user-unblock
      parameters:
        - $ref: '#/components/parameters/businessPhoneNumber-in_path'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappBlockUsersRequest'
            examples:
              phoneNumbers:
                summary: Unblock users by phone number
                value:
                  users:
                    - '+12025550101'
              userIds:
                summary: Unblock users by BSUID
                value:
                  userIds:
                    - US.123456789012345
      responses:
        '200':
          description: >-
            Successfully processed the unblock request. Check the result for
            each user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappBlockUsersResponse'
              example:
                messaging_product: whatsapp
                block_users:
                  removed_users:
                    - input: '+12025550101'
                      wa_id: '12025550101'
                      user_id: US.123456789012345
                  failed_users: []
        '400':
          $ref: '#/components/responses/WhatsappBlockedUsersBadRequest'
        '401':
          $ref: '#/components/responses/WhatsappBlockedUsersUnauthorized'
        '403':
          $ref: '#/components/responses/WhatsappBlockedUsersForbidden'
        '429':
          $ref: '#/components/responses/WhatsappBlockedUsersRateLimited'
        '500':
          $ref: '#/components/responses/WhatsappBlockedUsersInternalError'
components:
  parameters:
    businessPhoneNumber-in_path:
      name: businessPhoneNumber
      in: path
      description: >-
        The WhatsApp business phone number in
        [E.164](https://en.wikipedia.org/wiki/E.164) format.
      required: true
      schema:
        type: string
        example: '+16315551111'
  schemas:
    WhatsappBlockUsersRequest:
      type: object
      description: >-
        Users to block or unblock. Provide at least one non-empty list of phone
        numbers

        or WhatsApp Business-scoped user IDs (BSUIDs). You can provide both
        lists.

        The combined number of entries in `users` and `userIds` must not exceed
        100.
      anyOf:
        - required:
            - users
          properties:
            users:
              minItems: 1
        - required:
            - userIds
          properties:
            userIds:
              minItems: 1
      properties:
        users:
          type: array
          maxItems: 100
          description: >-
            User phone numbers in E.164 format. These share the 100-entry
            request limit with `userIds`.
          items:
            type: string
          example:
            - '+12025550101'
        userIds:
          type: array
          maxItems: 100
          description: |-
            WhatsApp Business-scoped user IDs (BSUIDs), including parent BSUIDs.
            Values are trimmed and normalized to uppercase. These share the
            100-entry request limit with `users`.
          items:
            type: string
          example:
            - US.123456789012345
    WhatsappBlockUsersResponse:
      type: object
      properties:
        messaging_product:
          type: string
          description: Messaging product used for the operation.
          example: whatsapp
        block_users:
          type: object
          properties:
            added_users:
              type: array
              description: Users successfully blocked. Returned for block operations.
              items:
                $ref: '#/components/schemas/WhatsappBlockUser'
            removed_users:
              type: array
              description: Users successfully unblocked. Returned for unblock operations.
              items:
                $ref: '#/components/schemas/WhatsappBlockUser'
            failed_users:
              type: array
              description: Users for whom the operation failed.
              items:
                type: object
                properties:
                  input:
                    type: string
                    description: User identifier for the failed operation.
                  errors:
                    type: array
                    description: WhatsApp errors for this user.
                    items:
                      $ref: '#/components/schemas/WhatsappApiError'
        errors:
          $ref: '#/components/schemas/WhatsappApiError'
    WhatsappBlockUser:
      type: object
      properties:
        input:
          type: string
          description: User identifier returned for the operation.
          example: '+12025550101'
        wa_id:
          type: string
          description: WhatsApp ID, when available.
          example: '12025550101'
        user_id:
          type: string
          description: WhatsApp Business-scoped user ID (BSUID), when available.
          example: US.123456789012345
    WhatsappApiError:
      type: object
      description: >-
        The original error object returned by WhatsApp. See [Handling
        Errors](https://developers.facebook.com/docs/graph-api/guides/error-handling),
        [Cloud API Error
        Codes](https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes).
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: A human-readable description of the error.
          example: HSM Template creation failed
        code:
          type: string
          description: An error code.
          example: 200002
        type:
          type: string
          description: Error type.
          example: OAuthException
        is_transient:
          type: boolean
          description: Whether the error is transient.
          example: false
        error_subcode:
          type: string
          description: Additional code about the error.
          example: 2388109
        error_user_msg:
          type: string
          description: >-
            The message to display to the user. The language of the message is
            based on the locale of the API request.
          example: This message template cannot be created.
        error_user_title:
          type: string
          description: >-
            The title of the dialog, if shown. The language of the message is
            based on the locale of the API request.
          example: Message Cannot Be Submitted
        fbtrace_id:
          type: string
          description: >-
            Internal support identifier. When reporting a bug related to a Graph
            API call, include the fbtrace_id to help us find log data for
            debugging.
          example: AVGjJ7ia2zJkrHG
        error_data:
          description: >-
            Additional data about the error. A string or map.

            - For template APIs, this field is a string describing the reason
            for the error.

            - For message APIs, this field is a map with property `details`
            describing the reason for the error.
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: >-
            Contains the error code and human-readable message for the API
            error.
    Error:
      type: object
      required:
        - status
        - code
      properties:
        status:
          type: integer
          format: int32
          pattern: '[45]\d{2}'
          description: >-
            HTTP status code, [RFC 7231, Section
            6](https://datatracker.ietf.org/doc/html/rfc7231#section-6). It
            conveys the HTTP status code used for the convenience of the
            consumer.
          example: 404
        code:
          type: string
          description: >-
            One of a server-defined error codes. Some `4xx` errors that could be
            handled programmatically include an error code that briefly explains
            the error reported.
          example: NOT_FOUND
        message:
          type: string
          description: >-
            A human-readable representation of the error. It is intended as an
            aid to developers and is not suitable for exposure to end users.
          example: The requested resource does not exist.
        target:
          type: string
          description: The target of the error.
          example: ''
        docUrl:
          type: string
          description: A URL to more information about the error.
          example: ''
        requestId:
          type: string
          description: >-
            Each API request has an associated request ID. It conveys the
            response header `YCloud-Request-ID` used for the convenience of the
            consumer.
          example: req_1KjtKI80IKoaJNa6n6p
        whatsappApiError:
          $ref: '#/components/schemas/WhatsappApiError'
          description: >-
            The original error object returned by WhatsApp. See [Handling
            Errors](https://developers.facebook.com/docs/graph-api/guides/error-handling),
            [Cloud API Error
            Codes](https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes).


            Note: This field is returned if we tried to request the WhatsApp
            Business API and got an error response.
        metaBusinessAgentApiError:
          $ref: '#/components/schemas/MetaBusinessAgentApiError'
          description: >-
            Sanitized upstream details returned when a Meta Business Agent
            request fails.
    MetaBusinessAgentApiError:
      type: object
      description: Sanitized details from a failed Meta Business Agent upstream request.
      properties:
        title:
          type: string
        detail:
          type: string
        type:
          type: string
        status:
          type: integer
          format: int32
        requestId:
          type: string
  responses:
    WhatsappBlockedUsersBadRequest:
      description: >-
        Invalid request parameters, or Meta rejected the request. Meta errors
        are included in `error.whatsappApiError`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    WhatsappBlockedUsersUnauthorized:
      description: Authentication failed. The API key is invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    WhatsappBlockedUsersForbidden:
      description: >-
        You do not have permission to access this resource, the business phone
        number is not registered with YCloud, or its WABA is unavailable to your
        account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    WhatsappBlockedUsersRateLimited:
      description: The request rate limit was exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    WhatsappBlockedUsersInternalError:
      description: An internal server error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    api_key:
      type: apiKey
      name: X-API-Key
      in: header

````

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