> ## 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.

# Restore trashed QR Codes

> POST /qr/trash/restore/

Restores soft-deleted QR Codes out of Trash.

```
POST   https://api.scanova.io/qr/trash/restore/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField body="ids" type="array" required>
  `qrid` values to restore, or the single-element sentinel `["all"]`.
</ParamField>

<ParamField query="category" type="string">
  Scopes an `["all"]` restore: `page` for landing pages, `qr` for ordinary QR Codes.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.scanova.io/qr/trash/restore/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
    -H "Content-Type: application/json" \
    -d '{
        "ids": [
            "Qe5f6g7h8i9j0k1l"
        ]
    }'
  ```
</RequestExample>

<Warning>
  Restoring is **quota-checked**. The static, dynamic, and total QR-code buckets are each evaluated against the count you would have *after* the restore, so a bulk restore can be refused with `403` even though the QR Codes already existed once. Restore in smaller batches, or free up quota first.
</Warning>

<Note>
  Success returns `200 OK` — not `201` and not `204`, unlike the other bulk operations in this module.
</Note>

## Related

* [List trashed QR Codes](/api-reference/management-api/qr/trash-list) — find the ids to restore.
* [Permanently delete trashed QR Codes](/api-reference/management-api/qr/trash-delete) — the irreversible alternative.
* [Delete a QR Code](/api-reference/management-api/qr/delete) — what put these QR Codes in Trash.
* [QR Manager overview](/api-reference/management-api/qr/overview) — the quotas, role permissions, and Trash model shared by every endpoint in this module.
* [Management API overview](/api-reference/management-api/overview) — the auth scheme and quota rules that apply to this endpoint.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /qr/trash/restore/
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:
  /qr/trash/restore/:
    post:
      summary: Restore trashed QR codes
      description: >-
        Restores soft-deleted QR codes. Target them with an `ids` list or the
        ["all"] sentinel; `?category=page|qr` scopes an "all" restore to landing
        pages or ordinary QR codes. The static, dynamic, and total QR buckets
        are each quota-checked against the post-restore count, so a restore that
        would exceed the plan is refused with 403. Returns 200 on success (not
        201 or 204).
      operationId: restoreTrashedQrCodes
      parameters:
        - name: category
          in: query
          required: false
          schema:
            type: string
            enum:
              - page
              - qr
          description: >-
            Scope an `["all"]` restore to `page` (landing pages) or `qr`
            (ordinary QR codes).
      requestBody:
        content:
          application/json:
            example:
              ids:
                - Qe5f6g7h8i9j0k1l
      responses:
        '200':
          description: QR codes restored.
          content:
            application/json:
              example:
                message: QR codes restored successfully.
        '400':
          description: Nothing matched the selection.
        '403':
          description: >-
            Restoring would exceed the plan's static, dynamic, or total QR-code
            allowance.
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.

````