---
title: "Start user visits TSV export (async)"
method: POST
path: "/exports/user-visits"
---

# Start user visits TSV export (async)

`POST /exports/user-visits`

Queue a background job that exports users matching the User Visits page
filters (date range, UTM, experiment, subscription status, etc.) as a
TSV with all user properties as columns. Poll `GET /exports/{id}` until
completed, then use `download_url`.

## Headers

- `api_key` string, required

## Request body

- object
  - `from` string — ISO date (inclusive, project timezone). Default last 7 days.
  - `to` string
  - `search` string
  - `utm_source` string
  - `utm_medium` string
  - `utm_campaign` string
  - `utm_content` string
  - `utm_term` string
  - `has_event` string
  - `has_event_mode` 'has' | 'not_has'
  - `subscription` 'has' | 'not_has'
  - `user_country_code` string
  - `user_property` string
  - `user_property_value` string
  - `user_property_mode` 'has' | 'not_has'
  - `experiment` string — {experiment_id}-{variant_index}

## Response `202`

Export queued.

- object
  - `success` integer
  - `export` ExportRecord — Background export job. Statuses: 0=pending, 1=processing, 2=completed, 3=failed. `download_url` is signed and valid only while `download_expires_at` has not passed; call `GET /exports/{id}` again to obtain a fresh link.
    - `id` integer
    - `project_id` integer
    - `type` string
    - `subtype` string, nullable
    - `status` 0 | 1 | 2 | 3
    - `status_label` 'Pending' | 'Processing' | 'Completed' | 'Failed'
    - `file_name` string
    - `file_size` integer, nullable
    - `file_size_human` string
    - `mime_type` string, nullable
    - `parameters` object
    - `created_at` string, date-time
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `error_message` string, nullable — Populated only when status=failed.
    - `status_url` string, uri — URL of GET /exports/{id} — poll this until completed.
    - `download_url` string, uri, nullable — Short-lived signed URL to download the file. Null until status=completed.
    - `download_expires_at` string, date-time, nullable

---

[API](https://skmtc.net/web2wave/apis/web2wave-api.md) · [All operations](https://skmtc.net/web2wave/apis/web2wave-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/web2wave/web2wave-api/versions/c88545119271/schema)
