---
title: "Create a worker export job"
method: POST
path: "/workers/export"
tags: ["Workers", "WorkerExport"]
---

# Create a worker export job

`POST /workers/export`

## Request

- Base URL: `https://v3.api.hypertrack.com`
- URL: `https://v3.api.hypertrack.com/workers/export`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/hypertrack/apis/hypertrack-api/docs/workers/export/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an asynchronous job to export workers to CSV.gz file. Returns a job_id that can be used to check status. Download link will be sent via email when ready.

## Request body

- WorkerExportRequest
  - `from_date` string, nullable: ISO 8601 date format ('yyyy-MM-dd') indicating the start date to be used for the summary computation.<br>Default: Current date in UTC.
  - `to_date` string, nullable: ISO 8601 date format ('yyyy-MM-dd') indicating the end date to be used for the summary computation.<br>Default: Current date in UTC.
  - `limit` integer, nullable: Number of workers to be sent in response
  - `include_schedule` boolean: Flag to include worker's schedule in the response.
  - `include_summary` boolean: Flag to include worker's summary stats in the response.
  - `ops_group_handle` string, nullable: List of ops group handles as comma separated strings used to filter workers.
  - `profile` string, nullable: Profile filter to be applied on the list of workers
  - `worker_handle` string, nullable: List of worker handles as comma separated strings used for fetching associated workers
  - `search_term` string, nullable: Keyword to match against worker handle, name, or profile
  - `pagination_token` string, nullable: Identifier used to fetch the next page of data
  - `device_id` string, uuid, nullable: Unique identifier for a worker's device. This field is present in case the worker is currently linked with a device
  - `include_deleted` boolean: Flag to include deleted workers
  - `from_time` string, date-time, nullable: ISO 8601 datetime indicating the start time to be used for computing summary, status.
  - `to_time` string, date-time, nullable: ISO 8601 datetime indicating the end time to be used for computing summary, status.
  - `filter_outage` string, nullable: Filter workers on a particular outage code.
  - `filter_outage_category` string, nullable: List of comma separated outage categories to be used for filtering workers. Valid categories: `behavioural`,`adversarial`,`reachability`,`os`,`sporadic`
  - `filter_geofence_metadata` string, nullable: geofence_metadata filter for aggregate response
  - `aggregate` boolean: Flag set to retrieve aggregated data over the provided time range
  - `work_status` string, nullable: URL-encoded json string specifying filters on availability or tracking.
  - `filter_status` 'active' | 'inactive' | 'disconnected' | 'null', nullable: Only list workers that are currently active/inactive/disconnected.
  - `tracked` boolean, nullable: If set to true, only shows workers that were actually tracked during the specified period.
  - `worked` boolean, nullable: If set to true, only shows workers that actually during the specified period.
  - `intended_to_track` boolean, nullable: If set to true, only shows workers that was supposed to be tracked during the specified period.
  - `include_lp` boolean, nullable: Flag to include location permission stats in response (only applicable when `aggregate=True`).
  - `region_filter` string, nullable: URL-encoded JSON string used to filter workers from a particular region. Ex `{"city":"Detroit"}`
  - `email_recipients` string[]: Optional list of email addresses to send the export download link. Falls back to the account email when omitted.

## Response `201`

Successful response

- WorkerExportResponse
  - `job_id` string, required: Unique identifier for the export job
  - `status` string, required: Current status of the export job: pending, processing, completed, failed
  - `message` string, required: Human-readable message about the job

## Other responses

- `400`: Validation error
- `401`: Authentication error

---

[API](https://skmtc.dev/hypertrack/apis/hypertrack-api.md) - [All operations](https://skmtc.dev/hypertrack/apis/hypertrack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hypertrack/apis/hypertrack-api/revisions/389326c4c9c8?raw)
