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

# Mark or unmark the account for deletion

> Marks the account for deletion, which also cancels its cloud subscriptions, or undoes that mark. Available on WiseApp Cloud only.



## OpenAPI

````yaml /openapi/application.json post /enterprise/api/v1/accounts/{account_id}/toggle_deletion
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /enterprise/api/v1/accounts/{account_id}/toggle_deletion:
    parameters:
      - $ref: '#/components/parameters/account_id'
        schema:
          type: string
        example: sample
    post:
      tags:
        - Account
      summary: Mark or unmark the account for deletion
      description: >-
        Marks the account for deletion, which also cancels its cloud
        subscriptions, or undoes that mark. Available on WiseApp Cloud only.
      operationId: toggle-account-deletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - action_type
              properties:
                action_type:
                  type: string
                  enum:
                    - delete
                    - undelete
            example:
              action_type: delete
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Sample text
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
              example:
                error: Unauthorized
        '404':
          description: Not available outside WiseApp Cloud, or account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
              example:
                error: Resource not found
        '422':
          description: Invalid action_type, or the account could not be marked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
              example:
                message: Validation failed
                attributes:
                  - name cannot be blank
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
  schemas:
    bad_request_error:
      title: data
      type: object
      properties:
        description:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/request_error'
    request_error:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de acesso do usuário (Perfil → Token de acesso). Dá acesso
        conforme o papel do usuário e age em nome dele.

````

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