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

# Delete a folder

> DELETE /folder/{id}/

Deletes a folder. A query parameter controls what happens to the QR Codes inside it — there is no default "safe" behavior beyond leaving those three modes explicit, so choose one deliberately.

<Note>
  Requires the account's `FOLDER_MANAGEMENT` quota and the `FOLDER_CAN_CREATE_AND_MANAGE` permission. See the [Management API overview](/api-reference/management-api/overview) for authentication details.
</Note>

<ParamField path="id" type="integer" required>
  Folder ID.
</ParamField>

<ParamField query="move_to_uncategorized" type="boolean">
  If `true`, the folder is deleted and its QR Codes are unassigned (moved to "Uncategorized") rather than deleted.
</ParamField>

<ParamField query="delete_permanently" type="boolean">
  If `true`, every QR Code in the folder **owned by your account** is permanently deleted along with the folder. QR Codes in the same folder that belong to a different user on a shared account are not deleted — only their folder assignment is cleared.
</ParamField>

### Delete modes

| Query string                  | Behavior                                                            | Response body                                                                   |
| ----------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| *(none)*                      | Folder is deleted; its QR Codes' folder assignment is cleared.      | `204`, empty.                                                                   |
| `?move_to_uncategorized=true` | Same as above, worded explicitly.                                   | `204` with `{"message": "Folder deleted and QR codes moved to Uncategorized."}` |
| `?delete_permanently=true`    | Folder **and** its QR Codes (owned by you) are permanently deleted. | `204` with `{"message": "Folder and associated QR codes deleted."}`             |

<Warning>
  A `204` response normally has no body — the two modes above that pass a query parameter are an exception and do return a JSON body despite the `204` status. Some HTTP clients silently discard a `204` body; don't rely on it if you can't confirm yours reads it. If you send both `move_to_uncategorized=true` and `delete_permanently=true` at once, `move_to_uncategorized` wins.
</Warning>

<RequestExample>
  ```bash cURL Delete only theme={null}
  curl --request DELETE \
    --url 'https://api.scanova.io/folder/42/' \
    --header 'Authorization: YOUR_API_KEY'
  ```

  ```bash cURL Move QR codes to Uncategorized theme={null}
  curl --request DELETE \
    --url 'https://api.scanova.io/folder/42/?move_to_uncategorized=true' \
    --header 'Authorization: YOUR_API_KEY'
  ```

  ```bash cURL Delete QR codes permanently theme={null}
  curl --request DELETE \
    --url 'https://api.scanova.io/folder/42/?delete_permanently=true' \
    --header 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

`404` if `id` isn't owned by this account.

## Related

* [Retrieve a folder](/api-reference/management-api/folders/retrieve) — check what's in it first.
* [List QR Codes in a folder](/api-reference/management-api/folders/qr-codes) — review contents before an irreversible `delete_permanently`.
* [Management API overview](/api-reference/management-api/overview) — the auth scheme and quota architecture this endpoint is part of.


## OpenAPI

````yaml api-reference/openapi/management-api.json DELETE /folder/{id}/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /folder/{id}/:
    delete:
      summary: Delete a folder
      description: >-
        Requires the account's FOLDER_MANAGEMENT quota and the
        FOLDER_CAN_CREATE_AND_MANAGE permission. Behavior is controlled by the
        move_to_uncategorized and delete_permanently query parameters.
      operationId: deleteManagedFolder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: move_to_uncategorized
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            Unassign the folder's QR codes (move to Uncategorized) instead of
            leaving them as-is.
        - name: delete_permanently
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            Permanently delete the folder's QR codes (owned by this account)
            along with the folder.
      responses:
        '204':
          description: >-
            Folder deleted. A JSON body is included only when
            move_to_uncategorized or delete_permanently is set.
          content:
            application/json:
              example:
                message: Folder and associated QR codes deleted.
        '404':
          description: No folder with this id owned by this account.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````