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

# Export von Benutzeraktivitätsprotokollen auslösen

> POST /user-logs/export/

Stellt einen asynchronen Job in die Warteschlange, der eine CSV-Datei der Kontoaktivität (Erstellungs-/Aktualisierungs-/Löschereignisse, Anmeldungen und Freigaben) für einen Zeitraum erzeugt, auf dem **Management-API**-Host (`api.scanova.io`), authentifiziert mit Ihrem rohen Management-API-Schlüssel.

```
POST https://api.scanova.io/user-logs/export/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField body="fromDate" type="string">
  Beginn des Exportzeitraums, als `DD/MM/YYYY HH:MM` (24-Stunden-Format), exklusiv.
</ParamField>

<ParamField body="toDate" type="string">
  Ende des Exportzeitraums, als `DD/MM/YYYY HH:MM` (24-Stunden-Format), inklusive.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.scanova.io/user-logs/export/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
    -H "Content-Type: application/json" \
    -d '{ "fromDate": "01/09/2026 00:00", "toDate": "07/09/2026 23:59" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 483,
    "message": ["User Logs Export is in progress. You will receive an email on completion."]
  }
  ```
</ResponseExample>

Der Aufruf gibt sofort `200` zurück, sobald der Job in die Warteschlange gestellt wurde — `id` ist die ID des Exportjobs in [Verlauf der Benutzerprotokoll-Exporte auflisten](/de/api-reference/management-api/user-logs/list), wo Sie den `status` abfragen. Das Konto erhält eine E-Mail, wenn der Export abgeschlossen ist oder fehlschlägt.

<Warning>
  `fromDate`/`toDate` werden **nicht** synchron validiert. Ein fehlerhafter Datumsstring führt hier nicht zu einem `400` — der Job wird erstellt und schlägt erst asynchron fehl, sobald der Worker versucht, ihn zu parsen, was zu `status: "failed"` und einer Fehler-E-Mail führt. Prüfen Sie das Format `DD/MM/YYYY HH:MM` immer vor dem Senden.
</Warning>

`403`, wenn der Plan des Kontos nicht über die Quota `USER_LOGS_EXPORT` verfügt oder wenn ein aufrufender geteilter Benutzer nicht über die Berechtigung `SHARED_USER_CAN_EXPORT_USER_LOGS` verfügt:

```json 403 theme={null}
{ "detail": "Your plan does not have user logs quota." }
```

<Note>
  Abgeschlossene Exportdatensätze und ihre CSV-Dateien werden 14 Tage lang aufbewahrt und danach automatisch gelöscht.
</Note>

## Verwandte Themen

* [Verlauf der Benutzerprotokoll-Exporte auflisten](/de/api-reference/management-api/user-logs/list) — den Job-Status abfragen.
* [Exportverlaufseintrag löschen](/de/api-reference/management-api/user-logs/delete) — einen Job vorzeitig entfernen.
* [Übersicht über die Management API](/de/api-reference/management-api/overview) — das Authentifizierungsschema und die Quota-Regeln für diesen Endpunkt.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /user-logs/export/
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:
  /user-logs/export/:
    post:
      summary: Trigger a user activity log export
      description: >-
        Queues an async job that generates a CSV of account activity
        (create/update/delete events) for the given date range and emails the
        account when it's done. Returns immediately — poll [List user log export
        history](/api-reference/management-api/user-logs/list) for `status`.
      operationId: createUserLogsExport
      requestBody:
        content:
          application/json:
            example:
              fromDate: 01/09/2026 00:00
              toDate: 07/09/2026 23:59
      responses:
        '200':
          description: Export job queued.
          content:
            application/json:
              example:
                id: 483
                message:
                  - >-
                    User Logs Export is in progress. You will receive an email
                    on completion.
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.

````