---
title: "POST /api/activity/exports/"
method: POST
path: "/api/activity/exports/"
tags: ["activity"]
---

# POST /api/activity/exports/

`POST /api/activity/exports/`

Start an asynchronous job that exports an organization's collected activity data (``spans`` or ``events``) to a downloadable CSV, returning the new job's id and initial status. Optionally scoped to a member, groups, and a date window. Restricted to organization admins/managers and gated by the activity-tracking flag.

## Request body

- ActivityExportRequest
  - `organization` string, uuid, required
  - `dataset` 'spans' | 'events'
  - `user` string, uuid, nullable
  - `groups` string[]
  - `start` string, date-time, nullable
  - `end` string, date-time, nullable

## Response `201`

---

[API](https://skmtc.dev/pixiebrix/apis/pixiebrix-api.md) · [All operations](https://skmtc.dev/pixiebrix/apis/pixiebrix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pixiebrix/pixiebrix-api/revisions/941ab9eb01d6/schema)
