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

# Trigger a user activity log export

> POST /user-logs/export/

Queues an asynchronous job that generates a CSV of account activity (create/update/delete events, logins, and shares) for a date range, on the **Management API** host (`api.scanova.io`), authenticated with your raw Management API key.

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

<ParamField body="fromDate" type="string">
  Start of the export range, as `DD/MM/YYYY HH:MM` (24-hour), exclusive.
</ParamField>

<ParamField body="toDate" type="string">
  End of the export range, as `DD/MM/YYYY HH:MM` (24-hour), inclusive.
</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>

The call returns `200` immediately once the job is queued — `id` is the export job's id in [List user log export history](/api-reference/management-api/user-logs/list), where you poll `status`. The account receives an email when the export completes or fails.

<Warning>
  `fromDate`/`toDate` are **not** validated synchronously. A malformed date string doesn't produce a `400` here — the job is created and only fails asynchronously once the worker attempts to parse it, ending in `status: "failed"` and a failure email. Always double-check the `DD/MM/YYYY HH:MM` format before sending.
</Warning>

`403` if the account's plan lacks the `USER_LOGS_EXPORT` quota, or if a shared user calling this lacks the `SHARED_USER_CAN_EXPORT_USER_LOGS` permission:

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

<Note>
  Completed export records and their CSV files are retained for 14 days, after which they're purged automatically.
</Note>

## Related

* [List user log export history](/api-reference/management-api/user-logs/list) — poll job status.
* [Delete an export history record](/api-reference/management-api/user-logs/delete) — remove a job early.
* [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 /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.

````